Commit graph

4994 commits

Author SHA1 Message Date
Cameron McCormack
477a69d725 style: Make "internal" and "experimental" interact in the same way as Gecko. 2017-06-29 22:21:40 -07:00
Emilio Cobos Álvarez
65bbd6c23a
style: Update Stylo bindings for new LookAndFeel_ColorID variants 2017-06-29 17:38:14 -07:00
Boris Zbarsky
52d1b59515 Implement :visited handling for lazy pseudo-elements in stylo.
Part 2 of the fix for Gecko bug 1364242: https://bugzilla.mozilla.org/show_bug.cgi?id=1364242
2017-06-29 16:22:13 -07:00
Boris Zbarsky
351c7f7859 Change lazily_compute_pseudo_element_style to take an &Arc for the parent style.
This makes it easier to do later changes that want to pass an Arc here.

Part 1 of the fix for Gecko bug 1364242: https://bugzilla.mozilla.org/show_bug.cgi?id=1364242
2017-06-29 16:20:47 -07:00
Xidorn Quan
3ea38020f7 Support :-moz-full-screen pseudo-class 2017-06-29 15:44:30 -07:00
Xidorn Quan
9299a0dc2c Handle prefixed value of -moz-user-select properly 2017-06-29 14:37:28 -07:00
Julian Seward
4aa9829889 Bug 1368302 - stylo: possible stack overflow when processing very deep DOM. r=bholley.
Whilst working with variants of the bloom-basic test for Stylo perf
profiling, I noticed that it is easy to cause Firefox to segfault on DOMs
with a depth of more than about 1500 elements.  This fix limits the use of
tail recursion to 150 elements.  This isn't externally observable to content
-- we're still completely correct, just not using tail recursion any more.
2017-06-29 22:56:38 +02:00
Nazım Can Altınova
5d0f7f10e0 stylo: Fix font-variant-alternates property 2017-06-29 13:33:38 -07:00
Gecko Backout
fb4e454df4 Backed out changeset 90036d4d378e (bug 17564) because gecko-side patch caused bustage on Windows. r=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/17564
2017-06-29 20:28:35 +00:00
Matt Brubeck
9cef18f6b5 Bug 1348489 - stylo: Implement :-moz-window-inactive. 2017-06-29 11:21:16 -07:00
Emilio Cobos Álvarez
d5a5a7ff16
style: Don't treat some document-state-related pseudo-classes as revalidation selectors. 2017-06-29 08:45:05 -07:00
bors-servo
9a13cf6bda Auto merge of #17560 - servo:derive-all-the-things, r=<try>
Introduce ToAnimatedValue 🎥

<!-- 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/17560)
<!-- Reviewable:end -->
2017-06-29 06:49:39 -07:00
Anthony Ramine
9ab0b9b4ac Introduce ToAnimatedValue 🎥 2017-06-29 14:03:15 +02:00
Fernando Jiménez Moreno
0335c09810 Derive Eq and PartialEq for CustomPropertiesMap 2017-06-28 19:50:29 -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
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
Anthony Ramine
201d7e79e7 Make text-shadow and box-shadow use SimpleShadow 2017-06-28 16:28:25 +02: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
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
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