Commit graph

1362 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
11485edc9e
style: Hide LocalMatchingContext.
This type is a lot of complexity related to a very specific thing such as the
hover and active quirk.

Instead of that, move `nesting_level` to `MatchingContext`, and simplify all
this computing whether the quirk applies upfront, for each complex selector we
test.

This is less error-prone, and also allows simplifying more stuff in a bit.
2017-10-14 17:03:35 +02:00
Emilio Cobos Álvarez
e9a26f3a89
style: Update bindings. 2017-10-14 14:04:53 +02:00
Emilio Cobos Álvarez
77f115b467
stylo: Remove unused function. 2017-10-13 17:01:36 +02:00
Emilio Cobos Álvarez
3e9bfdd72e
stylo: Remove :-moz-system-metric pseudo-class.
Bug: 1405311
Reviewed-by: xidorn
MozReview-Commit-ID: CIF64dG1F2k
2017-10-12 14:04:32 +02:00
Xidorn Quan
96d0529be5 Remove text-shadow handling from HasAuthorSpecifiedRules 2017-10-12 15:20:47 +11:00
Cameron McCormack
c05e45fdd1 style: Skip custom properties comparison if other inherited properties changed. 2017-10-12 10:44:46 +08:00
Xidorn Quan
0c40ae70ed Support pseudo-element properly in HasAuthorSpecifiedRules. 2017-10-11 10:29:32 +11:00
Simon Sapin
c0f8f15f39 Update to cssparser 0.22 (source location in error types) 2017-10-10 13:28:17 +02:00
Hiroyuki Ikezoe
fd2ccee84d Update bindings. 2017-10-10 18:33:49 +09:00
Hiroyuki Ikezoe
1e5ee9d2d4 Update bindings. 2017-10-10 06:35:49 +09:00
Hiroyuki Ikezoe
175b88afcf Fix mismatched arguments for Servo_SelectorXXX. 2017-10-10 06:35:16 +09:00
Emilio Cobos Álvarez
100dd18307
style: use the XBL styleset quirks mode to match XBL rules.
This fixes bug 1405543.

MozReview-Commit-ID: Dv3mt3Fb8Yp
2017-10-09 11:30:37 +02:00
Nicholas Nethercote
7628c1236a Rename nsIAtom as nsAtom.
Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than
nsIAtom.
2017-10-09 09:27:11 +11:00
Emilio Cobos Álvarez
b0706d5cf0
stylo: Add a mechanism to restrict media-features to UA and chrome sheets.
Reviewed-by: xidorn
Bug: 1396066
MozReview-Commit-ID: 38jRV6mPbE3
2017-10-07 13:13:36 +02:00
Emilio Cobos Álvarez
04b7386070
style: Update bindings. 2017-10-07 13:13:34 +02:00
Xidorn Quan
8fc24bc5fa Backout #18759 2017-10-07 12:27:04 +11:00
bors-servo
04f787dbf9 Auto merge of #18763 - emilio:transition-longhand-id, r=hiro,birtles
style: Check transitions per longhand to know which transitions to keep.

This fixes bug https://bugzilla.mozilla.org/show_bug.cgi?id=1406111

This fixes the fishy TransitionProperty mapping which I complained about in my
previous refactor.

Turns out that those properties could only be longhands, and thus the expansion
we did before that (and which I removed) was correct.

This fixes the bug by moving back to the previous correct behavior but using the
correct types.

The optimization to avoid creating a HashSet if we're transitioning all
properties or had no existing transition is removed since now we're creating a
LonghandIdSet, which is cheap, and that was only a performance optimization.

<!-- 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/18763)
<!-- Reviewable:end -->
2017-10-06 12:56:27 -05:00
bors-servo
a468d05fff Auto merge of #18765 - emilio:unship-moz-se-transitioning, r=upsuper
stylo: Make :-moz-styleeditor-transitioning only valid in UA sheets.

Bug: 1396099
Reviewed-by: xidorn

