Commit graph

4994 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
1785fd66a4
style: Avoid parsing negative padding in the padding shorthand. 2017-07-13 04:58:21 +02:00
Emilio Cobos Álvarez
9394ea9644
style: Remove unneeded bounds in SelectorMap and related code.
MozReview-Commit-ID: CWwdVCwWijn
2017-07-13 03:34:33 +02:00
bors-servo
ebfc8f5858 Auto merge of #17701 - bholley:reuse_allocations, r=emilio
reuse the bloom filter and style sharing cache across traversals

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

<!-- 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/17701)
<!-- Reviewable:end -->
2017-07-12 16:48:19 -07:00
Bobby Holley
3bce0c7652 Stop using SendElement in StyleSharingCandiate.
MozReview-Commit-ID: AuNPDsq8bgk
2017-07-12 16:38:08 -07:00
Bobby Holley
ec6cca6d08 Reuse style sharing cache across traversals.
MozReview-Commit-ID: 9wCJtciqs6K
2017-07-12 16:38:07 -07:00
Bobby Holley
0614010552 Store the bloom filter in TLS and reuse it across traversals.
MozReview-Commit-ID: EbzDehr2Y2L
2017-07-12 16:38:06 -07:00
Bobby Holley
d1c31f7eaf Add owning_ref back as a style dep, and update parking_lot. 2017-07-12 16:37:50 -07:00
Xidorn Quan
455dffc919 Avoid random python address to be added to generated files 2017-07-13 09:06:35 +10:00
bors-servo
5585ff2c44 Auto merge of #17692 - canaltinova:grid-pls, r=wafflespeanut
stylo: Fix grid-template serialization in grid shorthand

Because of some unnecessary checks, it wasn't able to serialize the '40px / none' value properly before. That will fix one failure on `test_value_storage.html`

---
- [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/17692)
<!-- Reviewable:end -->
2017-07-12 14:38:14 -07:00
Nazım Can Altınova
8f12485d4b stylo: Fix grid-template serialization in grid shorthand
Because of some unnecessary checks, it wasn't able to serialize the '40px / none' value properly before.
2017-07-12 14:06:04 -07:00
bors-servo
55c3e6ed87 Auto merge of #17691 - emilio:nondeter, r=Manishearth
stylo: Fix causes of non-determinism in gecko_properties.rs.

We should sort out all the different ways we have to get sides and all those
nasty loops, eventually...

Bug: 1380327
Reviewed-By: Manishearth
MozReview-Commit-ID: 4lAPEGeZaik

<!-- 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/17691)
<!-- Reviewable:end -->
2017-07-12 13:10:12 -07:00
Emilio Cobos Álvarez
c591df7012
stylo: Fix causes of non-determinism in gecko_properties.rs.
We should sort out all the different ways we have to get sides and all those
nasty loops, eventually...

Bug: 1380327
Reviewed-By: Manishearth
MozReview-Commit-ID: 4lAPEGeZaik
2017-07-12 21:59:11 +02:00
bors-servo
f9fad3d959 Auto merge of #17662 - servo:derive-all-the-things, r=emilio,SimonSapin
Improve derivation of ToCss again

<!-- 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/17662)
<!-- Reviewable:end -->
2017-07-12 04:56:31 -07:00
Anthony Ramine
d03bcfa8b3 Derive ToCss for TrackSize<L> 2017-07-12 12:36:20 +02:00
bors-servo
ce52c16a8f Auto merge of #17687 - upsuper:tree-pseudo, r=heycam
Support parsing ::-moz-tree-* pseudo-elements selector

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

