aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2018-04-17 14:06:08 -0400
committerGitHub <noreply@github.com>2018-04-17 14:06:08 -0400
commit087bd20b6d4e61fd54b71ed42a0ce757f993bb66 (patch)
treed9832afccb299c9f17f28dd381863072d5ad2a97 /components/script/dom
parent50817554180199f67268b355e53124f55f68207a (diff)
parenta82ed50257ebafe33dac5595606a4c4e548102b2 (diff)
downloadservo-087bd20b6d4e61fd54b71ed42a0ce757f993bb66.tar.gz
servo-087bd20b6d4e61fd54b71ed42a0ce757f993bb66.zip
Auto merge of #20657 - emilio:gecko-sync, r=emilio
style: Sync changes from mozilla-central. See each individual commit from details.
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/document.rs18
1 files changed, 13 insertions, 5 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index 01b9a13ba40..71df0e70356 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -135,7 +135,7 @@ use style::selector_parser::{RestyleDamage, Snapshot};
use style::shared_lock::{SharedRwLock as StyleSharedRwLock, SharedRwLockReadGuard};
use style::str::{split_html_space_chars, str_join};
use style::stylesheet_set::DocumentStylesheetSet;
-use style::stylesheets::{Stylesheet, StylesheetContents, Origin, OriginSet};
+use style::stylesheets::{CssRule, Stylesheet, Origin, OriginSet};
use task_source::TaskSource;
use time;
use timers::OneshotTimerCallback;
@@ -216,17 +216,25 @@ impl PartialEq for StyleSheetInDocument {
}
impl ::style::stylesheets::StylesheetInDocument for StyleSheetInDocument {
- fn contents(&self, guard: &SharedRwLockReadGuard) -> &StylesheetContents {
- self.sheet.contents(guard)
+ fn origin(&self, guard: &SharedRwLockReadGuard) -> Origin {
+ self.sheet.origin(guard)
}
- fn media<'a>(&'a self, guard: &'a SharedRwLockReadGuard) -> Option<&'a MediaList> {
- self.sheet.media(guard)
+ fn quirks_mode(&self, guard: &SharedRwLockReadGuard) -> QuirksMode {
+ self.sheet.quirks_mode(guard)
}
fn enabled(&self) -> bool {
self.sheet.enabled()
}
+
+ fn media<'a>(&'a self, guard: &'a SharedRwLockReadGuard) -> Option<&'a MediaList> {
+ self.sheet.media(guard)
+ }
+
+ fn rules<'a, 'b: 'a>(&'a self, guard: &'b SharedRwLockReadGuard) -> &'a [CssRule] {
+ self.sheet.rules(guard)
+ }
}
/// <https://dom.spec.whatwg.org/#document>