Commit graph

14988 commits

Author SHA1 Message Date
bors-servo
2ff781d068 Auto merge of #17558 - ferjm:custompropmap.eq, r=emilio
Derive Eq and PartialEq for CustomPropertiesMap

- [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/17558)
<!-- Reviewable:end -->
2017-06-28 22:01:17 -07:00
Fernando Jiménez Moreno
0335c09810 Derive Eq and PartialEq for CustomPropertiesMap 2017-06-28 19:50:29 -07:00
bors-servo
6d7fdb484b Auto merge of #17554 - mbrubeck:oibit, r=ManishEarth
Stop using the unstable optin_builtin_traits feature

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix part of #5286.
- [x] These changes do not require tests because they are refactoring only.

<!-- 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/17554)
<!-- Reviewable:end -->
2017-06-28 19:11:08 -07:00
bors-servo
b3e2b26a23 Auto merge of #17551 - ferjm:bug1375555.stylevariables, r=emilio
stylo: implement indexed and count getters for custom properties

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

<!-- 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/17551)
<!-- Reviewable:end -->
2017-06-28 18:04:58 -07:00
bors-servo
c3a202b17d Auto merge of #17550 - emilio:xbl-is-a-pain-in-the, r=heycam
Fix dynamic style changes in XBL.

From bug 1375969

<!-- 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/17550)
<!-- Reviewable:end -->
2017-06-28 17:02:17 -07:00
bors-servo
62f99de19f Auto merge of #17553 - BorisChiou:stylo/animation/interpolatematrix_none, r=birtles
stylo: Bug 1375812 - Build an identity matrix for InterpolateMatrix.

We have to build an identity matrix while add_weighted() between InterpolateMatrix and none transform in some cases, e.g. trigger a transition from a mid-point of another transition to none.

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

<!-- 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/17553)
<!-- Reviewable:end -->
2017-06-28 16:02:33 -07:00
Emilio Cobos Álvarez
9558d2d918
stylo: Fix MightHave{State,Attribute}Dependency for XBL.
Bug: 1375969
Reviewed-By: heycam
MozReview-Commit-ID: 8I29pMHq4uf
2017-06-28 16:02:11 -07:00
Emilio Cobos Álvarez
f8346e598e
style: Look at XBL stylists to collect dependencies too.
Bug: 1375969
Reviewed-By: heycam
MozReview-Commit-ID: 72wZj6o667V
2017-06-28 16:02:10 -07:00
Emilio Cobos Álvarez
215d14b37e
style: Factor out computation for a given InvalidationMap.
Bug: 1375969
Reviewed-By: heycam
MozReview-Commit-ID: 9qSr1LcsKK5
2017-06-28 16:02:09 -07:00
Emilio Cobos Álvarez
02b61ed1a1
style: Refactor XBL rule matching to add another API to iterate the Stylists.
This will allow us to query the relevant stylists for invalidation.

Bug: 1375969
Reviewed-By: TYLin
MozReview-Commit-ID: EIIzbr2pEqN
2017-06-28 16:02:08 -07:00
Matt Brubeck
f511a77ec5 Stop using the unstable optin_builtin_traits feature 2017-06-28 15:00:21 -07:00
Boris Chiou
a67797c485 Build an identity matrix for InterpolateMatrix.
We have to build an identity matrix while add_weighted() between
InterpolateMatrix and none transform in some cases, e.g. trigger a
transition from a mid-point of another transition to none.
2017-06-28 13:03:05 -07:00
bors-servo
9d1b26de1f Auto merge of #17549 - KuoE0:make-moz-context-properties-support-fill-opacity-and-stroke-opacity, r=heycam
Make '-moz-context-properties' support 'fill-opacity' and 'stroke-opacity'.

