diff options
author | Oriol Brufau <obrufau@igalia.com> | 2023-05-12 19:35:00 +0200 |
---|---|---|
committer | Oriol Brufau <obrufau@igalia.com> | 2023-05-16 13:00:18 +0200 |
commit | 60e206143c7346b2255c9c1a6af745d4b0c77985 (patch) | |
tree | 8338dbe12d82a692c61738db3bdc26120e6a7d59 /components/script/dom/documentorshadowroot.rs | |
parent | 060d74ba3bcccf8ace74ac8d00c7589783a2a45d (diff) | |
download | servo-60e206143c7346b2255c9c1a6af745d4b0c77985.tar.gz servo-60e206143c7346b2255c9c1a6af745d4b0c77985.zip |
Further changes required by Servo
Diffstat (limited to 'components/script/dom/documentorshadowroot.rs')
-rw-r--r-- | components/script/dom/documentorshadowroot.rs | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/components/script/dom/documentorshadowroot.rs b/components/script/dom/documentorshadowroot.rs index 43d345e5e01..51bce1c7b2d 100644 --- a/components/script/dom/documentorshadowroot.rs +++ b/components/script/dom/documentorshadowroot.rs @@ -20,11 +20,10 @@ use servo_arc::Arc; use servo_atoms::Atom; use std::collections::HashMap; use std::fmt; -use style::context::QuirksMode; use style::invalidation::media_queries::{MediaListKey, ToMediaListKey}; use style::media_queries::MediaList; use style::shared_lock::{SharedRwLock as StyleSharedRwLock, SharedRwLockReadGuard}; -use style::stylesheets::{CssRule, Origin, Stylesheet}; +use style::stylesheets::{Stylesheet, StylesheetContents}; #[derive(Clone, JSTraceable, MallocSizeOf)] #[unrooted_must_root_lint::must_root] @@ -48,19 +47,11 @@ impl PartialEq for StyleSheetInDocument { impl ToMediaListKey for StyleSheetInDocument { fn to_media_list_key(&self) -> MediaListKey { - self.sheet.to_media_list_key() + self.sheet.contents.to_media_list_key() } } impl ::style::stylesheets::StylesheetInDocument for StyleSheetInDocument { - fn origin(&self, guard: &SharedRwLockReadGuard) -> Origin { - self.sheet.origin(guard) - } - - fn quirks_mode(&self, guard: &SharedRwLockReadGuard) -> QuirksMode { - self.sheet.quirks_mode(guard) - } - fn enabled(&self) -> bool { self.sheet.enabled() } @@ -69,8 +60,8 @@ impl ::style::stylesheets::StylesheetInDocument for StyleSheetInDocument { self.sheet.media(guard) } - fn rules<'a, 'b: 'a>(&'a self, guard: &'b SharedRwLockReadGuard) -> &'a [CssRule] { - self.sheet.rules(guard) + fn contents(&self) -> &StylesheetContents { + self.sheet.contents() } } |