Commit graph

4994 commits

Author SHA1 Message Date
Manish Goregaokar
7cdcfa0f8e stylo: Use saturating ops for clip computation
MozReview-Commit-ID: DYQRM4CJbAg
2017-07-25 14:29:05 -07:00
bors-servo
e825bf1442 Auto merge of #17850 - upsuper:bug1382077, r=heycam
Record viewport unit usage and generate proper restyle hint

This is the Servo side change of [bug 1382077](https://bugzilla.mozilla.org/show_bug.cgi?id=1382077).
2017-07-25 02:09:45 -07:00
Xidorn Quan
388875ca44 Record viewport unit usage and generate proper restyle hint. 2017-07-25 19:02:21 +10:00
Cameron McCormack
e36b4340e1 style: Ensure we generate a ReconstructFrame hint when -moz-binding changes on a display:none root. 2017-07-25 15:50:00 +08:00
bors-servo
bf16b146e8 Auto merge of #17839 - heycam:opacity-smil, r=hiro
style: allow out-of-range opacity values for SMIL animations

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

<!-- 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/17839)
<!-- Reviewable:end -->
2017-07-24 19:13:08 -07:00
Manish Goregaokar
9c6f11c965 Allow nonstandard font-weight values for system fonts 2017-07-24 17:24:25 -07:00
bors-servo
a35c8f08e2 Auto merge of #17832 - birtles:disallow-playstate-keyframes, r=emilio
Only allow animation-timing-function in @keyframes

CSS animations used to erroneously indicate that 'animation-play-state' is permitted in @keyframes. It is not and it'ss non-sensical to allow it there. This mistake was faithfully transferred into Servo code (although we also make 'animation-timing-function' which is what the spec text meant to say).

The spec has [been updated](adeb3434c5) and so we should update the Servo code accordingly.

---
<!-- 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: -->
- [x] 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/17832)
<!-- Reviewable:end -->
2017-07-24 15:50:20 -07:00
bors-servo
897f5d8884 Auto merge of #17844 - emilio:is-visited, r=bholley
stylo: Read mName as a raw nsIAtom* from NodeInfoInner.

Changes for bug 1383756.
2017-07-24 13:22:49 -07:00
Emilio Cobos Álvarez
0e80710ee7
style: Update NodeInfo bindings. 2017-07-24 22:04:16 +02:00
bors-servo
723b21b669 Auto merge of #17841 - ferjm:bug1380890.column, r=jdm
stylo: make GetRuleColumn report a 1-based value

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

- [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/17841)
<!-- Reviewable:end -->
2017-07-24 07:55:06 -07:00
Ehsan Akhgari
aeb2b8b098 stylo: Read mName as a raw nsIAtom* from NodeInfoInner. 2017-07-24 10:40:58 -04:00
Fernando Jiménez Moreno
5cabb0f86b stylo: make GetRuleColumn report a 1-based value 2017-07-24 15:28:02 +02:00
bors-servo
4f0821192c Auto merge of #17820 - servo:token-cache, r=emilio
Update cssparser to 0.18

Do not merge yet, depends on https://github.com/servo/rust-cssparser/pull/171.

<!-- 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/17820)
<!-- Reviewable:end -->
2017-07-24 06:27:00 -07:00
Cameron McCormack
6171b5c465 style: Don't clamp Opacity values when computing them for SMIL. 2017-07-24 20:47:34 +08:00
Cameron McCormack
c81d62d36f style: Record on a computed::Context whether we are computing a SMIL animated value. 2017-07-24 20:47:33 +08:00
Emilio Cobos Álvarez
b4d26619d3
style: Improve the assertion message in restyle_kind(). 2017-07-24 12:13:19 +02:00
Emilio Cobos Álvarez
af2b429557
style: Avoid looking at descendant hints to check whether the element needs a restyle. 2017-07-24 12:12:08 +02:00
Simon Sapin
eb98ae6e04 Update cssparser to 0.18
https://github.com/servo/rust-cssparser/pull/171
2017-07-24 11:39:12 +02: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
Brian Birtles
b34e331fa2 Only allow animation-timing-function in @keyframes
CSS animations used to erroneously indicate that 'animation-play-state'
is permitted in @keyframes. It is not and is non-sensical to allow it
there. This mistake was faithfully transferred into Servo code (although
we also make 'animation-timing-function' which is what the spec text
meant to say).

The spec has been updated[1] and so we should update the Servo code
accordingly.

[1] adeb3434c5
2017-07-24 14:40:31 +09: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
Emilio Cobos Álvarez
533ea86bab
style: Mention when visited styles may be disabled. 2017-07-24 00:04:45 +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
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
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
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
Xidorn Quan
adee1e403c Store raw string for prop decl in @supports 2017-07-21 22:59:39 +10:00
bors-servo
1e6999b02b Auto merge of #17806 - emilio:quirks-mode-bloom, r=bholley
selectors: Don't track class and id ancestor hashes in quirks mode.

It's incorrect to track classes and id selectors in a quirks-mode document,
since they should match case-insensitively.

Bug: 1382812
Reviewed-by: bholley
MozReview-Commit-ID: 4uvrfYsWb1v

<!-- 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/17806)
<!-- Reviewable:end -->
2017-07-20 22:40:15 -07:00
bors-servo
3c89486de2 Auto merge of #17804 - emilio:visited-comment, r=jryans
Add a comment about visited style inheritance.

<!-- 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/17804)
<!-- Reviewable:end -->
2017-07-20 21:38:58 -07:00
bors-servo
a3c398b5da Auto merge of #17802 - emilio:reland-stuff, r=heycam
Revert "Backed out changeset b10e6ba9cbdb because gecko part had to b…

…e backed out."

This reverts commit b96d96d448.

The fix on the Gecko side is trivial, and I can land it after this lands.

<!-- 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/17802)
<!-- Reviewable:end -->
2017-07-20 20:28:25 -07:00
bors-servo
fafb8476e8 Auto merge of #17799 - upsuper:body-color-panic, r=heycam
Don't panic when body element don't have style data

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

<!-- 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/17799)
<!-- Reviewable:end -->
2017-07-20 19:23:19 -07:00
bors-servo
c81ddeedf3 Auto merge of #17797 - dadaa:bug1378076, r=hiro
make border-XX-style, cursor, -moz-user-select animatable

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

<!-- Either: -->
- [X] There are tests for these changes. The test codes are patch 4 and 5 of https://bugzilla.mozilla.org/show_bug.cgi?id=1378076

<!-- 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/17797)
<!-- Reviewable:end -->
2017-07-20 18:20:36 -07:00