<!-- 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/17687)
<!-- Reviewable:end -->
2017-07-12 03:35:37 -07:00
Xidorn Quan
97b2b95f99 Update generated files. 2017-07-12 20:33:15 +10:00
Xidorn Quan
a307653581 Implement parsing of tree pseudo-elements. 2017-07-12 20:33:11 +10:00
Anthony Ramine
7bc9a95b46 Rename MinMax to Minmax 2017-07-12 11:45:17 +02:00
Anthony Ramine
c2e746004a Derive ToCss for MozImageRect<Color> 2017-07-12 11:45:16 +02:00
Anthony Ramine
907d629ca4 Rename ImageRect to MozImageRect 2017-07-12 11:45:15 +02:00
Anthony Ramine
50c46ae0e1 Clean up conditional compilation in Image::parse 2017-07-12 11:45:13 +02:00
bors-servo
76e2af4420 Auto merge of #17683 - birtles:tidy-list-length-check, r=emilio
Tidy up check for zero-length lists when interpolating

<!-- Please describe your changes on the following line: -->
Address feedback from https://github.com/servo/servo/pull/17613#discussion_r125775874

---
<!-- 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 they are a code tidy up only with no functional changes.

<!-- 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/17683)
<!-- Reviewable:end -->
2017-07-12 01:22:26 -07:00
Emilio Cobos Álvarez
e24d81dbe7
stylo: Update bindings. 2017-07-12 09:27:00 +02:00
Emilio Cobos Álvarez
6d6c80e79b
style: Remove StyleRelations.
They're unused now. We can add them back if needed.

MozReview-Commit-ID: 92Y2Na0ZbVn
2017-07-12 09:26:55 +02:00
Emilio Cobos Álvarez
d3c8844549
style: Remove unnecessary TraversalFlags::FOR_DEFAULT_STYLES.
Yay

MozReview-Commit-ID: JiWTEz63AlE
2017-07-12 09:26:41 +02:00
Emilio Cobos Álvarez
d15acc219e
style: Allow calling GetBaseComputedStylesForElement for an unstyled element.
Before this refactoring, getComputedStyle could have side effects, and left the
style data in the element, so we could never arrive there without data.

There are a few crashtests that caught this, but this was already broken if you
called animate() on an element deep in a display: none subtree.

MozReview-Commit-ID: 1AvOvhAyOP3
2017-07-12 09:26:38 +02:00
Emilio Cobos Álvarez
c6d5dbbb01
style: Rewrite restyling to split between resolving styles and handling changes.
MozReview-Commit-ID: 4BzjbLbFebF
2017-07-12 09:26:36 +02:00
Emilio Cobos Álvarez
0ad2d39c30
style: Rewrite get*Style using StyleResolverForElement.
Removing the ugly.

MozReview-Commit-ID: BvahbMKS7QU
2017-07-12 09:26:31 +02:00
Emilio Cobos Álvarez
b4c8ba3029
style: Introduce StyleResolverForElement.
This still doesn't make use of it so far, but I prefer introducing it
atomically, then introduce its usage.

MozReview-Commit-ID: 9dRUsl3srHp
2017-07-12 08:39:50 +02:00
Emilio Cobos Álvarez
fcf85e4658
style: Make RuleTree::root return a reference instead of a strong pointer.
There's no reason it wasn't done before.

MozReview-Commit-ID: G0lMLWmfHbS
2017-07-12 08:39:41 +02:00
Emilio Cobos Álvarez
cc94a8b7cb
style: Undo the optimization for grabbing animation rules from the style data.
This is unfortunate, but for now it complicates things, I would like not needing
a ElementData to get the style of an Element in order to fix all the
getDefaultComputedStyle bugs.

