Commit graph

16155 commits

Author SHA1 Message Date
Daisuke Akatsuka
983361eb0f implements nsStyleCoord type properties animatable 2017-07-05 12:54:45 +09:00
Bobby Holley
c742ed31da Use GC machinery rather than recursion for post-rule-tree-teardown node dropping.
MozReview-Commit-ID: BPC6u4sBNPR
2017-07-04 13:43:41 -07:00
Fernando Jiménez Moreno
fc8d0eeae0 stylo: Implement ServoStyleRule::SelectorMatchesElement 2017-07-04 13:13:48 +02:00
bors-servo
f380d1cfc1 Auto merge of #17600 - Manishearth:revert-cv, r=heycam
Revert "style: Cleanup duplicated code in the definition of ComputedValues."

This reverts commit 1c2fcb16ca.

We're completely redoing the ComputedValues stuff on the gecko side, this makes it easier to deal with

cc @emilio

<!-- 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/17600)
<!-- Reviewable:end -->
2017-07-03 22:50:42 -07:00
bors-servo
d52a08a5c5 Auto merge of #17568 - upsuper:user-select, r=Manishearth
Handle prefixed value of -moz-user-select properly

This is supposed to fix [bug 1374996](https://bugzilla.mozilla.org/show_bug.cgi?id=1374996).

<!-- 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/17568)
<!-- Reviewable:end -->
2017-07-03 21:56:19 -07:00
Manish Goregaokar
6c94ace6e5 Revert "style: Cleanup duplicated code in the definition of ComputedValues."
This reverts commit 1c2fcb16ca.
2017-07-03 21:48:12 -07:00
bors-servo
7a71035793 Auto merge of #17268 - servo:grid, r=wafflespeanut,canaltinova
Add support for subgrids and fix some other grid properties

This covers the `subgrid <line-name-lists>?` for `grid-template` (for gecko, and hence, stylo).

<!-- 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/17268)
<!-- Reviewable:end -->
2017-07-03 17:10:25 -07:00
Nazım Can Altınova
3e49a8c80a Fix serialization of grid-template
If both columns and rows are 'none', shorthand should serialize it as 'none / none'
instead of just 'none'.
2017-07-03 17:08:14 -07:00
Nazım Can Altınova
ba6641de58 Fix parsing of 'subgrid' and 'none' keywords in grid-template 2017-07-03 17:08:12 -07:00
Nazım Can Altınova
f7aac8d225 Fix parsing logic of grid-template property
Fist line names are parsed on the top of the function already and it shouldn't be parsed again.
2017-07-03 17:08:11 -07:00
Nazım Can Altınova
8827cb1440 Fix 'grid' shorthand serialization 2017-07-03 17:08:09 -07:00
Nazım Can Altınova
af96e09c7f Fix parsing of grid-template shorthand
It should accept 'grid-template-rows / grid-template-columns values' values not
'grid-template-rows grid-template-columns values'.
2017-07-03 17:08:08 -07:00
Nazım Can Altınova
fd3b99027a Prevent parsing 'none' keyword in grid-template's columns part 2017-07-03 17:08:06 -07:00
Nazım Can Altınova
f4eccdae3f Fall back to an older version of the spec in TrackRepeat for the parity with gecko 2017-07-03 17:08:05 -07:00
Nazım Can Altınova
5eb33bac8f Fix the serialization of TrackRepeat
It was printing `repeat(n, <line-names>)` for number TrackRepeat.
But it should just print n times <line-names> instead.

MozReview-Commit-ID: FEmL8O2osVb
2017-07-03 17:08:02 -07:00
Ravi Shankar
9d9d99ec25 Switch to GridTemplateComponent for subgrid line names 2017-07-03 17:08:00 -07:00
Ravi Shankar
8af912200c Add support for subgrid line name lists 2017-07-03 14:57:17 -07:00
Emilio Cobos Álvarez
e2bf7d037a
stylo: properly handle ::before/::after rules applying to replaced elements.
Bug: 1376352
Reviewed-By: heycam
MozReview-Commit-ID: FO0TyWsPPG7
2017-07-03 13:03:24 +02:00
Fernando Jiménez Moreno
360f2cc492 Add option to write profiler output to InfluxDB 2017-07-03 10:13:46 +02:00
Hiroyuki Ikezoe
4331112846 reduce 2017-07-03 15:11:42 +09:00
bors-servo
545a53ccad Auto merge of #17590 - emilio:gecko-inner, r=heycam
stylo: Fix StyleSheetInner/Stylesheet mapping

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1372041 and all the dependent/related issues.

