Commit graph

27683 commits

Author SHA1 Message Date
Simon Sapin
eb98ae6e04 Update cssparser to 0.18
https://github.com/servo/rust-cssparser/pull/171
2017-07-24 11:39:12 +02:00
bors-servo
30d6d6024b Auto merge of #17834 - emilio:animation-fc-crash, r=heycam
stylo: Fix the interaction of frame construction restyles with animation restyles.

Fixes bug 1383001.
2017-07-24 01:09:24 -07:00
Emilio Cobos Álvarez
6e3397b907
style: Remove outdated comments. 2017-07-24 10:07:39 +02:00
Emilio Cobos Álvarez
f2fe3facf3
style: Update has_current_styles_for_this_traversal to not look at animation hints in non-animation traversals.
MozReview-Commit-ID: 4bwwIGcoXqA
2017-07-24 10:05:48 +02:00
Emilio Cobos Álvarez
9d21f9e6ce
style: Remove (mostly) unused has_current_styles.
MozReview-Commit-ID: DV9HfvbUjBY
2017-07-24 10:05:37 +02:00
Emilio Cobos Álvarez
55d9151dd3
style: Minor reformatting.
MozReview-Commit-ID: KVCfX3LqccF
2017-07-24 10:05:26 +02:00
Emilio Cobos Álvarez
689ee54db3
stylo: Don't try to do an animation-only restyle if we're styling newly-inserted content.
It makes just no sense, and I'd rather not complicate the logic in the traversal
implementations, seems easy to just handle it here.

MozReview-Commit-ID: 3PnT2Jyta8g
2017-07-24 10:05:18 +02:00
Emilio Cobos Álvarez
9d0023873e
stylo: Improve the information the "styles not up-to-date" assertion gives back.
Always I end up debugging it I end up adding a bunch of printlns near it. This
should be clearer.

MozReview-Commit-ID: ITpfi9tXAw3
2017-07-24 10:05:10 +02:00
Emilio Cobos Álvarez
8f152563dd
stylo: Stop claiming to support unstyled children traversals for throttled animations.
The whole concept made me laugh a bit actually :)

MozReview-Commit-ID: 1KJrUYuaHxL
2017-07-24 10:04:55 +02:00
bors-servo
a47fde038e Auto merge of #17831 - birtles:property-priorities, r=heycam
Iterate through properties in priority order when computing keyframes

This is largely just a translation of Gecko's PropertyPriorityIterator[1] into rust with the exception that IDL sort order is only defined for shorthands since that's all we currently require.

[1] http://searchfox.org/mozilla-central/rev/3a3af33f513071ea829debdfbc628caebcdf6996/dom/animation/KeyframeUtils.cpp#151

