Commit graph

14839 commits

Author SHA1 Message Date
bors-servo
f62a3e0812 Auto merge of #17424 - KuoE0:expose-moz-context-properties-on-stylo, r=heycam
Expose -moz-context-properties on stylo

<!-- Please describe your changes on the following line: -->

Gecko already exposed `-moz-context-properties` behind pref `svg.context-properties.content.enabled`. I think we should do the same thing on stylo and make the reftests of `context-fill` and `context-stroke` pass.

---
<!-- 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 [Bug 1370797](https://bugzilla.mozilla.org/show_bug.cgi?id=1370797)

<!-- 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/17424)
<!-- Reviewable:end -->
2017-06-21 03:32:59 -07:00
bors-servo
82884050be Auto merge of #17421 - cbrewster:set_attribute_node_fix, r=emilio
Fix crash when id attribute is set via SetAttributeNode

fixes #17366
<!-- 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/17421)
<!-- Reviewable:end -->
2017-06-21 01:04:18 -07:00
bors-servo
cedd5222d2 Auto merge of #17440 - emilio:bindgen-up, r=upsuper
Update bindgen to 0.26.1.

<!-- 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/17440)
<!-- Reviewable:end -->
2017-06-20 16:42:16 -07:00
Emilio Cobos Álvarez
8a9949f929
style: Update bindings. 2017-06-21 01:27:16 +02:00
Emilio Cobos Álvarez
e8db09766d
style: Update bindgen. 2017-06-21 01:27:14 +02:00
Connor Brewster
2ccf729aa3 Fix crash when id attribute is set via SetAttributeNode 2017-06-20 10:34:33 -06:00
bors-servo
b50cf33efd Auto merge of #17431 - emilio:restyle-hints-xbl, r=emilio
style: Cleanup after #17427, and remove extra-optimistic optimization added in #17429.

This just addresses my review comments in #17427, and removes a wrong optimization I added in #17429 thinking it was correct.

<!-- 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/17431)
<!-- Reviewable:end -->
2017-06-20 08:13:05 -07:00
Emilio Cobos Álvarez
ce9cd802de
style: Clean up after #17427. 2017-06-20 15:42:23 +02:00
Emilio Cobos Álvarez
84a8bbc8a6
style: Remove extra-optimistic optimization.
We can't really do this :(
2017-06-20 15:36:16 +02:00
bors-servo
fc2c5b7ef4 Auto merge of #17402 - servo:derive-all-the-things, r=emilio
Use generics for the filter property

<!-- 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/17402)
<!-- Reviewable:end -->
2017-06-20 06:23:17 -07:00
bors-servo
b2549bb6c4 Auto merge of #17427 - CJKu:cku-master, r=emilio
Stylo: Correct style match for element instances under a use-element …

<!-- Please describe your changes on the following line: -->
This patch is the last one of bug 265894.
It fixes two things:
1. Do not cross shadow tree boundary while matching rules.
2. Change display value to 'inline' while cloning a root symbol element instance.

Bugzilla link:
https://bugzilla.mozilla.org/show_bug.cgi?id=265894
---
<!-- 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/17427)
<!-- Reviewable:end -->
2017-06-20 05:17:45 -07:00
Anthony Ramine
6f4061d4ad Use generics for the filter property
This introduces an additional shadow type for drop-shadow().
2017-06-20 13:48:53 +02:00
bors-servo
f5a61684f4 Auto merge of #17429 - emilio:restyle-hints-xbl, r=heycam
style: Get restyle hints right in presence of XBL.

Fixes bug 1371130.

<!-- 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/17429)
<!-- Reviewable:end -->
2017-06-20 04:15:57 -07:00
Emilio Cobos Álvarez
59a0d6616e
style: Update bindings. 2017-06-20 13:09:38 +02:00
Emilio Cobos Álvarez
ae5a6c9c69
style: Get restyle hints right in presence of XBL.
Bug: 1371130
Reviewed-By: heycam
MozReview-Commit-ID: 56lMyXEYT1I
2017-06-20 13:09:36 +02:00
Emilio Cobos Álvarez
459b22a985
style: Invalidate style using the DOM tree, and scan pseudo-elements and NAC separately.
Bug: 1371130
Reviewed-By: heycam
MozReview-Commit-ID: IU1TbVf4Zz9
2017-06-20 12:17:54 +02:00
Emilio Cobos Álvarez
b894c361e0
style: expose methods to get ::before, ::after, and the other NAC.
Reviewed-By: heycam
Bug: 1371130

MozReview-Commit-ID: JVeQevmjI3j
2017-06-20 12:16:31 +02:00
bors-servo
40a3826dd6 Auto merge of #17414 - jyc:space-separator, r=nox
style: Have OneOrMoreSeparated replace OneOrMoreCommaSeparated.

