Commit graph

16155 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
bors-servo
3629efba75 Auto merge of #17406 - Gankro:with_cap, r=jdm
use DisplayListBuilder::with_capacity

DO NOT MERGE until https://github.com/servo/webrender/pull/1399 has landed in Servo.

Previously webrender was reserving 1MB of space for each display list (empirically pages weighed between 100k and 10MB when I implemented this). This was problematic for gecko because they used webrender differently. This just brings Servo back to where it was.

<!-- 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/17406)
<!-- Reviewable:end -->
2017-07-24 09:02:50 -07:00
Alexis Beingessner
855b1fe6f1 use DisplayListBuilder::with_capacity 2017-07-24 11:47:38 -04:00
bors-servo
723b21b669 Auto merge of #17841 - ferjm:bug1380890.column, r=jdm
stylo: make GetRuleColumn report a 1-based value

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

- [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/17841)
<!-- Reviewable:end -->
2017-07-24 07:55:06 -07:00
Ehsan Akhgari
aeb2b8b098 stylo: Read mName as a raw nsIAtom* from NodeInfoInner. 2017-07-24 10:40:58 -04:00
Fernando Jiménez Moreno
5cabb0f86b stylo: make GetRuleColumn report a 1-based value 2017-07-24 15:28:02 +02:00
bors-servo
4f0821192c Auto merge of #17820 - servo:token-cache, r=emilio
Update cssparser to 0.18

Do not merge yet, depends on https://github.com/servo/rust-cssparser/pull/171.

<!-- 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/17820)
<!-- Reviewable:end -->
2017-07-24 06:27:00 -07:00
Cameron McCormack
6171b5c465 style: Don't clamp Opacity values when computing them for SMIL. 2017-07-24 20:47:34 +08:00
Cameron McCormack
c81d62d36f style: Record on a computed::Context whether we are computing a SMIL animated value. 2017-07-24 20:47:33 +08:00
bors-servo
9f412caab2 Auto merge of #17837 - emilio:assert-fix, r=hiikezoe
style: Avoid looking at descendant hints to check whether the element needs a restyle.

This makes us hit some assertions in Gecko.

<!-- 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/17837)
<!-- Reviewable:end -->
2017-07-24 04:49:08 -07:00
Emilio Cobos Álvarez
b4d26619d3
style: Improve the assertion message in restyle_kind(). 2017-07-24 12:13:19 +02:00
Emilio Cobos Álvarez
af2b429557
style: Avoid looking at descendant hints to check whether the element needs a restyle. 2017-07-24 12:12:08 +02:00
bors-servo
a56bd4663b Auto merge of #17835 - KiChjang:clearer-network-error, r=emilio
Make network error messages more specific

Instead of having a bogus "Network error" string, we extract the NetworkError struct from the Response and send it back to FetchResponseListener.

<!-- 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/17835)
<!-- Reviewable:end -->
2017-07-24 03:07:26 -07:00
Keith Yeung
19cf006d4f Make network error messages more specific 2017-07-24 02:52:10 -07:00
Simon Sapin
eb98ae6e04 Update cssparser to 0.18
https://github.com/servo/rust-cssparser/pull/171
2017-07-24 11:39:12 +02:00
Emilio Cobos Álvarez
6e3397b907
style: Remove outdated comments. 2017-07-24 10:07:39 +02:00
Emilio Cobos Álvarez
f2fe3facf3
style: Update has_current_styles_for_this_traversal to not look at animation hints in non-animation traversals.
MozReview-Commit-ID: 4bwwIGcoXqA
2017-07-24 10:05:48 +02:00
Emilio Cobos Álvarez
9d21f9e6ce
style: Remove (mostly) unused has_current_styles.
MozReview-Commit-ID: DV9HfvbUjBY
2017-07-24 10:05:37 +02:00