---
<!-- 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 --stylo` does not report any errors
- [x] These changes fix (Gecko bug 1371493)[https://bugzilla.mozilla.org/show_bug.cgi?id=1371493].
- [x] There are tests for these changes OR

<!-- 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/17831)
<!-- Reviewable:end -->
2017-07-23 21:54:12 -07:00
Brian Birtles
8e7011da8a Iterate through properties in priority order when computing keyframes
This is largely just a translation of Gecko's
PropertyPriorityIterator[1] into rust with the exception that IDL sort
order is only defined for shorthands since that's all we currently
require.

[1] http://searchfox.org/mozilla-central/rev/3a3af33f513071ea829debdfbc628caebcdf6996/dom/animation/KeyframeUtils.cpp#151
2017-07-24 13:50:18 +09:00
bors-servo
46ffcbaf7b Auto merge of #17814 - glennw:update-wr-text-decorations, r=emilio
Update WR (switch to new text-decorations API in WR).

This only makes use of the "Solid" text decoration type, which
matches the existing support. WR now supports dotted, dashed
and wavy text decorations, but supporting those will need some
extra work in Servo to pass through the correct values.

<!-- 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/17814)
<!-- Reviewable:end -->
2017-07-23 20:04:38 -07:00
Glenn Watson
dc82366f72 Update WR (switch to new text-decorations API in WR).
This only makes use of the "Solid" text decoration type, which
matches the existing support. WR now supports dotted, dashed
and wavy text decorations, but supporting those will need some
extra work in Servo to pass through the correct values.
2017-07-24 13:02:21 +10:00
bors-servo
104c79dbf2 Auto merge of #17829 - emilio:visited-nit, r=Manishearth
style: Mention when visited styles may be disabled.

<!-- 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/17829)
<!-- Reviewable:end -->
2017-07-23 15:06:44 -07:00
Emilio Cobos Álvarez
533ea86bab
style: Mention when visited styles may be disabled. 2017-07-24 00:04:45 +02:00
bors-servo
2241d5879e Auto merge of #17828 - emilio:visited-now, r=Manishearth
stylo: Visited link fixes.

Straight from https://bugzilla.mozilla.org/show_bug.cgi?id=1383307

<!-- 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/17828)
<!-- Reviewable:end -->
2017-07-23 13:46:43 -07:00
Emilio Cobos Álvarez
0e855ea8e3
stylo: Set the relevant link visited bit from servo.
MozReview-Commit-ID: 3MCYLp7HaAs
2017-07-23 22:37:48 +02:00
Emilio Cobos Álvarez
9b2d96f7e7
stylo: Honor the relevant link visited pref.
MozReview-Commit-ID: D5NiEJUpONQ
2017-07-23 22:37:47 +02:00
Emilio Cobos Álvarez
04e855c38d
style: Fix relevant-link-visited logic in presence of nested links.
MozReview-Commit-ID: LIjpTAgrPBY
2017-07-23 22:12:47 +02:00
Emilio Cobos Álvarez
aea24fa81e
style: Update bindings. 2017-07-23 22:12:37 +02:00
bors-servo
548d65dc7a Auto merge of #17827 - cynicaldevil:fix-step-annotations, r=jdm
Update step annotations in script's prepare method

<!-- Please describe your changes on the following line: -->
The step annotations in the code were outdated, and did not match the spec: https://html.spec.whatwg.org/multipage/scripting.html#prepare-a-script

<!-- 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/17827)
<!-- Reviewable:end -->
2017-07-23 12:45:22 -07:00
Nikhil Shagrithaya
15ac245ae7 Update step annotations in script's prepare method 2017-07-24 00:20:07 +05:30
bors-servo
5b3bb04d4a Auto merge of #17826 - emilio:visited-not-yet, r=emilio
stylo: Remove the visited bit for now since it doesn't account for the pref.

I'll fix before landing the Gecko changes for bug 1383307, so this doesn't break
anything yet.
2017-07-23 05:53:47 -07:00
Emilio Cobos Álvarez
57a761f4ff
stylo: Remove the visited bit for now since it doesn't account for the pref.
I'll fix before landing the Gecko changes for bug 1383307, so this doesn't break
anything yet.
2017-07-23 14:51:39 +02:00
bors-servo
14b12eeb3b Auto merge of #17825 - emilio:is-visited, r=manishearth
style: Move the RELEVANT_LINK_VISITED flag to servo.

Bug: 1383307
Reviewed-by: Manishearth

<!-- 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/17825)
<!-- Reviewable:end -->
2017-07-23 04:15:39 -07:00
Emilio Cobos Álvarez
4e0492c5d1
style: Move the RELEVANT_LINK_VISITED flag to servo.
And kill one GetParentAllowServo call while at it, and some other dumbness...

Bug: 1383307
Reviewed-by: Manishearth
2017-07-23 05:22:18 +02:00
bors-servo
d0561e76df Auto merge of #17824 - emilio:debug-par-layout, r=stshine
layout: Make -Z show-parallel-layout show something useful again.

I broke this when we switched to rayon, but now rayon added support for getting the worker index there's no reason for not bringing it back to life.

<!-- 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/17824)
<!-- Reviewable:end -->
2017-07-22 17:50:21 -07:00
Emilio Cobos Álvarez
1c5d522742
layout: Make -Z show-parallel-layout show something useful again. 2017-07-23 01:47:47 +02:00
bors-servo
d8b3f9bc5c Auto merge of #17823 - servo:rustup, r=Manishearth
Upgrade to rustc 1.20.0-nightly (504328a31 2017-07-21)

and cargo 0.21.0-nightly (ffab51954 2017-07-18).

The latter adds support for the `[patch]` section of `Cargo.toml`:

http://doc.crates.io/manifest.html#the-patch-section
http://doc.crates.io/specifying-dependencies.html#overriding-dependencies

<!-- 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/17823)
<!-- Reviewable:end -->
2017-07-21 21:47:51 -07:00
Simon Sapin
9a186268bf Upgrade to rustc 1.20.0-nightly (504328a31 2017-07-21)
and cargo 0.21.0-nightly (ffab51954 2017-07-18).

The latter adds support for the `[patch]` section of `Cargo.toml`:

http://doc.crates.io/manifest.html#the-patch-section
http://doc.crates.io/specifying-dependencies.html#overriding-dependencies
2017-07-22 06:29:38 +02:00
bors-servo
e4ac067a9b Auto merge of #17819 - emilio:text-combined, r=xidorn
stylo: Set the NS_STYLE_IS_TEXT_COMBINED flag.

This should fix at least
layout/reftests/writing-mode/1135361-ruby-justify-1.html

<!-- 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/17819)
<!-- Reviewable:end -->
2017-07-21 17:30:05 -07:00
Emilio Cobos Álvarez
b576229567
stylo: Set the NS_STYLE_IS_TEXT_COMBINED flag.
This should fix at least
layout/reftests/writing-mode/1135361-ruby-justify-1.html
2017-07-22 02:29:36 +02:00
bors-servo
9b276565f8 Auto merge of #17822 - Manishearth:die-stylearc-die, r=bzbarsky
Remove last vestiges of stylearc

<!-- 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/17822)
<!-- Reviewable:end -->
2017-07-21 15:47:54 -07:00
Manish Goregaokar
01b1027365 Remove last vestiges of stylearc 2017-07-21 14:39:51 -07:00
bors-servo
76ad913870 Auto merge of #17634 - asajeffrey:canvas-image-css-style-value, r=jdm
Implement drawing an image from a CSS style value into a canvas

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

Implemented drawing a CSS style value into a canvas, which is needed for the Houdini CSS Paint API.

This PR is dependent on #17364.

---
<!-- 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 #17432.
- [X] These changes do not require tests because the existing CSS paint API wpt test cases test this behaviour.

<!-- 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/17634)
<!-- Reviewable:end -->
2017-07-21 14:39:47 -07:00
Alan Jeffrey
2318caf002 Implement drawing an image from a CSS style value into a canvas. 2017-07-21 16:39:11 -05:00
bors-servo
d1c4d7a6af Auto merge of #17817 - emilio:always-be-removing-the-ugly, r=stshine
style: Move a conditional import to where it's used.

To avoid yet another cfg().

<!-- 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/17817)
<!-- Reviewable:end -->
2017-07-21 13:31:13 -07:00
bors-servo
4bf8e4413e Auto merge of #17821 - bzbarsky:pseudo-prop-restrictions, r=emilio
Implement restrictions on which properties apply to which pseudo-elements

::first-line, ::first-letter, and ::placeholder don't allow all properties to apply to them.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they're Gecko-only for the moment, and Gecko has 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/17821)
<!-- Reviewable:end -->
2017-07-21 12:15:50 -07:00
Boris Zbarsky
86b3b6a32f Filter out non-applying properties when cascading style for ::first-letter/::first-line/::placeholder. r=emilio
Part 3 of the fix for Gecko bug 1382786 <https://bugzilla.mozilla.org/show_bug.cgi?id=1382786>.
2017-07-21 14:16:06 -04:00
Boris Zbarsky
592a96fc06 Flag properties that apply to ::first-letter/::first-line/::placeholder. r=emilio
Part 2 of the fix for Gecko bug 1382786 <https://bugzilla.mozilla.org/show_bug.cgi?id=1382786>.
2017-07-21 14:15:42 -04:00
Boris Zbarsky
e05058d2b9 Add property flags for which properties apply to certain pseudo-elements. r=emilio
These flags can be used to flag properties that apply to ::first-letter, ::first-line, and ::placeholder

Part 1 of the fix for Gecko bug 1382786 <https://bugzilla.mozilla.org/show_bug.cgi?id=1382786>.
2017-07-21 14:09:41 -04:00
bors-servo
992c647f76 Auto merge of #17818 - Manishearth:stylo-fixup, r=heycam
stylo: Various ComputedValues fixes

r=heycam https://bugzilla.mozilla.org/show_bug.cgi?id=1382017

<!-- 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/17818)
<!-- Reviewable:end -->
2017-07-21 11:05:13 -07:00
Manish Goregaokar
b332a061b4 stylo: Rename ServoComputedValues -> ServoComputedData
ServoComputedValues is confusing because ComputedValues is actually
ServoStyleContext on the C++ side.
2017-07-21 11:04:45 -07:00
bors-servo
d1ac8b26e9 Auto merge of #17813 - upsuper:supports-decl, r=SimonSapin
Store raw string for prop decl in @supports

This fixes the serialization issue of `@supports` rule that whitespaces are not preserved like in other browsers.

It makes the work a bit redundant (the property name and colon is parsed twice), but I suppose this isn't a big deal.

<!-- 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/17813)
<!-- Reviewable:end -->
2017-07-21 09:01:57 -07:00
Emilio Cobos Álvarez
3f323dde10
style: Move a conditional import to where it's used.
To avoid yet another cfg().
2017-07-21 17:41:56 +02:00
Manish Goregaokar
cca0eacf80 stylo: Remove usage of ServoComputedValues from most Gecko code 2017-07-21 08:33:33 -07:00
Manish Goregaokar
3c3e4399da stylo: Remove usage of ServoComputedValues from binding functions 2017-07-21 08:33:11 -07:00
Manish Goregaokar
9776d070ea stylo: Replace stylearc with servo_arc 2017-07-21 08:30:39 -07:00
bors-servo
291c9576cf Auto merge of #17816 - ferjm:pwm-tests, r=jdm
PWM tests

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [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/17816)
<!-- Reviewable:end -->
2017-07-21 06:22:58 -07:00
Fernando Jiménez Moreno
585d0e52af PWM tests 2017-07-21 15:10:04 +02:00