Cameron McCormack
7e31d069be
style: Support more selectors in the style sheet invalidator.
...
In addition to being able to invalidate just based on local name, this
also adds support for invalidating based on selectors with no ancestor
combinator in them (resulting in a RESTYLE_SELF for those elements that
match).
2017-10-11 19:02:41 +08:00
Bobby Holley
50cee3e133
Eliminate RestyleData entirely.
...
Without this change, the previous commit increases the size of ElementData.
MozReview-Commit-ID: 87BZuXINiT9
2017-09-12 10:33:51 -07:00
Emilio Cobos Álvarez
56282f4fab
style: Reword a TODO in the stylesheet invalidation code.
...
We already run that for removals.
2017-09-09 00:10:00 +02:00
Clément DAVID
c5fe235112
order derivable traits lists
...
Ignoring :
- **generated**.rs
- python/tidy/servo_tidy_tests/rust_tidy.rs
2017-08-23 21:38:44 +02:00
Bobby Holley
d4aa8e3cef
Track the restyle root and use it to do less work during the traversal.
...
MozReview-Commit-ID: A8O3JOpsv4E
2017-08-22 19:34:46 -07:00
Emilio Cobos Álvarez
d1725b1f19
style: Replicate the list of stylesheets on the layout thread.
...
This is a patch that unifies a bit how Gecko and Stylo stylesheets work, in
order to be able to eventually move the stylesheets into the stylist, and be
able to incrementally update the invalidation map.
2017-08-18 14:31:35 +02:00
Nazım Can Altınova
43cf493832
style: Implement parsing/serialization for @font-feature-values rule
2017-07-27 13:37:57 -07:00
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
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
Emilio Cobos Álvarez
ffc45e9aaa
style: Inline RestyleData.
...
Bug: 1368236
MozReview-Commit-ID: 49s3SO0PMHf
2017-06-16 03:36:18 +02:00
Emilio Cobos Álvarez
f9c268922d
style: Kill StoredRestyleHint.
...
Reviewed-By: bholley
Bug: 1368236
MozReview-Commit-ID: 43Cf0rJyhzO
2017-06-14 13:11:10 +02:00
Emilio Cobos Álvarez
6b0f4c0410
style: Move one-off checks out of the recursive invalidation function.
...
There isn't a need to pay the cost for them multiple times.
Bug: 1372068
MozReview-Commit-ID: 3K2mRcWTheJ
2017-06-13 13:27:09 +02:00
Emilio Cobos Álvarez
36bac58863
style: Don't try to go down the tree if there aren't invalidations.
...
This can happen when adding an empty stylesheet, for example.
Bug: 1372068
MozReview-Commit-ID: Jtm4eJBWjEA
2017-06-13 13:27:08 +02:00
Simon Sapin
5bccf98aa4
ID and class selectors are ASCII case-insensitive in quirks mode.
...
https://bugzilla.mozilla.org/show_bug.cgi?id=1363778
2017-06-12 23:33:53 +02:00
Cameron McCormack
c533097e20
style: Distinguish between the tree structures used for traversal and selector matching.
...
This patch renames TNode::parent_element to traversal_parent, since it returns
the parent from the perspective of traversal (which in Gecko uses the
flattened tree). It also renames TNode::children to traversal_children
for the saem reason.
We keep parent_element and children functions on TNode to use for selector
matching, which must be done on the real DOM tree structure.
2017-06-09 18:37:35 +08:00
Bobby Holley
5ddabef636
Collapse Selector, SelectorInner, and ComplexSelector into a single Selector.
...
The refcounting is still internal. We'll fix that up next.
MozReview-Commit-ID: CTxZNaR3Qgj
2017-06-05 19:44:00 -07:00
Bobby Holley
713c9a63f6
Move the ancestor hashes out of Selector.
...
MozReview-Commit-ID: 5mipXnjgSED
2017-06-05 19:43:58 -07:00
Emilio Cobos Álvarez
b5232c940d
style: Move the stylesheet invalidation code to another submodule.
...
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1357461
MozReview-Commit-ID: DIzZXoHycZs
2017-06-03 14:18:56 +02:00