MozReview-Commit-ID: LZvsdFEqrDE
2017-07-12 08:39:35 +02:00
Emilio Cobos Álvarez
95a2ac51c4
style: Remove unused AFFECTED_BY_PSEUDO_ELEMENTS StyleRelation.
MozReview-Commit-ID: yHldvHm87b
2017-07-12 08:39:25 +02:00
Emilio Cobos Álvarez
a2f8af9203
style: Derive Default for EagerPseudoStyles.
MozReview-Commit-ID: HkTtrV5CcF0
2017-07-12 08:37:11 +02:00
Xidorn Quan
832c4c4079 Add pseudo_element_variant helper function to simplify some code. 2017-07-12 15:07:30 +10:00
Xidorn Quan
2649d0332a Call non-functional pseudo-elements simple pseudo-element. 2017-07-12 15:07:29 +10:00
Xidorn Quan
01ea3cc3e3 Remove special-casing anonymous box in PseudoElement::exposed_in_non_ua_sheets. 2017-07-12 15:07:27 +10:00
Brian Birtles
255b4e10c7 Tidy up check for zero-length lists when interpolating 2017-07-12 09:55:03 +09:00
bors-servo
882fc4731c Auto merge of #17682 - birtles:check-pref-for-frames-timing, r=hiro
Check Gecko pref before parsing frames() timing function

These are the Servo-side changes for [Gecko bug 1379582](https://bugzilla.mozilla.org/show_bug.cgi?id=1379582).

They have been reviewed by @hiikezoe.

<!-- 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/17682)
<!-- Reviewable:end -->
2017-07-11 17:28:29 -07:00
Brian Birtles
8daeeb159a Check Gecko pref before parsing frames() timing function 2017-07-12 08:49:10 +09:00
bors-servo
bc44246fc6 Auto merge of #17364 - asajeffrey:script-paint-worklets-properties, r=jdm
Implement paint worklet properties

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

This is the final PR to get basic paint worklet support. It adds support for paint worklet properties (https://drafts.css-houdini.org/css-paint-api/#paint-definition-input-properties). When a paint worklet is registered, it specifies a list of CSS properties, and is provided with their computed values when it is invoked.

This is a dependent PR:
* "Implemented paint worklets invoking worklet scripts" is #17239.
* "Implemented paint worklets rendering contexts" is #17326.

There should be tests added for this, hopefully the existing wpt houdini tests.

---
<!-- 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 #16839
- [x] There are tests for these changes

<!-- 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/17364)
<!-- Reviewable:end -->
2017-07-11 16:24:18 -07:00
Alan Jeffrey
ef033b8362 Implemented paint worklet properties. 2017-07-11 17:28:56 -05:00
Gecko Backout
02d9305782 Backed out changeset 3977404931e5 for failing mochitest layout/style/test/test_value_computation.html. r=backout
Backs out https://github.com/servo/servo/pull/17654
2017-07-11 22:14:04 +00:00
bors-servo
de331c6bc8 Auto merge of #17654 - jyc:image-orientation, r=Manishearth
Make Servo's rounding of image-orientation values agree with Gecko's, and pass orientations directly as an enum instead of as angles.

Has been reviewed: https://reviewboard.mozilla.org/r/155336/

<!-- 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: -->
- [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. -->

Bugzilla issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1355380

<!-- 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/17654)
<!-- Reviewable:end -->
2017-07-11 11:22:26 -07:00
Jonathan Chan
e554146e2a Make Servo's rounding of image-orientation values agree with Gecko's,
and pass orientations directly as an enum instead of as angles.

Depends on a Gecko change to be subsequently landed in m-c.
2017-07-11 11:19:39 -07:00
Anthony Ramine
a3af32155f Introduce #[css(comma)] 2017-07-11 17:14:14 +02:00
Anthony Ramine
ec289fbe6a Derive some more ToCss implementations 2017-07-11 15:58:09 +02:00
Anthony Ramine
21ecf47693 Derive ToCss for counter_style::Negative 2017-07-11 15:58:08 +02:00
Anthony Ramine
7995a9ed51 Derive ToCss for font-weight descriptors 2017-07-11 15:58:07 +02:00
Anthony Ramine
3f27654d97 Derive ToCss for specified values of background-repeat 2017-07-11 15:58:05 +02:00
Anthony Ramine
118291ca91 Introduce Matrix for matrix() transformations 2017-07-11 15:58:04 +02:00