Commit graph

16155 commits

Author SHA1 Message Date
Simon Sapin
685b9efed6 Move "is universal" logic from stylist.rs to selectors/parser.rs 2017-05-16 18:41:27 +02:00
Dzmitry Malyshau
d04a64394e Using TransformStyle::Preserve3D 2017-05-16 11:08:32 -04:00
bors-servo
7f6b28e241 Auto merge of #16872 - jryans:matching-context, r=emilio
Create a MatchingContext to group related matching args

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

Upcoming changes for visited support and others as well need to pass more args through matching, so this creates a MatchingContext to group them together.

<!-- 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/16872)
<!-- Reviewable:end -->
2017-05-16 09:45:36 -05:00
Simon Sapin
390e688058 Fix serialization of namespace and universal selectors
Fix #16017
Fix #16020
2017-05-16 16:44:28 +02:00
J. Ryan Stinnett
e385b81fc3 Create a MatchingContext to group related matching args
MozReview-Commit-ID: 7XZTn7HDXrm
2017-05-16 09:19:28 -05:00
Boris Zbarsky
993cb6eb41 Don't require style sharing cache invalidation for :dir 2017-05-16 09:55:37 -04:00
bors-servo
d855c929ef Auto merge of #16865 - mrobinson:scroll-offsets-fix, r=emilio
Properly handle scroll offsets in hit testing

Scroll roots are no longer nested containers holding items, so instead
we need to track the offsets of each, carefully handling fixed position
items and stacking contexts that create new reference frames.
Additionally, we remove the complexity of the pre-computed page scroll
offset, instead opting to send script scrolls to the layout task in
order to more quickly have a ScrollState there that matches the
script's idea of the scroll world.

Fixes #16405.

<!-- 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
- [x] These changes fix #16405.

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it is currently impossible to test interactive scrolling with Servo's test infrastructure. Existing tests verify the script part though.

<!-- 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/16865)
<!-- Reviewable:end -->
2017-05-16 08:33:22 -05:00
Martin Robinson
9fd2df5c09 Properly handle scroll offsets in hit testing
Scroll roots are no longer nested containers holding items, so instead
we need to track the offsets of each, carefully handling fixed position
items and stacking contexts that create new reference frames.
Additionally, we remove the complexity of the pre-computed page scroll
offset, instead opting to send script scrolls to the layout task in
order to more quickly have a ScrollState there that matches the
script's idea of the scroll world.

Fixes #16405.
2017-05-16 15:27:09 +02:00
bors-servo
0388e11db2 Auto merge of #16880 - froydnj:bindgen-informative-failure, r=emilio
provide more information when bindgen fails

Providing the flags we passed into clang can be informative for double-checking that we set everything up correctly.

- [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).

<!-- 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/16880)
<!-- Reviewable:end -->
2017-05-16 07:19:53 -05:00
Simon Sapin
984d696717 Turns out, we never actual hash selectors 2017-05-16 10:24:50 +02:00
Simon Sapin
fd357f08cf Add size_of tests for geckolib selectors 2017-05-16 10:24:41 +02:00
Simon Sapin
cf2ae86373 Add size_of_test crate 2017-05-16 10:12:51 +02:00
bors-servo
1afc89e944 Auto merge of #16888 - upsuper:bug1328319, r=heycam,Manishearth,SimonSapin
Implement @counter-style for stylo