**NOTE** The alternative for me is just to duplicate the ToCss code, which is not bad and is less code changed! Don't know what others would think, though. Looking for feedback!

A future patch series has some values that should be separated by spaces. This
allows us to re-use the code for serialization, but the types do get a little
clunky. The separator is now indicated with an associated type.

<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they shoudl be tested by existing serialization code

<!-- 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/17414)
<!-- Reviewable:end -->
2017-06-20 03:08:11 -07:00
cku
727725ac3d Stylo: Correct style match for element instances under a use-element tree. 2017-06-20 18:07:36 +08:00
Ting-Yu Lin
945c3e4a2b stylo: Fix has_author_specified_rules() for rules in XBL stylesheets (bug 1372062)
MozReview-Commit-ID: GBFgr5pqROk
2017-06-20 15:58:00 +08:00
KuoE0
436f112359 Bug 1370797 - Expose -moz-context-properties on stylo
MozReview-Commit-ID: 2yYuHuKe3Yu
2017-06-20 14:48:45 +08:00
bors-servo
4d997f0d0c Auto merge of #17422 - BorisChiou:stylo/animation/stop_flood_lighting_colors, r=hiro
stylo: Bug 1369625 - Make stop-color, flood-color, lighting-color animatable.

This is an interdependent patch of Bug 1369625. We make stop-color, flood-color, and lighting-color animatable by using IntermediateRGBA as the animation value type, just like 'color'
attribute. On the Gecko-side, we enable/add the reftest of them and update WPT expectations for these properties.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1369625](https://bugzilla.mozilla.org/show_bug.cgi?id=1369625).
- [X] These changes do not require tests because we have tests already in Gekco.

<!-- 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/17422)
<!-- Reviewable:end -->
2017-06-19 23:12:19 -07:00
bors-servo
546c9db7a7 Auto merge of #17400 - hiikezoe:dont-do-normal-traversal-for-animation-only-restyle-element, r=heycam
Don't run normal traversal for animation only restyle element

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

---
<!-- 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

<!-- 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/17400)
<!-- Reviewable:end -->
2017-06-19 20:19:16 -07:00
Boris Chiou
785ef82251 Make stop-color, flood-color, lighting-color animatable.
Use IntermediateRGBA as the animation value type, just like 'color'
attribute.
2017-06-20 10:43:50 +08:00
bors-servo
27add56298 Auto merge of #17418 - bzbarsky:dir-pseudo-classes, r=emilio
Add pseudo-classes to match on the state of the "dir" attribute.

Fixes the servo parts of Gecko bug 1373798 <https://bugzilla.mozilla.org/show_bug.cgi?id=1373798>

<!-- 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=1373798
<!-- 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/17418)
<!-- Reviewable:end -->
2017-06-19 19:25:45 -07:00
Boris Zbarsky
0527190c8f Add pseudo-classes to match on the state of the "dir" attribute.
Fixes the servo parts of Gecko bug 1373798 <https://bugzilla.mozilla.org/show_bug.cgi?id=1373798>
2017-06-19 22:09:03 -04:00
bors-servo
154186f420 Auto merge of #17413 - est31:master, r=cbrewster
Update clipboard to 0.4

Fixes #17271
Fixes #16459

<!-- 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/17413)
<!-- Reviewable:end -->
2017-06-19 18:22:25 -07:00
bors-servo
fa72cd04d9 Auto merge of #17415 - KWierso:backout17409, r=jdm
Revert "Add pseudo-classes to match on the state of the "dir" attribute." for preventing me from backing out a gecko-side patch

The gecko patches in bug 1373798 broke some gecko-side tests, but they also fixed a stylo build failure that started when this commit merged from servo to autoland, so this needs to get reverted so I can cleanly back out those gecko patches.

This reverts commit e4660c2b5b.

