aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmllinkelement.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-09-13 14:59:16 -0500
committerGitHub <noreply@github.com>2017-09-13 14:59:16 -0500
commitd461347adf47c47a73a7242e23d57a5741872d4f (patch)
tree676274c8be842771a052e86a6a0704ae249db4c5 /components/script/dom/htmllinkelement.rs
parent6d1cdd1c9265ab45de778476663774b8b3223fb2 (diff)
parentd7a3bec6d779aca97c20286383f6ce2ae8647da5 (diff)
downloadservo-d461347adf47c47a73a7242e23d57a5741872d4f.tar.gz
servo-d461347adf47c47a73a7242e23d57a5741872d4f.zip
Auto merge of #18484 - emilio:per-origin-sheets, r=SimonSapin
style: Store stylesheets per origin This is the first step that will allow us to cache UA sheets across documents. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18484) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/htmllinkelement.rs')
-rw-r--r--components/script/dom/htmllinkelement.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/htmllinkelement.rs b/components/script/dom/htmllinkelement.rs
index 963f570700a..f1a8242b345 100644
--- a/components/script/dom/htmllinkelement.rs
+++ b/components/script/dom/htmllinkelement.rs
@@ -242,8 +242,8 @@ impl VirtualMethods for HTMLLinkElement {
s.unbind_from_tree(context);
}
- if let Some(ref s) = *self.stylesheet.borrow() {
- document_from_node(self).remove_stylesheet(self.upcast(), s);
+ if let Some(s) = self.stylesheet.borrow_mut().take() {
+ document_from_node(self).remove_stylesheet(self.upcast(), &s);
}
}
}