mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
style: Share CascadeData instances across ShadowRoots
This should be both a memory and speed win for pages using a lot of Shadow DOM. In order to make the cache properly work we need to start keying media query results on the actual StyleSheetContents, as that's what we share on Gecko, but that should all be fine. Differential Revision: https://phabricator.services.mozilla.com/D107266
This commit is contained in:
parent
11153c63fa
commit
060d74ba3b
11 changed files with 175 additions and 178 deletions
|
@ -185,7 +185,7 @@ pub struct DocumentStateDependency {
|
|||
/// In particular, we want to lookup as few things as possible to get the fewer
|
||||
/// selectors the better, so this looks up by id, class, or looks at the list of
|
||||
/// state/other attribute affecting selectors.
|
||||
#[derive(Debug, MallocSizeOf)]
|
||||
#[derive(Clone, Debug, MallocSizeOf)]
|
||||
pub struct InvalidationMap {
|
||||
/// A map from a given class name to all the selectors with that class
|
||||
/// selector.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue