Commit graph

25860 commits

Author SHA1 Message Date
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
Manish Goregaokar
35faa37a25 overflow: -moz-scrollbars-none is shorthand-only 2017-04-25 15:38:35 -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
bors-servo
dc594face8 Auto merge of #15794 - paulrouget:head_parsed_url, r=asajeffrey
Notify embedder when history changes

`WindowMethods::set_page_url` is only called when the embedder set the URL. It is not called when the page url is updated. I believe that instead we should just pass the URL to `head_parsed`.

---
<!-- 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 #15439 #15643 and #15642 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because I'm not sure how to test that

<!-- 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/15794)
<!-- Reviewable:end -->
2017-04-25 14:14:31 -05:00
bors-servo
7aeed78eef Auto merge of #16570 - Manishearth:scriptmin-parent, r=heycam
Compute scriptminsize against the parent font base size

It's supposed to be, because it is used in the computation of the font size, so we can't have the current font size as a dependency.

http://searchfox.org/mozilla-central/rev/7aa21f3b531ddee90a353215bd86e97d6974e25b/layout/style/nsRuleNode.cpp#3842

<!-- 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/16570)
<!-- Reviewable:end -->
2017-04-25 13:06:23 -05:00
Nazım Can Altınova
17e378b099
Fix variable serialization bug on alias properties 2017-04-25 21:05:26 +03:00
bors-servo
3c7c960e11 Auto merge of #16444 - Wafflespeanut:generics, r=emilio
Cleanup various modules and introduce generic types

Almost all the types in `values/specified` and `values/computed` share their `ToCss` implementations. The only reason they have duplicated code hanging around is a result of different specified and computed forms for types like `LengthOrPercentage`. This PR makes some of these types *generic* so that we could have a common definition and `ToCss` impl (`Parse` and `ToComputedValue` impls too, if possible).

<!-- 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/16444)
<!-- Reviewable:end -->
2017-04-25 07:29:33 -05:00
Ravi Shankar
d56aec4109 Make ShapeSource generic 2017-04-25 17:42:02 +05:30
Ravi Shankar
24226af794 Make InsetRect generic 2017-04-25 17:40:41 +05:30
Ravi Shankar
63965f55f5 Make use of predefined_type for some aliased types 2017-04-25 17:40:39 +05:30
Ravi Shankar
61a17993eb Cleanup position and make use of generic Position for its users 2017-04-25 17:32:45 +05:30
Ravi Shankar
3f53fb148d Add generic versions of Position structs 2017-04-25 17:13:47 +05:30
Ravi Shankar
6f062e5857 Add a generic PositionValue struct 2017-04-25 17:13:46 +05:30
Ravi Shankar
f4b18643c2 Cleanup Polygon and make it generic 2017-04-25 17:13:45 +05:30