Servo side change of [bug 1328319](https://bugzilla.mozilla.org/show_bug.cgi?id=1328319).

<!-- 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/16888)
<!-- Reviewable:end -->
2017-05-16 01:17:07 -05:00
Xidorn Quan
21e0c10995 Update binding files. 2017-05-16 14:42:50 +10:00
Xidorn Quan
ff1ac8346f Make stylo use counter-style for list-style-type and counter functions. 2017-05-16 14:42:48 +10:00
Xidorn Quan
3e00a91e20 Enable querying counter-style rule on Servo backend. 2017-05-16 14:42:46 +10:00
Xidorn Quan
0667287bf6 Relax the requirement of Atom::with. 2017-05-16 14:42:45 +10:00
Xidorn Quan
9354e90afc Set atom identifier for counter style names in @counter-style rule. 2017-05-16 14:42:43 +10:00
Xidorn Quan
138fa4ca08 Change ToNsCssValue to take the ownership of value. 2017-05-16 14:42:42 +10:00
Xidorn Quan
f733958f2e Add bindings for list and pair list value of nsCSSValue. 2017-05-16 14:42:40 +10:00
Xidorn Quan
0722031726 Small changes to AdditiveTuple struct. 2017-05-16 14:42:38 +10:00
Xidorn Quan
fdb29e15a4 Add binding for setting pair value of nsCSSValue. 2017-05-16 14:42:36 +10:00
Xidorn Quan
3ea2f3a16c Add support for auto value in nsCSSValue sugar. 2017-05-16 14:42:35 +10:00
Xidorn Quan
11ac1e894e Add basic integration of @counter-style. 2017-05-16 14:42:33 +10:00
bors-servo
7ca393a960 Auto merge of #16874 - bholley:applicable_declarations_smallvec, r=emilio
Use a SmallVec when gathering applicable declarations

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

<!-- 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/16874)
<!-- Reviewable:end -->
2017-05-15 23:19:43 -05:00
bors-servo
180edaab60 Auto merge of #16860 - glennw:preserve3d, r=mbrubeck
Update WR (preserve-3d, AA improvements)

<!-- 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/16860)
<!-- Reviewable:end -->
2017-05-15 21:49:35 -05:00
Alan Jeffrey
607e011b05 Renamed constellation::Frame to constellation::BrowsingContext. 2017-05-15 21:03:11 -05:00
bors-servo
161dc666b0 Auto merge of #16878 - emilio:pseudos, r=bholley,xidorn,hiro
stylo: Rework pseudo-elements to support pseudo selectors with state.

<!-- 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/16878)
<!-- Reviewable:end -->
2017-05-15 20:46:42 -05:00
Glenn Watson
d175986501 Update WR (ellipse border-radius clip, preserve-3d functionality). 2017-05-16 11:09:40 +10:00
Emilio Cobos Álvarez
fe8da51fee
Bug 1364412: Properly reject to parse pseudo-element states that don't support state. r=bholley
MozReview-Commit-ID: KQCFPtOTGQI
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-16 02:53:44 +02:00
Emilio Cobos Álvarez
1e0edf4909
Bug 1364412: Expose pseudo-element flags, and properly reject pseudos in non-UA sheets. r=bholley
MozReview-Commit-ID: KYC1ywfI7Lg
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-16 02:53:43 +02:00
Emilio Cobos Álvarez
5820e3ecac
Bug 1364412: Convert pseudo-elements to an enum. r=hiro,xidorn 2017-05-16 02:53:41 +02:00
Emilio Cobos Álvarez
0bc185f1c2
Bug 1364412: Properly handle state restyle hints for pseudo-elements. r=bholley 2017-05-16 02:49:39 +02:00
Emilio Cobos Álvarez
de680b06fe
Bug 1364412: Track pseudo-element's state dependencies too. r=heycam
MozReview-Commit-ID: 8zOE7TyW1xi
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-16 02:49:37 +02:00
Emilio Cobos Álvarez
737c7f1f63
Bug 1364412: Simplify Servo_HasAuthorSpecifiedRules looking at the pseudo style. r=bholley
MozReview-Commit-ID: HpV92ttZGJz
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-16 02:49:34 +02:00
Emilio Cobos Álvarez
84f5a90668
Bug 1364412: Use the pseudo selector to reject state selectors. r=bholley
MozReview-Commit-ID: 73dnp6nZpdU
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-16 02:49:30 +02:00
Emilio Cobos Álvarez
dd38740ece
Bug 1364412: Store full selectors in the Rule object. r=bholley
MozReview-Commit-ID: EKLKxNCghLD
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-16 02:49:26 +02:00
Emilio Cobos Álvarez
10560ae043
Bug 1364412: Allow pseudo-element selectors to store state. r=bholley
MozReview-Commit-ID: CzAwg2uxqO2
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-16 02:49:22 +02:00
bors-servo
5403c2fff0 Auto merge of #16864 - CJKu:bug-1364273, r=heycam
Stylo: Change mask-repeat initial value from no-repeat to repeat.