<!-- 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/18765)
<!-- Reviewable:end -->
2017-10-06 05:28:28 -05:00
bors-servo
6421332fb3 Auto merge of #18764 - bradwerth:onlyDPPX, r=heycam
Change MediaExpressionValue::from_css_value to only accept pixels

MozReview-Commit-ID: Hn3twVa8xLo

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

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./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 existing tests provide coverage.

<!-- 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/18764)
<!-- Reviewable:end -->
2017-10-06 03:39:42 -05:00
Emilio Cobos Álvarez
4d8110c844
style: Simplify it even more. 2017-10-06 10:06:46 +02:00
Emilio Cobos Álvarez
c60b8288bc
style: Check transitions per longhand to know which transitions to keep.
This fixes the fishy TransitionProperty mapping which I complained about in my
previous refactor.

Turns out that those properties could only be longhands, and thus the expansion
we did before that (and which I removed) was correct.

This fixes the bug by moving back to the previous correct behavior but using the
correct types.

The optimization to avoid creating a HashSet if we're transitioning all
properties or had no existing transition is removed since now we're creating a
LonghandIdSet, which is cheap, and that was only a performance optimization.
2017-10-06 10:02:06 +02:00
Emilio Cobos Álvarez
3916257db7
style: Update bindings. 2017-10-05 20:51:42 +02:00
Emilio Cobos Álvarez
43636e676d
stylo: Restrict system-metric media features to UA and chrome sheets only. r=xidorn
Reviewed-by: xidorn
Bug: 1396066
MozReview-Commit-ID: 38jRV6mPbE3
2017-10-05 20:51:21 +02:00
Emilio Cobos Álvarez
8ec805874d
stylo: Restrict :-moz-system-metric to chrome and ua sheets. r=xidorn
Bug: 1396066
Reviewed-by: xidorn
MozReview-Commit-ID: AyHWP3QgGlA
2017-10-05 20:51:20 +02:00
Emilio Cobos Álvarez
e513aefa8c
stylo: Make :-moz-styleeditor-transitioning only valid in UA sheets.
Bug: 1396099
Reviewed-by: xidorn
2017-10-05 20:40:46 +02:00
Brad Werth
61b9b68278 Change MediaExpressionValue::from_css_value to only accept one type of unit (pixels).
MozReview-Commit-ID: Hn3twVa8xLo
2017-10-05 11:12:56 -07:00
bors-servo
f2879a568d Auto merge of #18753 - upsuper:binding-structs, r=emilio
Only generate structs file for the current build

This PR changes build_gecko.rs to only generate the `structs.rs` for the current build (rather than both), depending on whether `gecko_debug` feature is set.

The in-tree files are switched to use the previous release one, because that's what we currently use for stylo test and it is in general what we really care about. For this change, `gecko_debug` mode is removed from Servo CI (in `build-geckolib`) with the assumption that people general do that build locally for stylo development, so it is less likely to be broken than release.

<!-- 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/18753)
<!-- Reviewable:end -->
2017-10-05 11:24:22 -05:00
Xidorn Quan
23d9d12430 Only generate structs file for the current build 2017-10-05 15:29:32 +11:00
Emilio Cobos Álvarez
6f836bed5a
style: Use the flattened tree parent to find the closest non-nac ancestor of an element.
This only matters for document level NAC like canvas custom content, in which
case otherwise we inherit from the document element (which is wrong).

Bug: 1405635
2017-10-05 01:07:05 +02:00
bors-servo
3f07cfec7c Auto merge of #18733 - bradwerth:nativeDPPX, r=heycam
Change resolution queries to compare in unconverted dppx units.

MozReview-Commit-ID: 7wYlixTQTIC

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

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./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 the tests are in Gecko

<!-- 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/18733)
<!-- Reviewable:end -->
2017-10-04 15:31:17 -05:00
Cameron McCormack
fde77ee693 style: Regenerate Gecko bindings. 2017-10-04 13:38:07 +08:00
Nicholas Nethercote
365ae0b637 Remove nsTFixedString<T>.
nsTFixedString<T> is only used as a base class for nsTAutoStringN<T, N>, so
this patch merges the former into the latter, cutting some code and simplifying
the string class hierarchy.

