aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/script/dom/document.rs6
-rw-r--r--components/script/dom/documentorshadowroot.rs6
-rw-r--r--components/script/dom/shadowroot.rs6
-rw-r--r--components/style/stylesheet_set.rs16
4 files changed, 17 insertions, 17 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index 21144f79a67..ddcdcca24dc 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -154,7 +154,7 @@ use style::media_queries::{Device, MediaType};
use style::selector_parser::{RestyleDamage, Snapshot};
use style::shared_lock::SharedRwLock as StyleSharedRwLock;
use style::str::{split_html_space_chars, str_join};
-use style::stylesheet_set::{DocumentStylesheetSet, StylesheetSet};
+use style::stylesheet_set::{DocumentStylesheetSet, StylesheetSetRef};
use style::stylesheets::{Origin, OriginSet, Stylesheet};
use url::percent_encoding::percent_decode;
use url::Host;
@@ -3193,7 +3193,7 @@ impl Document {
DocumentOrShadowRoot::add_stylesheet(
owner,
- StylesheetSet::Document(stylesheets),
+ StylesheetSetRef::Document(stylesheets),
sheet,
insertion_point,
self.style_shared_lock(),
@@ -3211,7 +3211,7 @@ impl Document {
DocumentOrShadowRoot::remove_stylesheet(
owner,
s,
- StylesheetSet::Document(&mut *self.stylesheets.borrow_mut()),
+ StylesheetSetRef::Document(&mut *self.stylesheets.borrow_mut()),
)
}
}
diff --git a/components/script/dom/documentorshadowroot.rs b/components/script/dom/documentorshadowroot.rs
index 03932159359..5aa2a9eb625 100644
--- a/components/script/dom/documentorshadowroot.rs
+++ b/components/script/dom/documentorshadowroot.rs
@@ -24,7 +24,7 @@ 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::stylesheet_set::StylesheetSet;
+use style::stylesheet_set::StylesheetSetRef;
use style::stylesheets::{CssRule, Origin, Stylesheet};
#[derive(Clone, JSTraceable, MallocSizeOf)]
@@ -216,7 +216,7 @@ impl DocumentOrShadowRoot {
pub fn remove_stylesheet(
owner: &Element,
s: &Arc<Stylesheet>,
- mut stylesheets: StylesheetSet<StyleSheetInDocument>,
+ mut stylesheets: StylesheetSetRef<StyleSheetInDocument>,
) {
let guard = s.shared_lock.read();
@@ -236,7 +236,7 @@ impl DocumentOrShadowRoot {
#[allow(unrooted_must_root)] // Owner needs to be rooted already necessarily.
pub fn add_stylesheet(
owner: &Element,
- mut stylesheets: StylesheetSet<StyleSheetInDocument>,
+ mut stylesheets: StylesheetSetRef<StyleSheetInDocument>,
sheet: Arc<Stylesheet>,
insertion_point: Option<StyleSheetInDocument>,
style_shared_lock: &StyleSharedRwLock,
diff --git a/components/script/dom/shadowroot.rs b/components/script/dom/shadowroot.rs
index a32f9bb5c24..153993a1d62 100644
--- a/components/script/dom/shadowroot.rs
+++ b/components/script/dom/shadowroot.rs
@@ -25,7 +25,7 @@ use style::author_styles::AuthorStyles;
use style::dom::TElement;
use style::media_queries::Device;
use style::shared_lock::SharedRwLockReadGuard;
-use style::stylesheet_set::StylesheetSet;
+use style::stylesheet_set::StylesheetSetRef;
use style::stylesheets::Stylesheet;
// https://dom.spec.whatwg.org/#interface-shadowroot
@@ -102,7 +102,7 @@ impl ShadowRoot {
.cloned();
DocumentOrShadowRoot::add_stylesheet(
owner,
- StylesheetSet::Author(stylesheets),
+ StylesheetSetRef::Author(stylesheets),
sheet,
insertion_point,
self.document.style_shared_lock(),
@@ -115,7 +115,7 @@ impl ShadowRoot {
DocumentOrShadowRoot::remove_stylesheet(
owner,
s,
- StylesheetSet::Author(&mut self.author_styles.borrow_mut().stylesheets),
+ StylesheetSetRef::Author(&mut self.author_styles.borrow_mut().stylesheets),
)
}
diff --git a/components/style/stylesheet_set.rs b/components/style/stylesheet_set.rs
index 1abc527bbdd..ed0f5781061 100644
--- a/components/style/stylesheet_set.rs
+++ b/components/style/stylesheet_set.rs
@@ -374,7 +374,7 @@ where
}
/// Functionality common to DocumentStylesheetSet and AuthorStylesheetSet.
-pub enum StylesheetSet<'a, S>
+pub enum StylesheetSetRef<'a, S>
where
S: StylesheetInDocument + PartialEq + 'static,
{
@@ -384,7 +384,7 @@ where
Document(&'a mut DocumentStylesheetSet<S>),
}
-impl<'a, S> StylesheetSet<'a, S>
+impl<'a, S> StylesheetSetRef<'a, S>
where
S: StylesheetInDocument + PartialEq + 'static,
{
@@ -398,8 +398,8 @@ where
guard: &SharedRwLockReadGuard,
) {
match self {
- StylesheetSet::Author(set) => set.append_stylesheet(device, sheet, guard),
- StylesheetSet::Document(set) => set.append_stylesheet(device, sheet, guard),
+ StylesheetSetRef::Author(set) => set.append_stylesheet(device, sheet, guard),
+ StylesheetSetRef::Document(set) => set.append_stylesheet(device, sheet, guard),
}
}
@@ -412,10 +412,10 @@ where
guard: &SharedRwLockReadGuard,
) {
match self {
- StylesheetSet::Author(set) => {
+ StylesheetSetRef::Author(set) => {
set.insert_stylesheet_before(device, sheet, before_sheet, guard)
},
- StylesheetSet::Document(set) => {
+ StylesheetSetRef::Document(set) => {
set.insert_stylesheet_before(device, sheet, before_sheet, guard)
},
}
@@ -429,8 +429,8 @@ where
guard: &SharedRwLockReadGuard,
) {
match self {
- StylesheetSet::Author(set) => set.remove_stylesheet(device, sheet, guard),
- StylesheetSet::Document(set) => set.remove_stylesheet(device, sheet, guard),
+ StylesheetSetRef::Author(set) => set.remove_stylesheet(device, sheet, guard),
+ StylesheetSetRef::Document(set) => set.remove_stylesheet(device, sheet, guard),
}
}
}