Commit graph

28547 commits

Author SHA1 Message Date
Corey Farwell
23e5bfaf27 Audit usages of unicode case-changing methods. 2017-07-26 23:44:01 +00:00
Emilio Cobos Álvarez
b15fa2cd79
style: fix alignment in call to get_all_matching_rules. 2017-07-27 01:35:57 +02:00
Manish Goregaokar
68d67ef3f5 stylo: call update_border_foo when inheriting borders too 2017-07-26 15:48:51 -07:00
bors-servo
27031b996b Auto merge of #17878 - Manishearth:bump-au, r=emilio
stylo: Bump app units version

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

<!-- 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/17878)
<!-- Reviewable:end -->
2017-07-26 16:53:58 -05:00
Corey Farwell
58fd2956b3 Fix typo in comment. 2017-07-26 21:29:08 +00:00
Hiroyuki Ikezoe
123e5d33c2 MatrixDecomposed3D.add_weighted() is called with zero value for other_portion in case of iteration composite.
In the case where we accumulate transform:none onto decomposed matrix for
iteration composite whose iteration count is over 2, we pass zero
other_portion and self_portion which is over 1.0.  We should care about the
case.
2017-07-27 06:20:35 +09:00
Manish Goregaokar
f61eb07a10 stylo: Bump app units version 2017-07-26 13:55:30 -07:00
bors-servo
020188fdd7 Auto merge of #17875 - bzbarsky:first-line-dual-inheritance, r=emilio
Add support for having two separate parent styles.  Fixes gecko bug 1382806.

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

This is needed for ::first-line support.  See https://drafts.csswg.org/css-pseudo-4/#first-line-inheritance

This PR doesn't quite implement what the CSS spec draft says right now.  It implements what Gecko does, which is what an earlier draft said.

---
<!-- 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 https://bugzilla.mozilla.org/show_bug.cgi?id=1382806

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because servo doesn't support ::first-line yet

<!-- 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/17875)
<!-- Reviewable:end -->
2017-07-26 15:21:37 -05:00
Boris Zbarsky
048044f98b Make it possible to construct StyleBuilder with two different inherited styles.
Part 3 of Gecko bug 1382806.  r=emilio
2017-07-26 15:25:34 -04:00
bors-servo
a15d13a6ec Auto merge of #17877 - canaltinova:font-face-refactoring, r=jdm
Cleanup @font-face rule constructor

Passing SourceLocation into constructor instead of assigning
immediately after construction cleans up the code and helps to
prevent leaving an invalid SourceLocation in the future.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [X] These changes do not require tests because it's just a cleanup.

<!-- 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/17877)
<!-- Reviewable:end -->
2017-07-26 14:13:02 -05:00
Nazım Can Altınova
c9e5cf0a28 Cleanup @font-face rule constructor
Passing SourceLocation into constructor instead of assigning
immediately after construction cleans up the code and helps to
prevent leaving an invalid SourceLocation in the future.
2017-07-26 11:55:22 -07:00
Boris Zbarsky
f991b76535 Give StyleBuilder separate inherited styles for inherited and non-inherited structs.
This is needed for ::first-line, which causes its kids to inherit different properties from different places.

Part 2 of Gecko bug 1382806.  r=emilio
2017-07-26 13:41:11 -04:00
Boris Zbarsky
648c0a3d0b Remove the inherited_style getter from StyleBuilder.
The concept of inherited style is about to get a bit more complicated, and this
will prevent consumers from doing it wrong.

Part 1 of Gecko bug1382806.  r=emilio
2017-07-26 13:40:02 -04:00
bors-servo
799988578e Auto merge of #17871 - emilio:revert-gradient-stuff, r=emilio
Revert "Auto merge of #17868 - ferjm:bug1380259.radial.gradients, r=xidorn"

This reverts commit ef233381cc, reversing
changes made to f61528d297.

This broke a bunch of tests in m-c, like:

  https://treeherder.mozilla.org/logviewer.html#?job_id=118007409&repo=autoland

<!-- 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/17871)
<!-- Reviewable:end -->
2017-07-26 07:51:21 -05:00
Josh Matthews
b8d8e15286 Remove unused CEF import. 2017-07-26 08:44:08 -04:00
Josh Matthews
f86399d1e5 Remove unused CEF variable. 2017-07-26 08:43:38 -04:00
Josh Matthews
dc5a50fcd3 Clean up warnings in script unit tests. 2017-07-26 08:42:16 -04:00
Emilio Cobos Álvarez
75a844cd32
Revert "Auto merge of #17868 - ferjm:bug1380259.radial.gradients, r=xidorn"
This reverts commit ef233381cc, reversing
changes made to f61528d297.

This broke a bunch of tests in m-c, like:

  https://treeherder.mozilla.org/logviewer.html#?job_id=118007409&repo=autoland