<!-- 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/17590)
<!-- Reviewable:end -->
2017-07-02 07:00:39 -07:00
Emilio Cobos Álvarez
1263075776
stylo: Fix StyleSheetInner/Stylesheet mapping
The key of this patch is the split between Stylesheet and StylesheetContents.

Gecko will use StylesheetContents, which maps to a ServoStyleSheetInner.
2017-07-02 15:49:40 +02:00
bors-servo
edb0dafefc Auto merge of #17576 - servo:derive-all-the-things, r=SimonSapin
Merge BoxShadowList and TextShadowList into ShadowList<T>

<!-- 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/17576)
<!-- Reviewable:end -->
2017-07-02 05:59:34 -07:00
Nazım Can Altınova
26ad2a1331 Fix color stop sorting in -webkit-gradient 2017-07-01 13:07:34 -07:00
bors-servo
be58b99b06 Auto merge of #17562 - emilio:less-revalidation-stuff, r=bzbarsky
style: Don't treat some document-state-related pseudo-classes as revalidation selectors.

<!-- 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/17562)
<!-- Reviewable:end -->
2017-07-01 08:13:58 -07:00
Anthony Ramine
80bd11bb8c Merge BoxShadowList and TextShadowList into ShadowList<T> 2017-07-01 13:18:40 +02:00
Bobby Holley
6ade9c11ec Allow StrongRuleNode drops after RuleTree destruction. 2017-06-30 23:35:40 -07:00
Bobby Holley
67cd974636 Use a different sentinel value to lock the free list.
We're going to use null to indicate that the final GC has already
occurred.
2017-06-30 23:35:32 -07:00
Bobby Holley
654661df36 Hook into the Gecko leak checking machinery.
Since we're going to stop asserting that all RuleNodes have been
destroyed by the time the RuleTree is destroyed, we want reliable leak
checking.
2017-06-30 23:35:22 -07:00
Bobby Holley
31b1233a73 Stop GCing before dropping the root rule node.
We already gc before dropping the RuleTree.
2017-06-30 23:35:14 -07:00
bors-servo
ece35f9caa Auto merge of #17581 - mbrubeck:incremental, r=pcwalton
Fix incremental layout bugs for absolute and cleared elements

Fixes #17307.  <del>There were two underlying bugs:</del>

* <del>Nodes were not marked dirty when their style attribute changed.</del>

* BaseFlow flags set during flow construction could get out of sync with the element's style if repair_style was called.

---

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #17307
- [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/17581)
<!-- Reviewable:end -->
2017-06-30 22:15:26 -07:00
Matt Brubeck
2aef2af9b8 Update flags for absolutely positioned elements on style changes
Fixes #17307.
2017-06-30 22:14:28 -07:00
Nazım Can Altınova
b33545ca3b Move Position::parse_legacy logic to LegacyPosition type 2017-06-30 17:54:04 -07:00
Nazım Can Altınova
d589645ee9 stylo: Implement -moz-prefixed radial gradients 2017-06-30 17:54:01 -07:00
Nazım Can Altınova
3e42684d3c stylo: Implement -moz-prefixed linear gradients 2017-06-30 17:53:01 -07:00
Matt Brubeck
f01e1da01e Reconstruct flows if the 'clear' property changes.
This is necessary because the CLEARS_LEFT and CLEARS_RIGHT flags are set
during flow construction.
2017-06-30 17:11:30 -07:00
bors-servo
a9fea0653a Auto merge of #17326 - asajeffrey:script-paint-worklets-rendering-context, r=jdm
Implement paint worklets rendering context

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