<!-- Please describe your changes on the following line: -->
Change mask-repeat initial value from no-repeat to repeat.

Gecko bug link:
https://bugzilla.mozilla.org/show_bug.cgi?id=1364273
---
<!-- 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: -->
- [ ] 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/16864)
<!-- Reviewable:end -->
2017-05-15 19:42:57 -05:00
Matt Brubeck
181c71fbb8 Fix markdown warning in parse_product doc comment 2017-05-15 17:13:52 -07:00
bors-servo
5bd6b92494 Auto merge of #16862 - CJKu:bug-1310885-part-6, r=heycam
stylo: Pass Cached ImageValue from stylo back to gecko

<!-- Please describe your changes on the following line: -->
This is  part 6 ~ part 9 patch in bug 1310885

gecko bug link:
https://bugzilla.mozilla.org/show_bug.cgi?id=1310885
---
<!-- 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: -->
- [ ] 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/16862)
<!-- Reviewable:end -->
2017-05-15 18:04:59 -05:00
alajara
431b263790 Create higher-level APIs for manipulating custom structured clones. 2017-05-15 18:27:24 -04:00
Sumit
3ca89204ff Mutation Observer API 2017-05-15 18:15:38 -04:00
bors-servo
a51da06dd9 Auto merge of #16877 - bzbarsky:moz-anonymous-content, r=emilio
Implement :-moz-anonymous-content in stylo

<!-- 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
- [X] These changes fix https://bugzilla.mozilla.org/show_bug.cgi?id=1364591

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they're tested by Gecko tests.

<!-- 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/16877)
<!-- Reviewable:end -->
2017-05-15 16:38:14 -05:00
Jonathan Guillotte-Blouin
6a4173fbeb Bug 1270740 - remove requestAutocomplete reference 2017-05-15 14:23:30 -07:00
Nathan Froyd
22db4b4823 provide more information when bindgen fails
Providing the flags we passed into clang can be informative for
double-checking that we set everything up correctly.
2017-05-15 17:02:34 -04:00
Nazım Can Altınova
3acb3ca094
stylo: Continue to propagate quirks mode information to Servo 2017-05-15 23:52:49 +03:00
bors-servo
fa251ec96b Auto merge of #16295 - jdm:transition-safety, r=nox
Root nodes for the duration of their CSS transitions

This ensures that we can pass a node address as part of the asynchronous
transition end notification, making it safe to fire the corresponding
DOM event on the node from the script thread. Without explicitly rooting
this node when the transition starts, we risk the node being GCed before
the transition is complete.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14972
- [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/16295)
<!-- Reviewable:end -->
2017-05-15 15:00:19 -05:00
Boris Zbarsky
c5cd84392f Implement :-moz-native-anonymous support in stylo.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1364591
2017-05-15 15:58:20 -04:00
Boris Zbarsky
5ddf455235 Fix style sharing cache lookups to compare ids of the two elements.
Otherwise we can have a situation like this:

  <style>
    .notmatching > #foo {}
  </style>
  <span id="foo"></span>
  <span></span>

and the style sharing cache lookup for the second <span> would try to revalidate
against the cached value for the first <span>, but end up failing asserts about
the two elements matching lists of revalidation selectors that have the same
length.
2017-05-15 15:55:05 -04:00