Commit graph

25367 commits

Author SHA1 Message Date
Anthony Ramine
080f74ca63 Implement the unitless length quirk for background-position 2017-04-27 10:41:57 +02:00
Anthony Ramine
f68e2fded9 Propagate quirks mode all the way to ParserContext
The quirks mode is still not properly propagated in geckolib.
2017-04-27 10:41:55 +02:00
Anthony Ramine
10fb8e61c7 Enable /quirks-mode/ tests 2017-04-27 10:41:53 +02:00
Anthony Ramine
4df7af564a Run a test per property and value in unitless-length.html 2017-04-26 17:30:29 +02:00
Anthony Ramine
f872fdac9a Make Stylist::quirks_mode hold a QuirksMode 2017-04-26 17:30:28 +02:00
bors-servo
8f1356de60 Auto merge of #16614 - BorisChiou:stylo/transition/transition_property, r=emilio
stylo: Bug 1357357 - Make the parser of transition-property match the spec.

These are interdependent patches of Bug 1357357. We add one more arm, TransitionProperty::Unsupported, which stores the string of non-animatable, custom, or unrecognized property, so we can parse these kinds of properties and serialize them correctly. This is necessary because we need to start transitions even though some transition-properties are non-animatable, custom, or unrecognized.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1357357](https://bugzilla.mozilla.org/show_bug.cgi?id=1357357).
- [X] 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/16614)
<!-- Reviewable:end -->
2017-04-26 09:33:08 -05:00
bors-servo
4e70e10ed1 Auto merge of #16618 - emilio:dirty-doc, r=nox
script: Ensure we don't suppress reflows when stylesheets are dirty.

I suspect this will prevent some intermittentness in #16617

<!-- 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/16618)
<!-- Reviewable:end -->
2017-04-26 08:59:33 -05:00
Boris Chiou
02fc1789e8 Bug 1357357 - Make the parser of transition-property match the spec.
1. We add a new arm to TransitionProperty, TransitionProperty::Unsupported,
   which contains an Atom, so it's better to remove the Copy trait from
   TransitionProperty.
2. TransitionProperty::Unsupported(Atom) represents any non-animatable, custom,
   or unrecognized property, and we use Atom to store the ident string for
   serialization.
2017-04-26 21:35:05 +08:00
Emilio Cobos Álvarez
69fd9a3e9b
script: Ensure we don't suppress reflows when stylesheets are dirty. 2017-04-26 15:32:56 +02:00
bors-servo
c1b347794c Auto merge of #16612 - glennw:update-wr-groove-ridge-2, r=jdm
Update WR (groove/ridge borders, mix-blend-mode opts)

<!-- 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/16612)
<!-- Reviewable:end -->
2017-04-26 07:56:32 -05:00
bors-servo
4800d2a47c Auto merge of #16615 - hiikezoe:fix-overflow, r=SimonSapin
Fix overflow in ::nth-child()

<!-- Please describe your changes on the following line: -->
This is a PR of https://bugzilla.mozilla.org/show_bug.cgi?id=1358754

---
<!-- 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] We have a test case in mozilla-central.

<!-- 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/16615)
<!-- Reviewable:end -->
2017-04-26 06:28:26 -05:00
Hiroyuki Ikezoe
1a37e69ce9 Fix overflow in ::nth-child() 2017-04-26 19:20:13 +09:00
bors-servo
e5762cb695 Auto merge of #16613 - birtles:clear-animation-dirty-bit, r=hiikezoe
Clear animation-only dirty descendants bit on display:none descendants

PR for [Gecko bug 1359658](https://bugzilla.mozilla.org/show_bug.cgi?id=1359658)

When an element has a display:none ancestor we don't traverse it during
restyle. However, at the end of restyling we expect the tree to be free
of dirty bits. We currently take special care to clear the regular
(non-animation) dirty bit on nodes in display:none subtrees in order to
preserve this invariant. This patch applies the same handling to the
animation-only dirty descendants bit.

---
- [X] `./mach build -d` just keeps crashing because mozjs calls sed.exe in a way that breaks it
- [X] `./mach test-tidy` does not report any errors
- [X] There are tests for these changes on the Gecko side

<!-- 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/16613)
<!-- Reviewable:end -->
2017-04-26 01:47:00 -05:00
bors-servo
2eff661ebb Auto merge of #16455 - servo:counter-style, r=upsuper
Bug 1354970 - Add @counter-style rules

