Commit graph

16155 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
dee4aea264
style: Remove hashes from style rules and dependencies.
Dependencies are very numerous, and now we shouldn't be getting so many of them.

Style rules just don't need them, so it's a waste of memory.
2017-07-13 05:44:53 +02:00
bors-servo
28abeab5a5 Auto merge of #17705 - emilio:neg-padding, r=bholley
style: Avoid parsing negative padding in the padding shorthand.

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

<!-- 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/17705)
<!-- Reviewable:end -->
2017-07-12 20:11:45 -07:00
Emilio Cobos Álvarez
1785fd66a4
style: Avoid parsing negative padding in the padding shorthand. 2017-07-13 04:58:21 +02:00
Paul Rouget
ff6dc856e6 remove no-op InitializeCompositing message 2017-07-13 04:30:08 +02:00
bors-servo
3e2f6dc870 Auto merge of #17693 - emilio:revert-rustup, r=nox
Revert "Auto merge of #17633 - servo:rustup, r=nox"

This reverts commit 327e72aa14, reversing
changes made to eec51cdd57.

This closes #17642.

<!-- 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/17693)
<!-- Reviewable:end -->
2017-07-12 19:04:21 -07: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
Martin Robinson
e58e8ab42e Upgrade to the latest version of WebRender 2017-07-13 07:44:08 +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
Emilio Cobos Álvarez
dc28d6244c
Revert "Auto merge of #17633 - servo:rustup, r=nox"
This reverts commit 327e72aa14, reversing
changes made to eec51cdd57.
2017-07-12 23:00:07 +02: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
4b6e79337e Auto merge of #17538 - jyc:selectorText, r=Manishearth
Implement CSSStyleRule.selectorText.

We parse when assigning using the namespaces of the stylesheet. It isn't
clear if the spec says to do that (Firefox doesn't support the setter at
all, Chrome does, Safari doesn't); the spec issue is here:
https://github.com/w3c/csswg-drafts/issues/1511

Also fix ToCss implementation of AttrSelectorOperator to not pad with
spaces, to conform with CSSOM. This means we have to update some unit
tests that expect operators with spaces around them in attribute
selectors to roundtrip.

See the "attribute selector" section of "Serializing Selectors" here:
https://drafts.csswg.org/cssom/#serializing-selectors

CSSStyleRule.selectorText is specified here:
https://drafts.csswg.org/cssom/#dom-cssstylerule-selectortext

<!-- 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 is part of a series to fix #17182

<!-- Either: -->
I am running this to identify what tests will fail; as the other PRs in the series are merged, I believe the tests that pass will change as well.

- [ ] 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/17538)
<!-- Reviewable:end -->
2017-07-12 11:08:35 -07:00
bors-servo
ee47fe1925 Auto merge of #17686 - paulrouget:rm_Title, r=jdm
remove the ability to request for the title

If we offer the ability to request info like these, we need to expose a lot of other getters, like url, loading state, favicon, …

It's up to the embedder to keep track of the state of a browser. So let's keep that consistent.

<!-- 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
- [ ] 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/17686)
<!-- Reviewable:end -->
2017-07-12 09:50:45 -07: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
441487cec2 Update test in selectors to match types for Gecko. 2017-07-12 20:33:13 +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
Jonathan Chan
92ec8f15f0 Implement CSSStyleRule.selectorText.
We parse when assigning using the namespaces of the stylesheet. It isn't
clear if the spec says to do that (Firefox doesn't support the setter at
all, Chrome does, Safari doesn't); the spec issue is here:
https://github.com/w3c/csswg-drafts/issues/1511

Also fix ToCss implementation of AttrSelectorOperator to not pad with
spaces, to conform with CSSOM. This means we have to update some unit
tests that expect operators with spaces around them in attribute
selectors to roundtrip.

See the "attribute selector" section of "Serializing Selectors" here:
https://drafts.csswg.org/cssom/#serializing-selectors

CSSStyleRule.selectorText is specified here:
https://drafts.csswg.org/cssom/#dom-cssstylerule-selectortext
2017-07-12 01:03:58 -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
Xidorn Quan
38577fd6ee Allow selector parser to specify pseudo-element which can be used with single-colon syntax. 2017-07-12 15:07:25 +10:00
Xidorn Quan
706d54401e Add functional pseudo-element support to selectors crate. 2017-07-12 15:07:24 +10:00
Xidorn Quan
d138fd1a32 Slightly simplify parse_one_simple_selector. 2017-07-12 15:07:22 +10:00
Paul Rouget
88686690e5 remove the ability to request for the title 2017-07-12 05:56:02 +02:00