Commit graph

29385 commits

Author SHA1 Message Date
Cameron McCormack
23d710bc36 style: Add support for -moz-font-smoothing-background-color. 2017-09-26 09:17:08 +08:00
Anthony Ramine
0e3c54c191 Rename dom::bindings::js to dom::bindings::root 2017-09-26 02:19:05 +02:00
Anthony Ramine
dafcd821f5 Fix some messages in the tidy script
It's MutJS<T>, not MutJS<JS<T>>.
2017-09-26 02:18:07 +02:00
bors-servo
e6099b4364 Auto merge of #18617 - TheDan64:master, r=KiChjang
Removed integrity check and test for no-cors requests

Removed Step 30.2 which raised a JS TypeError if the integrity metadata was not empty. I manually ran `new Request("", {"mode" : "no-cors", "integrity" : "not an empty string"});` in servo to validate that the exception no longer arose.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #18345
- [x] These changes do not require tests because according to the ticket "Unfortunately, there's no automated test available for this yet because we are having trouble updating our copy of the upstream tests. "

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18617)
<!-- Reviewable:end -->
2017-09-25 19:15:26 -05:00
Glenn Watson
76e846d5f4 Update WR (handle translucent brightness, invert filters. Hit test API). 2017-09-26 10:00:32 +10:00
Daniel Kolsoi
96f9cc77e6 Removed integrity check and test for no-cors requests
Also updated request-headers.html manifest hash
2017-09-25 19:11:30 -04:00
bors-servo
532dee36c1 Auto merge of #17056 - jdm:heapdict, r=emilio
Make dictionaries and unions containing GC values safer

Problems:
* the Heap::new constructor is memory-unsafe with any value other than Undefined/Null
* this means that moving dictionaries containing Heap values (ie. any/object) is memory-unsafe
* unions containing GC pointers are similarly unsafe

Solutions:
- dictionaries containing GC pointers are now wrapped in RootedTraceableBox (even inside other dictionaries)
- instead of using Heap::new, dictionaries containing GC pointers are now initialized to a default value (by deriving Default) and mutated one field at a time
- dictionaries containing GC pointers are marked #[must_root]
- FromJSVal for dictionaries containing GC pointers now returns RootedTraceableBox<Dictionary>
- unions wrap their variants that require rooting in RootedTraceableBox

Rather than attempting to derive Default for all dictionaries, we only do so for the dictionaries that require it. Because some dictionaries that require it inherit from dictionaries that do not, we need to write manual implementations for those parent dictionaries. This is a better option than having to figure out a default value for types like `Root<T>`, which would be required for deriving Default for all dictionaries.

I would still like to come up with an automated test for this, but I figured I would get eyes on this first.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #16952
- [ ] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17056)
<!-- Reviewable:end -->
2017-09-25 16:07:47 -05:00
Josh Matthews
44822c364c Use more named string interpolation. 2017-09-25 16:11:49 -04:00
Josh Matthews
77b3e911c1 Remove almost all uses of Heap::new. 2017-09-25 16:11:49 -04:00
Josh Matthews
f5eb8445b0 Initialize rooted dictionaries to a stable value before setting fields. 2017-09-25 16:11:48 -04:00
Josh Matthews
16166d6673 Derive the Default trait for dictionaries containing GC values. 2017-09-25 16:10:58 -04:00
Josh Matthews
b169689f32 Store rootable dictionary members of dictionaries in RootedTraceableBox. 2017-09-25 16:10:58 -04:00
Josh Matthews
da65698c5c Be more conservative about safety of dictionary and union values.
Mark dictionaries containing GC values as must_root, and wrap them in
RootedTraceableBox in automatically-generated APIs. To accommodate
union variants that are now flagged as unsafe, add RootedTraceableBox
to union variants that need to be rooted, rather than wrapping the
entire union value.
2017-09-25 16:10:58 -04:00
Josh Matthews
e481e8934a Don't generate union conversion functions for object variants. 2017-09-25 16:10:57 -04:00
bors-servo
86b926b4cf Auto merge of #18629 - qdot:update-windows-readme-python-version, r=jdm
Update link to Windows Python Version in README

