Commit graph

9 commits

Author SHA1 Message Date
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
Emilio Cobos Álvarez
cb06375fe2
style: Implement a more fine-grained invalidation method.
This commit also removes the old restyle_hints module and splits it into
multiple modules under components/style/invalidation/element/.

The basic approach is to walk down the tree using compound selectors as needed,
in order to do as little selector-matching as possible.

Bug: 1368240
MozReview-Commit-ID: 2YO8fKFygZI
2017-06-13 13:26:41 +02:00
Emilio Cobos Álvarez
5c66d3c77a
Cache effective media query results.
This patch also makes RulesIterator not iterate over rules for which we don't
process nested rules.

There's nothing depending on this behavior right now afaik, and this will make
us duplicate less code in following patches.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1357461
MozReview-Commit-ID: CaMFQtAVnJF
2017-06-03 14:43:44 +02: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
Emilio Cobos Álvarez
ac5872b48c
Bug 1357583: style: Make effective_rules return an iterator, stop refcounting the Device. r=heycam
This makes the code cleaner, and also documents the fact that effective_rules
recurses into imports.

No we're not adding the imported stylesheets twice, and we share code with the
invalidation analysis.

MozReview-Commit-ID: DOF2AViTlmR
2017-05-29 20:27:43 +02:00
Emilio Cobos Álvarez
ebd6f47be3
Bug 1357583: style: Recurse into @import rules when looking at the added rules. r=heycam
Apparently my whole conception of how the list of sheets in the styleset looked
like was flawled, and we only ever get one append_sheet for the topmost
stylesheet, instead of one for each.

MozReview-Commit-ID: FMClygMJkTc
2017-05-29 20:27:41 +02:00
Emilio Cobos Álvarez
f569274cca
Bug 1357583: Add a bunch of logging, shortcuts, and look also at the rightmost selector while invalidating sheets. r=heycam
MozReview-Commit-ID: 2XGcOCTa7MV
2017-05-29 20:27:38 +02:00
Emilio Cobos Álvarez
39e836966e
Bug 1357583: style: Hook up the invalidator in the StyleSheetSet. r=heycam
MozReview-Commit-ID: IhgKAovTJMX
2017-05-29 20:27:36 +02:00
Emilio Cobos Álvarez
658075af32
Bug 1357583: style: Add an initial version of the stylesheet invalidation code. r=heycam
MozReview-Commit-ID: 4jLxPYNF07U
2017-05-29 20:15:35 +02:00