aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/documentorshadowroot.rs
diff options
context:
space:
mode:
authorFernando Jiménez Moreno <ferjmoreno@gmail.com>2019-03-01 11:43:45 +0100
committerFernando Jiménez Moreno <ferjmoreno@gmail.com>2019-04-26 11:31:18 +0200
commit8b353ee3ced609d2de688a93dcfd825c3cef3eae (patch)
tree7e453077082bee0f1f77b5ff2d3202ae6324e64d /components/script/dom/documentorshadowroot.rs
parent3e53962b2502cdb19790519c7ec82c499d248cc1 (diff)
downloadservo-8b353ee3ced609d2de688a93dcfd825c3cef3eae.tar.gz
servo-8b353ee3ced609d2de688a93dcfd825c3cef3eae.zip
Make StylesheetSet an enum instead of a trait object
Diffstat (limited to 'components/script/dom/documentorshadowroot.rs')
-rw-r--r--components/script/dom/documentorshadowroot.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/components/script/dom/documentorshadowroot.rs b/components/script/dom/documentorshadowroot.rs
index 27d52e086c6..0165c0b8384 100644
--- a/components/script/dom/documentorshadowroot.rs
+++ b/components/script/dom/documentorshadowroot.rs
@@ -211,10 +211,9 @@ impl DocumentOrShadowRoot {
/// Remove a stylesheet owned by `owner` from the list of document sheets.
#[allow(unrooted_must_root)] // Owner needs to be rooted already necessarily.
pub fn remove_stylesheet(
- &self,
owner: &Element,
s: &Arc<Stylesheet>,
- stylesheets: &mut StylesheetSet<StyleSheetInDocument>,
+ mut stylesheets: StylesheetSet<StyleSheetInDocument>,
) {
let guard = s.shared_lock.read();
@@ -233,9 +232,8 @@ impl DocumentOrShadowRoot {
/// correct tree position.
#[allow(unrooted_must_root)] // Owner needs to be rooted already necessarily.
pub fn add_stylesheet(
- &self,
owner: &Element,
- stylesheets: &mut StylesheetSet<StyleSheetInDocument>,
+ mut stylesheets: StylesheetSet<StyleSheetInDocument>,
sheet: Arc<Stylesheet>,
insertion_point: Option<StyleSheetInDocument>,
style_shared_lock: &StyleSharedRwLock,