<!-- 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/16455)
<!-- Reviewable:end -->
2017-04-26 00:59:58 -05:00
Simon Sapin
1b419007d1 CSSKeyframesRule::name setter doesn’t throw anymore
063dc05e47
https://github.com/w3c/web-platform-tests/pull/5695
2017-04-26 07:55:01 +02:00
Brian Birtles
0d0c2701ff Clear animation-only dirty descendants bit on display:none descendants
When an element has a display:none ancestor we don't traverse it during
restyle. However, at the end of restyling we expect the tree to be free
of dirty bits. We currently take special care to clear the regular
(non-animation) dirty bit on nodes in display:none subtrees in order to
preserve this invariant. This patch applies the same handling to the
animation-only dirty descendants bit.
2017-04-26 14:14:30 +09:00
Glenn Watson
c879584a19 Update WR (new groove/ridge border path, mix-blend-mode optimizations)
A few other minor additions too.
2017-04-26 14:34:07 +10:00
Simon Sapin
029150c770 Exclude 'none' from <counter-style-name> after all.
https://github.com/w3c/csswg-drafts/issues/1295
2017-04-26 06:18:58 +02:00
Simon Sapin
be38c9a5a7 Consider foo and "foo" equal as keyframes/animation names. 2017-04-26 13:04:28 +09:00
Simon Sapin
0ff64bdc59 Allow 'decimal' and 'none' in <counter-style-name>
… other than in `@counter-style`.
2017-04-26 13:04:27 +09:00
Simon Sapin
1146921866 Keep custom-ident and string separate in animation/keyframes name. 2017-04-26 13:04:22 +09:00
Simon Sapin
82c04113d0 Make predefined counter style names ASCII-lowercase. 2017-04-26 13:03:21 +09:00
Simon Sapin
e7a2a98d8a Make the style::counter_style module a directory 2017-04-26 13:02:41 +09:00
Simon Sapin
ade56bbe8d Add missing 'additive-symbols' validity checks 2017-04-26 13:02:40 +09:00
Simon Sapin
331acfaf9b Check rule-level @counter-style validity 2017-04-26 13:02:38 +09:00
Simon Sapin
6dc317f80b Add speak-as descriptor for @counter-style 2017-04-26 13:02:37 +09:00
Simon Sapin
62d261add4 Add 'additive-symbols' descriptor for @counter-style 2017-04-26 13:02:36 +09:00
Simon Sapin
f93a9a4b10 Don’t make up initial values not in spec for @counter-style descriptors 2017-04-26 13:02:34 +09:00
Simon Sapin
617e8e9768 CSSOM requires @counter-style to keep track of which descriptors were specified 2017-04-26 13:02:33 +09:00
Simon Sapin
fe15663423 Add the 'symbols' descriptor for @counter-style 2017-04-26 13:02:31 +09:00
Simon Sapin
0ba5cae707 Add 'fallback' descriptor to @counter-style 2017-04-26 13:02:30 +09:00
Simon Sapin
e27de3842d Add 'pad' descritor of @counter-style 2017-04-26 13:02:29 +09:00
Simon Sapin
6f79684468 Add 'range' descriptor to @counter-style 2017-04-26 13:02:27 +09:00
Simon Sapin
29bcb5b636 Add 'prefix' and 'suffix' descriptors for @counter-style 2017-04-26 13:02:26 +09:00
Simon Sapin
d1558a2025 Add 'negative' descriptor of @counter-style 2017-04-26 13:02:25 +09:00
Simon Sapin
4477a2da40 Add the 'system' descriptor of @counter-style 2017-04-26 13:02:23 +09:00
Simon Sapin
797f40b0a3 Add initial style system support for @counter-style rules 2017-04-26 13:02:22 +09:00
Simon Sapin
5a8e3308c1 Remove some intermediate conversions in style/properties/gecko.mako.rs 2017-04-26 13:02:20 +09:00
Simon Sapin
71f9a0c848 Fix up unit tests 2017-04-26 13:02:19 +09:00
Simon Sapin
627c823d0a Use CustomIdent in counter-increment 2017-04-26 13:02:17 +09:00
Simon Sapin
d9c2d1a9fb Use CustomIdent for animation-name and @keyframes 2017-04-26 13:02:16 +09:00
Simon Sapin
4993a80074 Introduce a style::values::CustomIdent type 2017-04-26 13:02:14 +09:00
bors-servo
5daf92dd5a Auto merge of #16611 - Manishearth:stylo-controlchar, r=heycam
stylo: Add support for -moz-control-character-visibility

<!-- 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/16611)
<!-- Reviewable:end -->
2017-04-25 21:31:14 -05:00
Manish Goregaokar
247da8f7f8 Add support for -moz-control-character-visibility
MozReview-Commit-ID: 2fdaQrDi6Xt
2017-04-25 18:32:26 -07:00
bors-servo
09f0ff7481 Auto merge of #16608 - emilio:refactor-fixup, r=jryans
style: Move all the fixup code into a StyleAdjuster struct.

This will allow reusing it from text styles, which we need for some corner
cases, like text-align: -moz-center and similar stuff.

<!-- 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/16608)
<!-- Reviewable:end -->
2017-04-25 20:31:00 -05:00
Emilio Cobos Álvarez
ccf15c0a26
style: Move all the fixup code into a StyleAdjuster struct.
This will allow reusing it from text styles, which we need for some
corner cases, like text-align: -moz-center and similar stuff.
2017-04-26 03:22:24 +02:00
bors-servo
9059c1d1fd Auto merge of #16606 - bholley:not_selector_level_3, r=SimonSapin
Downgrade selectors not() behavior to level 3

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

<!-- 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/16606)
<!-- Reviewable:end -->
2017-04-25 17:43:48 -05:00
Bobby Holley
a1e90d1b24 Downgrade selectors not() behavior to level 3.
MozReview-Commit-ID: 6p750Ml2wzm
2017-04-25 15:43:20 -07:00
bors-servo
cd8af86244 Auto merge of #16597 - Manishearth:stylo-overflow, r=emilio
stylo: support all overflow values

overflow:clip doesn't exist, it's just called clip internally. Renamed, and added the other missing values.

I also removed the overflow newtype -- no need for extra code bloat, and it's not protecting us from much.

<!-- 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/16597)
<!-- Reviewable:end -->
2017-04-25 15:59:13 -05:00
Manish Goregaokar
f8e298b2b3 stylo: support all overflow values
MozReview-Commit-ID: 1iQdUDsb6u9
2017-04-25 13:52:39 -07:00