Enable 'fill-opacity' and 'stroke-opacity' for '-moz-context-properties' to make the context-{fill|stroke}-opacity work in SVG-as-an-image.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because the test cases will be added 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/17549)
<!-- Reviewable:end -->
2017-06-28 13:01:32 -07:00
Fernando Jiménez Moreno
93f0de7899 stylo: implement indexed and count getters for custom properties 2017-06-28 12:29:56 -07:00
Cameron McCormack
8f8f01f96d style: Update Gecko bindings. 2017-06-28 11:59:13 -07:00
Cameron McCormack
25dde5120c style: Use placement new/delete StyleChildrenIterator FFI functions.
MozReview-Commit-ID: L0bhymGJqRx
2017-06-28 11:59:13 -07:00
Cameron McCormack
07ede8cb2a style: Use faster check to determine whether a StyleChildrenIterator is needed.
MozReview-Commit-ID: KNmdtnlEmfc
2017-06-28 11:58:50 -07:00
Cameron McCormack
0b2b30f301 style: Remove unused TElement::children_and_traversal_children_might_differ.
MozReview-Commit-ID: GUmuxpdvAa8
2017-06-28 11:58:50 -07:00
Cameron McCormack
84c61fa15e style: Look to base XBL bindings for content too. r=bholley
MozReview-Commit-ID: DFep2S6jnWf
2017-06-28 11:58:50 -07:00
KuoE0
2063f2217e Bug 1373159 - [servo] Make '-moz-context-properties' support 'fill-opacity' and 'stroke-opacity'.
MozReview-Commit-ID: Buzlxfwpr6h
2017-06-28 10:45:15 -07:00
Matt Brubeck
e0b864d787 Bug 1367312 - stylo: Implement :-moz-lwtheme* pseudo-classes.
https://bugzilla.mozilla.org/show_bug.cgi?id=1367312
2017-06-28 09:41:33 -07:00
bors-servo
522d24d126 Auto merge of #17543 - servo:derive-all-the-things, r=emilio
Make text-shadow and box-shadow use SimpleShadow

<!-- 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/17543)
<!-- Reviewable:end -->
2017-06-28 07:28:45 -07:00
Anthony Ramine
201d7e79e7 Make text-shadow and box-shadow use SimpleShadow 2017-06-28 16:28:25 +02:00
bors-servo
51dd0c65cd Auto merge of #17527 - cbrewster:iframe_cycles, r=asajeffrey
Don't return window proxy if it has been discarded

<!-- 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 #17479 (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/17527)
<!-- Reviewable:end -->
2017-06-28 01:59:16 -07:00
Connor Brewster
79f3237692 Don't return window proxy if it has been discarded 2017-06-27 22:14:19 -10:00
bors-servo
65ff4a399c Auto merge of #17535 - jyc:unsafe-no-jsmanaged-field-ty, r=jdm
Have unsafe_no_jsmanaged_fields! macro take a type as argument rather than an ident.

We only write unsafe_no_jsmanaged_fields!(SomeType), and the
documentation says it is to be used for types.

<!-- 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 it should be checked at compile time

<!-- 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/17535)
<!-- Reviewable:end -->
2017-06-28 00:25:03 -07:00
Jonathan Chan
a4cbbeef14 Have unsafe_no_jsmanaged_fields! macro take a type as argument rather than an ident.
We only write unsafe_no_jsmanaged_fields!(SomeType), and the
documentation says it is to be used for types.
2017-06-27 15:59:00 -07:00
bors-servo
de0ee6cebf Auto merge of #17530 - servo:derive-all-the-things, r=emilio
Improve sequence values in style

<!-- 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/17530)
<!-- Reviewable:end -->
2017-06-27 15:34:15 -07:00
Anthony Ramine
395f6be0a6 Use the Separator trait for the filter property 2017-06-27 23:40:16 +02:00
Anthony Ramine
813883e1bd Don't use SmallVec<[T; 1]> for computed values with an empty default 2017-06-27 23:37:51 +02:00
Anthony Ramine
da9d2001db Change space_separated_allowed into separator 2017-06-27 23:37:49 +02:00
Anthony Ramine
c03f5f19ab Introduce CommaWithSpace
This allows us to support stroke-dasharray the same way as comma-separated
values.
2017-06-27 23:37:48 +02:00
Anthony Ramine
17875b8a81 Introduce Separator::parse 2017-06-27 23:37:44 +02:00
Anthony Ramine
6c17bb03ce Derive ToComputedValue for Either<A, B> 2017-06-27 23:36:45 +02:00
bors-servo
9070ca1c3c Auto merge of #17428 - shinglyu:lineargradient, r=nox
Convert -webkit-linear-gradient coordinate system for Stylo

<!-- Please describe your changes on the following line: -->
This patch will fix the -webkit-linear-gradient direction issue in Stylo. I decided to NOT change the behavior of Servo, because according to the webcompat spec the webkit prefixed version should just be an alias of non-prefixed version. But we might want to remove support for old syntax like "-webkit-linear-gradient(top, ...)" (without "to"), because they are not in the spec anymore.

The Gecko layout system use different coordinate systems for prefixed and non-prefixed version, so I did a conversion, but for Servo I keep the modern version only.