2017-07-26 14:25:22 +02:00
bors-servo
f59bd8e2b2 Auto merge of #17859 - jdm:geckodecl, r=heycam
Add message suffixes to stylo error reports.

This is the Servo-side part of https://bugzilla.mozilla.org/show_bug.cgi?id=1381137. This allows us to add the "Declaration dropped" or "Skipped to next declaration" messages after relevant CSS errors that are reported.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- 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/17859)
<!-- Reviewable:end -->
2017-07-26 06:46:13 -05:00
bors-servo
ef233381cc Auto merge of #17868 - ferjm:bug1380259.radial.gradients, r=xidorn
stylo: serialize radial gradients using modern unprefixed style

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

https://bugzilla.mozilla.org/show_bug.cgi?id=1380259

<!-- 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/17868)
<!-- Reviewable:end -->
2017-07-26 03:20:33 -07:00
Fernando Jiménez Moreno
c50e892a04 stylo: serialize radial gradients using modern unprefixed style 2017-07-26 12:00:15 +02:00
bors-servo
f61528d297 Auto merge of #17867 - emilio:pseudo-display-none, r=heycam
style: Don't skip computation of pseudo-elements of display: none elements

We have optimizations to avoid doing selector-matching when the style attribute
changes, so, given you can toggle the display property and the pseudo-elements
will suddenly become effective, we can't really skip them.

Furthermore, we assume that if an element has an ElementStyles, they're
up-to-date and we can use them for getComputedStyle, so it's pretty easy to
prove that we do the wrong thing when calling getComputedStyle with a
pseudo-element on a display: none root.

Bug: 1384065
Reviewed-by: heycam
MozReview-Commit-ID: BIOqevGZyrm
2017-07-26 02:15:30 -07:00
Emilio Cobos Álvarez
43278ed349
style: Don't skip computation of pseudo-elements of display: none elements.
We have optimizations to avoid doing selector-matching when the style attribute
changes, so, given you can toggle the display property and the pseudo-elements
will suddenly become effective, we can't really skip them.

Furthermore, we assume that if an element has an ElementStyles, they're
up-to-date and we can use them for getComputedStyle, so it's pretty easy to
prove that we do the wrong thing when calling getComputedStyle with a
pseudo-element on a display: none root.

Bug: 1384065
Reviewed-by: heycam
MozReview-Commit-ID: BIOqevGZyrm
2017-07-26 11:14:04 +02:00
bors-servo
3d5eb727f6 Auto merge of #17865 - dadaa:bug1379921, r=hiro
make font-variant-alternates animatable

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

---
<!-- 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

<!-- Either: -->
- [X] There are tests for these changes. The test codes are patch 2 and 3 in https://bugzilla.mozilla.org/show_bug.cgi?id=1379921

<!-- 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/17865)
<!-- Reviewable:end -->
2017-07-25 21:21:53 -07:00
bors-servo
40eeee4e05 Auto merge of #17866 - hiikezoe:restyle-damage, r=emilio
Preserve restyle damage if the element was not restyled during thrott…

…led animation flush.

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

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- 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/17866)
<!-- Reviewable:end -->
2017-07-25 20:19:16 -07:00
bors-servo
f351e68198 Auto merge of #17863 - glennw:update-wr-scroll-stuff, r=emilio
Update WR (scroll/overflow mostly).

<!-- 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/17863)
<!-- Reviewable:end -->
2017-07-25 19:16:34 -07:00
Glenn Watson
d2d2f4d3b1 Update WR (scroll/overflow improvements, filter API tidy). 2017-07-26 12:15:52 +10:00
Hiroyuki Ikezoe
40b0d525dd Preserve restyle damage if the element was not restyled during throttled animation flush. 2017-07-26 11:09:19 +09:00
Daisuke Akatsuka
40ce3ddd82 make font-variant-alternates animatable 2017-07-26 10:16:39 +09:00
Martin Robinson
537025800f Allow overflow:hidden to scroll via script 2017-07-26 09:58:33 +10:00
bors-servo
316878b489 Auto merge of #17858 - emilio:hover-quirk-broken, r=canaltinova
selectors: Fix note_next_sequence.

Selector-matching can backtrack when looking for ancestor combinators, so we
can't just arrive there once and forget.

Also, there was a further problem before this patch, which was that
note_next_sequence was called _before_ checking whether all simple selectors
matched, so the sequence you could get there is just wrong.

Bug: 1384020
Reviewed-by: canaltinova
MozReview-Commit-ID: 6g0ibb8EfBU

<!-- 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/17858)
<!-- Reviewable:end -->
2017-07-25 15:42:37 -07:00
Josh Matthews
d8fe376f09 Add message suffixes to stylo error reports. (bug 1381137) 2017-07-25 18:37:13 -04:00
Emilio Cobos Álvarez
a885655210
selectors: Fix note_next_sequence.
Selector-matching can backtrack when looking for ancestor combinators, so we
can't just arrive there once and forget.

