Commit graph

28547 commits

Author SHA1 Message Date
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
bors-servo
c04a29b6e9 Auto merge of #17420 - glennw:update-wr-pbo, r=jdm
Update WR (optimizations, local clip rect).

* PBO optimization for GPU cache updates.
* Alpha rectangle optimizations.
* Local clip rect 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/17420)
<!-- Reviewable:end -->
2017-06-20 00:39:18 -07: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
Glenn Watson
7a98b18ed7 Update WR (optimizations, local clip rect).
* PBO optimization for GPU cache updates.
* Alpha rectangle optimizations.
* Local clip rect improvements.
2017-06-20 14:54:32 +10: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
Glenn Watson
6c9e305442 Ensure that rAF callbacks which don't mutate the DOM, but aren't
yet considered spurious force a reflow / composite / animation tick cycle.
2017-06-20 12:42:14 +10: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
Glenn Watson
c8255922a9 Improve decisions in compositor over when to draw a frame.
This patch fixes a couple of issues in the compositor:

1) Remove the delayed composition code. Previously, this would schedule
   a composite for 12ms in the future. This doesn't really make any sense
   with WR. There's no point in doing a composite unless WR has provided
   a new frame to be drawn. This fixes issues in several benchmarks where
   we were doing multiple composite / renders per rAF, which is a waste
   of CPU time. This *does* make the framerate slower in some cases (such
   as a slow rAF callback) but it's more correct - otherwise we were just
   compositing the same frame multiple times for no real benefit.

2) Inform the window of the current animation state of the compositor.
   Specifically, if an animation (or rAF) is currently active, the
   window system switches to use event polling, and does not block on
   the OS-level event loop. In the case of active animation, we just
   assume that we want to be running as the vsync interval and not
   blocking. This means the compositor thread only sleeps on vsync
   during animation, which reduces OS scheduling and results in much
   smoother animation.
2017-06-20 08:47:14 +10: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
Pyfisch
284cb8aae8 Fix several bugs related to scrolling
* scrollLeft/scrollTop returned values of parent or even document root
   Only the scroll of the node itself is returned. Otherwise 0.0.
* Scrolling via script had set viewport.
   This resulted in other nodes appearing scrolled.
   Now scroll_offsets are updated with correct node id.

These bugs caused other odd behavior like both body and
document.documentElement being scrolled or the view for scrolled
elements jumping.
2017-06-19 21:43:35 +02:00
bors-servo
4ecddb0622 Auto merge of #17409 - 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. -->
2017-06-19 11:46:52 -07: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
Ravi Shankar
c145dd7b0c Cleanup some old code 2017-06-18 21:18:43 -07: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
Mantaroh Yoshinaga
d32948c46a Add the disable anotation of filter's css-tests in order to skip timeout fail. 2017-06-19 10:44:23 +09:00
bors-servo
3a4bd24549 Auto merge of #17397 - heycam:might-have-attr-state-fixes, r=emilio
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-18 18:34:05 -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
bors-servo
8c58736989 Auto merge of #17393 - servo:jdm-patch-9, r=emilio
Don't report the charade package as an error.

DependencyCI does not like that the charade package has been removed from PyPi. This is really not something we care about, though. It's an upstream part of html5lib which is used in the web-platform-tests, and I've filed https://github.com/w3c/web-platform-tests/issues/6269 about replacing it.

<!-- 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/17393)
<!-- Reviewable:end -->
2017-06-18 13:21:43 -07:00
Josh Matthews
53ac975ff0 Don't report the charade package as an error. 2017-06-18 15:20:33 -04:00
bors-servo
348c282407 Auto merge of #17389 - glennw:revert, r=jdm
Update WR (unrevert border snapping code).

<!-- 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/17389)
<!-- Reviewable:end -->
2017-06-18 09:07:35 -07:00
bors-servo
568ab55005 Auto merge of #17390 - servo:untry, r=nox
Untry

<!-- 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/17390)
<!-- Reviewable:end -->
2017-06-18 05:55:11 -07: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
bors-servo
4c5f7bfaa3 Auto merge of #17386 - bzbarsky:locale-dir-not-revalidation, r=emilio
:-moz-locale-dir shouldn't be a revalidation selector.

Fixes Gecko bug 1374019 <https://bugzilla.mozilla.org/show_bug.cgi?id=1374019>

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

<!-- 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/17386)
<!-- Reviewable:end -->
2017-06-18 02:14:22 -07:00
Alexis Beingessner
265f81f002 Update WR (unrevert border snapping code). 2017-06-18 16:17:12 +10: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
bors-servo
c5433277b4 Auto merge of #17384 - emilio:stylist-attr-dep, r=nox
style: Clean up some stylist code and make it slightly more efficient.

<!-- 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/17384)
<!-- Reviewable:end -->
2017-06-17 06:20:45 -07:00
Emilio Cobos Álvarez
61a4ba3e79
style: Clean up some stylist code and make it slightly more efficient. 2017-06-17 15:18:05 +02:00
bors-servo
effd6f2f87 Auto merge of #17382 - servo:derive-all-the-things, r=emilio
Derive more ToCss impls

<!-- 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/17382)
<!-- Reviewable:end -->
2017-06-17 04:53:32 -07:00
Anthony Ramine
bc9bc1d340 Rename LengthOrPercentageOrAutoOrContent to FlexBasis 2017-06-17 13:46:35 +02:00