Since I believe we should not support old syntax in Servo, so I'm not going to put the test in Servo. I'll submit my test cases to the Gecko wpt test instead.

---
<!-- 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 1372821](https://bugzilla.mozilla.org/show_bug.cgi?id=1372821)
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because test will be submitted to the Gecko side

<!-- 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/17428)
<!-- Reviewable:end -->
2017-06-27 14:34:01 -07:00
bors-servo
79ee821bef Auto merge of #17525 - emilio:text-decoration, r=heycam
style: Fix propagation of text-decoration lines.

This also paves up the ground to be able to fix #16825.

<!-- 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/17525)
<!-- Reviewable:end -->
2017-06-27 12:44:33 -07:00
bors-servo
2843eb5ddf Auto merge of #17517 - canaltinova:font-lang-override, r=SimonSapin
stylo: Implement font-language-override descriptor for @font-face rule

Generally  we use computed values for `@font-face` rule descriptors but that descriptor is a bit different than the others in gecko side. It accepts strings instead of unsigned integer(which is computed value of this property). So we had to use SpecifiedValue for that in here.

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

<!-- 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/17517)
<!-- Reviewable:end -->
2017-06-27 11:35:33 -07:00
bors-servo
f93fccac57 Auto merge of #17523 - emilio:cleanup-traversal, r=nox
style: Cleanup traversal.rs

Mostly reflowing comments that have become too long or two short with
refactorings, and using consistent indentation.

<!-- 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/17523)
<!-- Reviewable:end -->
2017-06-27 07:08:42 -07:00
bors-servo
4e8cf678bf Auto merge of #17528 - bzbarsky:first-letter-better, r=emilio
Fix stylo support for first-letter

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

<!-- 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/17528)
<!-- Reviewable:end -->
2017-06-26 23:46:13 -07:00
Boris Zbarsky
746f245f32 Fix style computation for first-letter pseudo-elements with inline ancestors.
We should inherit from the inline, not its parent block.

Gecko bug 1324618 part 10 servo bits: https://bugzilla.mozilla.org/show_bug.cgi?id=1324618
2017-06-26 23:29:18 -07:00
Boris Zbarsky
d40e27d6e5 Reframe less on restyles that involve nonexistent first-letter frames in Gecko.
Gecko bug 1324618 part 9 servo bits: https://bugzilla.mozilla.org/show_bug.cgi?id=1324618
2017-06-26 23:27:39 -07:00
Boris Zbarsky
40dd807df3 Assert that compute_style_difference is only called with eager pseudos.
Gecko bug 1324618 part 3: https://bugzilla.mozilla.org/show_bug.cgi?id=1324618
2017-06-26 23:24:56 -07:00
Boris Zbarsky
18ab0087ae Add some comments to may_generate_pseudo; no real behavior changes for now.
Gecko bug 1324618 part 2: https://bugzilla.mozilla.org/show_bug.cgi?id=1324618
2017-06-26 23:24:08 -07:00
Boris Zbarsky
acb27de71c Fix dynamic restyling that changes whether our element may generate a pseudo to clear out stale pseudo styles.
Gecko bug 1324618 part 1: https://bugzilla.mozilla.org/show_bug.cgi?id=1324618
2017-06-26 23:23:04 -07:00
Emilio Cobos Álvarez
69e650ea68
style: Fix propagation of text-decoration lines. 2017-06-26 23:12:18 -07:00
bors-servo
8d9b995b34 Auto merge of #17522 - streichgeorg:master, r=emilio
Replace ParseNodeID with ParseNodeId

<!-- Please describe your changes on the following line: -->
---
Not really much to this...
<!-- 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 #17519 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] 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/17522)
<!-- Reviewable:end -->
2017-06-26 22:46:27 -07:00
Hiroyuki Ikezoe
ae1ccdd456 Check has_new_animation_style along with for_css_rule_changes() in needs_animations_update(). 2017-06-27 08:26:16 +09:00
Emilio Cobos Álvarez
1c2fcb16ca
style: Cleanup duplicated code in the definition of ComputedValues. 2017-06-26 15:52:43 -07:00
Emilio Cobos Álvarez
5c7632f4c4
style: Add some flags to the computed values.
This will allow us to fix propagation of text-decoration, and also to implement
inlinization of ruby kids.

Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-06-26 15:52:42 -07:00
Emilio Cobos Álvarez
5a481547b8
style: Cleanup traversal.rs
Mostly reflowing comments that have become too long or two short with
refactorings, and using consistent indentation.
2017-06-26 22:48:17 +02:00