Because the "Fixed" name is now gone, the patch also renames
StringDataFlags::FIXED as INLINE and ClassDataFlags::FIXED as INLINE.

The patch also removes nsFixed[C]String and ns_auto_[c]string! from Rust code
because nsAutoString can't be implemented directly in Rust due to its move
semantics. There were only two uses of ns_auto_string! outside of tests so this
seems like a minor loss.
2017-10-04 13:31:09 +11:00
Manish Goregaokar
8bce37e6ba stylo: use FnvHashMap everywhere, remove default HashMap construction methods 2017-10-03 14:10:31 -07:00
Brad Werth
b8e78d20bf Change resolution queries to compare in unconverted dppx units.
MozReview-Commit-ID: 7wYlixTQTIC
2017-10-03 13:56:14 -07:00
Bobby Holley
15b866d8de Revert #18668 - Add mprotect diagnostics for HashMap crash 2017-10-03 12:44:26 -07:00
Ting-Yu Lin
1a437f956c style: Update generated bindings
MozReview-Commit-ID: ILCV7MiArL4
2017-10-02 11:50:42 +08:00
Ting-Yu Lin
db6acc7de4 style: Change URL value storage in StyleShapeSource.
This is due to Bug 1404243 Part 4.

MozReview-Commit-ID: CFRCdw2Dayy
2017-10-02 11:50:37 +08:00
Ting-Yu Lin
3547a59e28 style: Remove refcount for StyleBasicShape
This is due to Bug 1404243 Part 3.

MozReview-Commit-ID: DKymebmAYLX
2017-10-02 11:50:30 +08:00
Emilio Cobos Álvarez
3215e36b5b
style: Cleanup the animated value setup.
We have three different enums to represent slightly different things. Reuse them
properly, and kill some code in the animated_properties module while at it.

MozReview-Commit-ID: 5ZAly8f4lWy
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-29 13:20:50 +02:00
bors-servo
c6f4ced45c Auto merge of #18667 - Manishearth:bindingsup, r=emilio
Update debug bindings for removal of mFrameRefCnt

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

<!-- 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/18667)
<!-- Reviewable:end -->
2017-09-28 20:15:51 -05:00
Bobby Holley
e2c0ca5110 Update bindings.
MozReview-Commit-ID: 8hyaJxfSi9L
2017-09-28 14:12:56 -07:00
Manish Goregaokar
b19b9b78db Update debug bindings for removal of mFrameRefCnt 2017-09-28 13:19:51 -07:00
Emilio Cobos Álvarez
f6a350b725
style: update bindings. 2017-09-28 10:03:58 +02:00
Emilio Cobos Álvarez
0ead078aa0
style: Simplify and remove some more code.
Bug: 1396073
Reviewed-by: xidorn
MozReview-Commit-ID: Ec9pfQw7U6W
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-28 09:58:45 +02:00
Emilio Cobos Álvarez
87dc00d54f
style: Remove :-moz-empty-except-children-with-local-name.
<applet> is not a thing anymore, and that selector in our UA sheet will never
match anyway, since an <applet> element will never have the BROKEN state.

Bug: 1396073
Reviewed-by: xidorn
MozReview-Commit-ID: 7UOMKOv55uJ
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-28 09:58:19 +02:00
Emilio Cobos Álvarez
abcd92ba9e
style: Hide :-moz-devtools-highlighted from anywhere but UA sheets.
It's always used from a UA sheet already.

Bug: 1396073
Reviewed-by: xidorn
MozReview-Commit-ID: J3poQuTD1C7
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-28 09:57:55 +02:00
Hiroyuki Ikezoe
08574b8c4d Update bindings. 2017-09-27 18:27:58 +09:00
Nicholas Nethercote
67e62f49fd Update Gecko bindings. 2017-09-27 13:48:12 +10:00
Nicholas Nethercote
7019d42523 Devirtualize nsIAtom. 2017-09-27 12:40:31 +10:00
Michael Layzell
c1c98659b9 Update ns[C]String::from -> ns[C]Str::from where possible 2017-09-26 11:03:35 -04:00