Also, there was a further problem before this patch, which was that
note_next_sequence was called _before_ checking whether all simple selectors
matched, so the sequence you could get there is just wrong.

Bug: 1384020
Reviewed-by: canaltinova
MozReview-Commit-ID: 6g0ibb8EfBU
2017-07-26 00:28:11 +02:00
bors-servo
002ea74a71 Auto merge of #17856 - Manishearth:stylo-clip-overflow, r=emilio
Use saturating ops when passing computed clip value to gecko (fix bug 1384150)

https://bugzilla.mozilla.org/show_bug.cgi?id=1384150

<!-- 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/17856)
<!-- Reviewable:end -->
2017-07-25 14:33:19 -07:00
Manish Goregaokar
7cdcfa0f8e stylo: Use saturating ops for clip computation
MozReview-Commit-ID: DYQRM4CJbAg
2017-07-25 14:29:05 -07:00
Alan Jeffrey
7e6fd297ff Implement getProperties for StylePropertyMap. 2017-07-25 15:59:00 -05:00
bors-servo
3c77caec37 Auto merge of #17853 - asajeffrey:wpt-css-paint-api-correct-bug-refs, r=jdm
Correct bug references in css-paint-api WPT metadata.

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

Some of the bug references in the css-paint-api .ini files were wrong.

---
<!-- 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 do not require tests because we don't test .ini files

<!-- 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/17853)
<!-- Reviewable:end -->
2017-07-25 10:57:45 -07:00
Alan Jeffrey
69f1ee0d30 Correct bug references in css-paint-api WPT metadata. 2017-07-25 12:55:37 -05:00
bors-servo
e825bf1442 Auto merge of #17850 - upsuper:bug1382077, r=heycam
Record viewport unit usage and generate proper restyle hint

This is the Servo side change of [bug 1382077](https://bugzilla.mozilla.org/show_bug.cgi?id=1382077).
2017-07-25 02:09:45 -07:00
Xidorn Quan
388875ca44 Record viewport unit usage and generate proper restyle hint. 2017-07-25 19:02:21 +10:00
bors-servo
3eeb0e5e48 Auto merge of #17849 - heycam:binding-display-none, r=emilio
style: Ensure we generate a ReconstructFrame hint when -moz-binding changes on a display:none root.

From https://bugzilla.mozilla.org/show_bug.cgi?id=1375383.
2017-07-25 00:51:27 -07:00
Cameron McCormack
e36b4340e1 style: Ensure we generate a ReconstructFrame hint when -moz-binding changes on a display:none root. 2017-07-25 15:50:00 +08:00
bors-servo
bf16b146e8 Auto merge of #17839 - heycam:opacity-smil, r=hiro
style: allow out-of-range opacity values for SMIL animations

From https://bugzilla.mozilla.org/show_bug.cgi?id=1371150.

<!-- 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/17839)
<!-- Reviewable:end -->
2017-07-24 19:13:08 -07:00
bors-servo
b8ac4a7a2e Auto merge of #17846 - Manishearth:font-weight, r=upsuper
Allow nonstandard font-weight values for system fonts

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1379895

<!-- 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/17846)
<!-- Reviewable:end -->
2017-07-24 17:26:31 -07:00
Manish Goregaokar
9c6f11c965 Allow nonstandard font-weight values for system fonts 2017-07-24 17:24:25 -07:00
bors-servo
a35c8f08e2 Auto merge of #17832 - birtles:disallow-playstate-keyframes, r=emilio
Only allow animation-timing-function in @keyframes

CSS animations used to erroneously indicate that 'animation-play-state' is permitted in @keyframes. It is not and it'ss non-sensical to allow it there. This mistake was faithfully transferred into Servo code (although we also make 'animation-timing-function' which is what the spec text meant to say).

The spec has [been updated](adeb3434c5) and so we should update the Servo code accordingly.

---
<!-- 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: -->
- [x] There are tests for these changes OR
- [ ] 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/17832)
<!-- Reviewable:end -->
2017-07-24 15:50:20 -07:00
Alan Jeffrey
a8da777fd1 Use CSS background-size property when computing the size of a paint worklet. 2017-07-24 17:32:54 -05:00
bors-servo
897f5d8884 Auto merge of #17844 - emilio:is-visited, r=bholley
stylo: Read mName as a raw nsIAtom* from NodeInfoInner.

Changes for bug 1383756.
2017-07-24 13:22:49 -07:00
Emilio Cobos Álvarez
0e80710ee7
style: Update NodeInfo bindings. 2017-07-24 22:04:16 +02:00
Nikhil Shagrithaya
8ebd70d402 Run the async HTML Tokenizer on a new thread 2017-07-24 23:54:07 +05:30