<!-- 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: -->
- [ ] `./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
- [ ] 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/17415)
<!-- Reviewable:end -->
2017-06-19 17:21:29 -07:00
Jonathan Chan
26179b3660 style: Have OneOrMoreSeparated replace OneOrMoreCommaSeparated.
A future patch series has some values that should be separated by spaces. This
allows us to re-use the code for serialization, but the types do get a little
clunky. The separator is now indicated with an associated type.
2017-06-19 16:09:37 -07:00
Wes Kocher
10917ce73f Revert "Add pseudo-classes to match on the state of the "dir" attribute." for preventing me from backing out a gecko-side patch
This reverts commit e4660c2b5b.
2017-06-19 15:44:00 -07:00
bors-servo
d700a301d3 Auto merge of #17404 - zuwow:shrink-rulenode, r=bholley
Shrink rulenode

This shrinks rulenode by one word by removing the Option wrapper around the StyleSource and adding None to StyleSource as an additional variant. The issue mentions shrinking by two words but the free_count one was taken care of in #17368.

---
<!-- 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 #17280

Also tested with `./mach test-unit` and `./mach test-stylo` with no errors reported from either.

<!-- Either: -->
- [X] There are tests for these changes

<!-- 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. -->

r? @bholley

<!-- 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/17404)
<!-- Reviewable:end -->
2017-06-19 15:30:21 -07:00
est31
a1e9843d5a Update clipboard to 0.4
Fixes #17271
Fixes #16459
2017-06-20 00:29:28 +02:00
bors-servo
5f10a25ead Auto merge of #17410 - asajeffrey:compositor-nested-rAF-with-reftest-wait, r=jdm
Support nested requestAnimationFrame in the presence of reftest-wait

<!-- Please describe your changes on the following line: -->

Currently, nested rAF callbacks don't get called in the presence of reftest-wait. This PR fixes that.

---
<!-- 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 #17408
- [X] There are tests for these changes

<!-- 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/17410)
<!-- Reviewable:end -->
2017-06-19 13:25:36 -07:00
Alan Jeffrey
eb0eceb16c Support nested requestAnimationFrame in the presence of reftest-wait. 2017-06-19 15:25:02 -05:00
Brian Lewis
0fe381d774 Remove Option wrapper from RuleNode's StyleSource to save one word, add
a None variant to StyleSource as an indicator for a lack of style
source, and refactor all uses with this new form
2017-06-19 21:50:56 +02:00
Boris Zbarsky
e4660c2b5b Add pseudo-classes to match on the state of the "dir" attribute.
Fixes the servo parts of Gecko bug 1373798 <https://bugzilla.mozilla.org/show_bug.cgi?id=1373798>
2017-06-19 14:44:12 -04:00
Hiroyuki Ikezoe
a3da636f69 Don't traverse any elements that needed only for animation-only restyles in normal traversal.
Before this patch, we were setting the dirty descendants bit in animation-only
restyles and it triggered unnecessary traversal for elements that does not need
the traversal (i.e no need selector matching).
2017-06-19 15:01:17 +09:00
Hiroyuki Ikezoe
5a8e2562d5 Check the child is unstyled without creating element data in preprocess_children.
If we check it and skip the child after ensure_element_data() call,
the child will have an empty element data, so we will succeed
element_data.is_some() check unexpectedly.
2017-06-19 14:56:27 +09:00
Hiroyuki Ikezoe
028c0e4a43 Don't traverse elements that have no style data in animation-only restyle.
Animation-only restyle only works with elements that have already been styled.
2017-06-19 14:55:58 +09:00
Hiroyuki Ikezoe
9b166c5cda Use mutate_data() instead of get_data().map() with borrow_mut(). 2017-06-19 14:55:36 +09:00
bors-servo
e41b7d06b4 Auto merge of #17288 - mantaroh:filter, r=hiro
Make filter property animatable.

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

---
<!-- 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: -->
There are tests for these changes, a test case will be landed in web-platform-tests in https://bugzilla.mozilla.org/show_bug.cgi?id=1362897

<!-- 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/17288)
<!-- Reviewable:end -->
2017-06-18 20:28:16 -07:00
Cameron McCormack
accd2752ce style: Make checks for attribute/state dependencies take stylist dirty state into account.
This is a follow-up Servo-side change for https://bugzilla.mozilla.org/show_bug.cgi?id=1352306
which caused some test failures on landing.
2017-06-19 09:33:02 +08:00
Mantaroh Yoshinaga
b9f6994dcc Add compute distance for Filter. 2017-06-19 09:47:26 +09:00
Mantaroh Yoshinaga
87e580a33d Make filter property animatable. 2017-06-19 09:47:26 +09:00
Mantaroh Yoshinaga
0ca9a01be4 Add function which convert from URLValueData to SpecifiedUrl.
We will need to convert from URLValueData to SpecifiedUrl when cloning the
stylo's data from gecko's data. Because the filter structure on gecko has url as
URLValue type. We will use this convert function when interpolating as
discrete also(Bug 1368610).
2017-06-19 09:47:26 +09:00
Mantaroh Yoshinaga
ccf08bcead Preserve the unit when interpolating/adding angles with matching units.
If the units of two angles being interpolated/added matches, we should preserve
the original unit; otherwise, we fall back to radians. This matches the behavior
of Gecko.
2017-06-19 09:47:26 +09:00
Simon Sapin
316cd35767 Untry 2017-06-18 13:21:51 +02:00
Simon Sapin
7af5a7fd54 Untry script 2017-06-18 13:21:49 +02:00
Simon Sapin
a5bb55790f Untry style 2017-06-18 13:18:13 +02:00
Boris Zbarsky
eddca4d6f6 :-moz-locale-dir shouldn't be a revalidation selector.
Fixes Gecko bug 1374019 <https://bugzilla.mozilla.org/show_bug.cgi?id=1374019>
2017-06-17 23:01:02 -04:00