<!-- Please describe your changes on the following line: -->

The README currently points to a 2 year old version python for windows (2.7.11). While this version works for servo development, builds also work with the current version (2.7.14), so the link can be updated.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because change is documentation update

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18629)
<!-- Reviewable:end -->
2017-09-25 15:01:35 -05:00
Kyle Machulis
61803fb937 Update link to Windows Python Version in README
The README currently points to a 2 year old version of
python (2.7.11). While this version works for servo development,
builds also work with the current version (2.7.14), so the link can be
updated.
2017-09-25 12:47:58 -07:00
bors-servo
bbb5c8436e Auto merge of #18627 - emilio:paint-order, r=nox
style: paint-order serialization fixes.

See each commit for details.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18627)
<!-- Reviewable:end -->
2017-09-25 09:35:38 -05:00
Emilio Cobos Álvarez
638ba2ce6d
style: Simplify paint-order serialization when possible.
This matches Gecko, and fixes the last reported case in bug 1397619.

MozReview-Commit-ID: 4Z7GeaokKE1
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-25 16:07:33 +02:00
Emilio Cobos Álvarez
614da6b4a1
style: Simplify paint-order gecko-related code.
We share value representation, so there's no reason to do this in a more complex
way.

MozReview-Commit-ID: BITfCPqTkal
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-25 16:07:33 +02:00
Emilio Cobos Álvarez
3067d2e320
style: Early return in a couple of places to deindent some code.
MozReview-Commit-ID: 8hDAKZANOro
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-25 16:07:32 +02:00
bors-servo
d9cec56d71 Auto merge of #18626 - servo:media, r=emilio
Decouple media load blockers from their resource URL

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18626)
<!-- Reviewable:end -->
2017-09-25 06:39:47 -05:00
Anthony Ramine
40a72f3e83 Decouple media load blockers from their resource URL
A media element can delay the document's load event without having a resource URL,
and it can even block it while being inserted into a different document AFAIK.
2017-09-25 13:04:52 +02:00
Anthony Ramine
da392e3524 Rename Document::mut_loader to loader_mut 2017-09-25 12:32:34 +02:00
bors-servo
30e007ba1a Auto merge of #18624 - emilio:easier-is-better, r=nox
style: Early return and skip duplicate assertion in matching.rs

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18624)
<!-- Reviewable:end -->
2017-09-25 05:29:48 -05:00
Emilio Cobos Álvarez
0b930255f4
style: Early return and skip duplicate assertion in matching.rs 2017-09-25 10:59:34 +02:00
bors-servo
f3214372bf Auto merge of #18582 - servo:media, r=emilio
Improve HTMLMediaElement

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18582)
<!-- Reviewable:end -->
2017-09-25 03:51:53 -05:00
bors-servo
eba9b802ab Auto merge of #18622 - hiikezoe:display-none-by-cssom, r=birtles
Handle display property change from 'none' only if there is restyle hint for SMIL

<!-- Please describe your changes on the following line: -->
https://bugzilla.mozilla.org/show_bug.cgi?id=1401801

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
2017-09-25 00:21:18 -05:00
Hiroyuki Ikezoe
aefea7230f Handle display property change from 'none' only if there is restyle hint for SMIL
We only need to handle changes when the display property is changed from 'none'
when we have a restyle hint for SMIL.  The only other case where we expect to
see changes to display property during an animation are from using the CSSOM.
However, when the display property is changed from 'none' by the CSSOM, during
the animation-only restyle we can skip all descendants since they will be
traversed in the subsequent normal traversal because at that time we flush
style sheets and traverse all elements in the document. So we don't need to
care about the descendants during animation-only restyle.
2017-09-25 13:53:30 +09:00
Hiroyuki Ikezoe
fd0295ead2 Use 4-spaces instead of 2-spaced 2017-09-25 13:49:17 +09:00
bors-servo
dd6aae9d52 Auto merge of #18621 - emilio:unused-crate, r=glennw
selectors: Remove unused crate.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18621)
<!-- Reviewable:end -->
2017-09-24 21:05:49 -05:00
bors-servo
4628db1495 Auto merge of #18620 - emilio:bye-unsafe-node, r=glennw
style: Remove UnsafeNode.

No longer needed since a while ago.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18620)
<!-- Reviewable:end -->
2017-09-24 20:04:58 -05:00
bors-servo
cc4dd589f7 Auto merge of #18619 - glennw:update-wr-subpx-2, r=emilio
Update WR (fast path text shadow fix, subpx text snapping improvements).

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18619)
<!-- Reviewable:end -->
2017-09-24 19:03:00 -05:00
Emilio Cobos Álvarez
4f984a6428
selectors: Remove unused crate. 2017-09-25 02:01:55 +02:00
Emilio Cobos Álvarez
e3c58df155
style: Remove UnsafeNode.
No longer needed since a while ago.
2017-09-25 01:58:52 +02:00
Anthony Ramine
5245931dc2 Implement the error path for source children of media elements
This removes some test timeout.
2017-09-25 00:35:35 +02:00
Glenn Watson
d84639942c Update WR (fast path text shadow fix, subpx text snapping improvements). 2017-09-25 08:25:10 +10:00
bors-servo
61f0fc199e Auto merge of #18598 - glennw:update-wr-driver-bug, r=emilio
Update WR (work around a mac GL driver bug).

Also includes updates to the mac core-* crates and friends.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18598)
<!-- Reviewable:end -->
2017-09-24 16:13:47 -05:00
bors-servo
216f64e4e1 Auto merge of #18609 - Manishearth:fs-anim, r=emilio
stylo: Animate font-size as NonNegativeLength

Otherwise it doesn't clamp correctly and fails layout/style/test/test_transitions_per_property.html

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18609)
<!-- Reviewable:end -->
2017-09-24 02:48:12 -05:00
Manish Goregaokar
b238eae66c Add FIXME for font-size animated value 2017-09-24 00:47:54 -07:00
Manish Goregaokar
ce7d82e9c4 stylo: Animate font-size as NonNegativeLength 2017-09-23 16:22:42 -07:00
bors-servo
35aad08619 Auto merge of #18603 - tigercosmos:allocating, r=KiChjang
fix #18594: Unnecessarily allocating an error string

<!-- Please describe your changes on the following line: -->
r? @asajeffrey

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #18594 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18603)
<!-- Reviewable:end -->
2017-09-23 17:11:51 -05:00
bors-servo
3db1776326 Auto merge of #18607 - Manishearth:stylo-font-nsstylefont, r=emilio
stylo: Move font computation data into nsStyleFont and computed value of font-size

r=emilio https://bugzilla.mozilla.org/show_bug.cgi?id=1399228

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18607)
<!-- Reviewable:end -->
2017-09-23 13:26:02 -05:00
Manish Goregaokar
454fb9f1e4 stylo: Update ComputedValues size in test 2017-09-23 11:25:42 -07:00
Manish Goregaokar
cd6f68c545 stylo: Clean up keyword values 2017-09-23 11:02:22 -07:00
Manish Goregaokar
df9d7cd941 stylo: Move font-size stuff to values::*::font 2017-09-23 10:52:07 -07:00
Manish Goregaokar
e1a39a2012 stylo: Remove FontComputationData, switch over to using the new font tracking 2017-09-23 10:51:55 -07:00
Manish Goregaokar
c73dc5704b stylo: Add font keyword info fields on nsStyleFont 2017-09-23 10:51:44 -07:00
Manish Goregaokar
c2fcc9ce1a stylo: Add keyword info to computed value of font-size 2017-09-23 10:51:21 -07:00
tigercosmos
7db47f8084 fix #18594: Unnecessarily allocating an error string 2017-09-23 22:42:34 +08:00
Anthony Ramine
49dd04cd8b Return a promise from HTMLMediaElement::Play 2017-09-23 12:01:43 +02:00