diff options
author | Oriol Brufau <obrufau@igalia.com> | 2023-05-16 09:51:46 +0200 |
---|---|---|
committer | Oriol Brufau <obrufau@igalia.com> | 2023-05-16 13:00:08 +0200 |
commit | 060d74ba3bcccf8ace74ac8d00c7589783a2a45d (patch) | |
tree | 24b80ad4e927ceb010e4ada41371dd3f6290c4fd /components/style/selector_parser.rs | |
parent | 11153c63fa9d908355573722614a5bb8f23dac9a (diff) | |
download | servo-060d74ba3bcccf8ace74ac8d00c7589783a2a45d.tar.gz servo-060d74ba3bcccf8ace74ac8d00c7589783a2a45d.zip |
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
Diffstat (limited to 'components/style/selector_parser.rs')
-rw-r--r-- | components/style/selector_parser.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/style/selector_parser.rs b/components/style/selector_parser.rs index e3841c15482..67d4d4f6981 100644 --- a/components/style/selector_parser.rs +++ b/components/style/selector_parser.rs @@ -108,7 +108,7 @@ pub enum PseudoElementCascadeType { } /// A per-pseudo map, from a given pseudo to a `T`. -#[derive(MallocSizeOf)] +#[derive(Clone, MallocSizeOf)] pub struct PerPseudoElementMap<T> { entries: [Option<T>; PSEUDO_COUNT], } |