Implement the rendering context for paint worklets. They really paint things now!

---
<!-- 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 do not require tests because the existing reftest now passes

<!-- 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/17326)
<!-- Reviewable:end -->
2017-06-30 15:40:26 -07:00
Alan Jeffrey
328fb25a65 Implemented paint worklet rendering context. 2017-06-30 16:41:08 -05:00
bors-servo
d16ef3cd33 Auto merge of #17561 - servo:rustup, r=nox
Upgrade to rustc 1.20.0-nightly (69c65d296 2017-06-28)

Fixes #17575.

<!-- 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/17561)
<!-- Reviewable:end -->
2017-06-30 14:34:56 -07:00
Simon Sapin
7fbb658224 Upgrade to rustc 1.20.0-nightly (3bfc18a96 2017-06-29) 2017-06-30 23:22:38 +02:00
bors-servo
a24600d626 Auto merge of #17577 - mbrubeck:inactive, r=emilio
Bug 1348489 - stylo: Implement :-moz-window-inactive.

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

<!-- 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/17577)
<!-- Reviewable:end -->
2017-06-30 10:13:01 -07:00
Matt Brubeck
17f4d0c5d9 Bug 1348489 - stylo: Implement :-moz-window-inactive. 2017-06-30 09:31:01 -07:00
bors-servo
ff19e69d23 Auto merge of #17570 - bzbarsky:visited-pseudos, r=jryans
Implement :visited support for lazy pseudo-elements

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

<!-- 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/17570)
<!-- Reviewable:end -->
2017-06-30 09:11:41 -07:00
bors-servo
a04725fa1c Auto merge of #17569 - upsuper:fullscreen, r=emilio
Support :-moz-full-screen pseudo-class

This fixes [bug 1374901](https://bugzilla.mozilla.org/show_bug.cgi?id=1374901).

<!-- 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/17569)
<!-- Reviewable:end -->
2017-06-30 08:08:00 -07:00
Anthony Ramine
6f6ee6e036 Make Animatable::get_zero_value return a Result<Self, ()> 2017-06-30 15:39:55 +02:00
bors-servo
d47de6ccfc Auto merge of #17574 - heycam:experimental, r=Manishearth
style: Make "internal" and "experimental" interact in the same way as Gecko.

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

<!-- 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/17574)
<!-- Reviewable:end -->
2017-06-30 06:09:29 -07:00
bors-servo
008f90517c Auto merge of #17566 - canaltinova:font-var-alt, r=emilio
stylo: Fix font-variant-alternates property

`font-variant-alternates` was just parsing values as keywords. But many of the alternates are actually functions instead of keywords. This fixes that.

r=emilio on bugzilla side.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1356124](https://bugzilla.mozilla.org/show_bug.cgi?id=1356124)

<!-- 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/17566)
<!-- Reviewable:end -->
2017-06-30 04:13:15 -07:00
bors-servo
683a53b080 Auto merge of #17563 - julian-seward1:master, r=bholley
Bug 1368302 - stylo: possible stack overflow when processing very dee…

…p 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.

<!-- 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/17563)
<!-- Reviewable:end -->
2017-06-30 03:01:08 -07:00
bors-servo
39da6d4674 Auto merge of #17239 - asajeffrey:script-paint-worklets-invoke-worklet-scripts, r=jdm
Implemented paint worklets invoking worklet scripts.

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

Implemented the "invoke a paint callback" functionality of paint worklets (https://drafts.css-houdini.org/css-paint-api/#invoke-a-paint-callback).

This PR does not implement the 2D rendering context, and just generates a placeholder 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 do not require tests because we can't write reftests until we have 2D rendering contexts implemented.

<!-- 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/17239)
<!-- Reviewable:end -->
2017-06-30 01:16:09 -07:00
Boris Zbarsky
824139e615 Make sure to compute visited style if our parent has visited style.
Part 4 of the fix for Gecko bug 1364242: https://bugzilla.mozilla.org/show_bug.cgi?id=1364242
2017-06-29 22:26:14 -07:00