mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Fix build bustage after afe484e46b
.
This commit is contained in:
parent
f5c85a816a
commit
827b82dc39
2 changed files with 42 additions and 10 deletions
|
@ -135,7 +135,7 @@ use style::selector_parser::{RestyleDamage, Snapshot};
|
||||||
use style::shared_lock::{SharedRwLock as StyleSharedRwLock, SharedRwLockReadGuard};
|
use style::shared_lock::{SharedRwLock as StyleSharedRwLock, SharedRwLockReadGuard};
|
||||||
use style::str::{split_html_space_chars, str_join};
|
use style::str::{split_html_space_chars, str_join};
|
||||||
use style::stylesheet_set::DocumentStylesheetSet;
|
use style::stylesheet_set::DocumentStylesheetSet;
|
||||||
use style::stylesheets::{Stylesheet, StylesheetContents, Origin, OriginSet};
|
use style::stylesheets::{CssRule, Stylesheet, Origin, OriginSet};
|
||||||
use task_source::TaskSource;
|
use task_source::TaskSource;
|
||||||
use time;
|
use time;
|
||||||
use timers::OneshotTimerCallback;
|
use timers::OneshotTimerCallback;
|
||||||
|
@ -216,16 +216,24 @@ impl PartialEq for StyleSheetInDocument {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ::style::stylesheets::StylesheetInDocument for StyleSheetInDocument {
|
impl ::style::stylesheets::StylesheetInDocument for StyleSheetInDocument {
|
||||||
fn contents(&self, guard: &SharedRwLockReadGuard) -> &StylesheetContents {
|
fn origin(&self, guard: &SharedRwLockReadGuard) -> Origin {
|
||||||
self.sheet.contents(guard)
|
self.sheet.origin(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> {
|
fn media<'a>(&'a self, guard: &'a SharedRwLockReadGuard) -> Option<&'a MediaList> {
|
||||||
self.sheet.media(guard)
|
self.sheet.media(guard)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn enabled(&self) -> bool {
|
fn rules<'a, 'b: 'a>(&'a self, guard: &'b SharedRwLockReadGuard) -> &'a [CssRule] {
|
||||||
self.sheet.enabled()
|
self.sheet.rules(guard)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,11 +83,7 @@ impl DeepCloneWithLock for ImportSheet {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A sheet that is held from an import rule.
|
#[cfg(feature = "gecko")]
|
||||||
#[cfg(feature = "servo")]
|
|
||||||
#[derive(Debug)]
|
|
||||||
pub struct ImportSheet(pub ::servo_arc::Arc<::stylesheets::Stylesheet>);
|
|
||||||
|
|
||||||
impl StylesheetInDocument for ImportSheet {
|
impl StylesheetInDocument for ImportSheet {
|
||||||
fn origin(&self, _guard: &SharedRwLockReadGuard) -> Origin {
|
fn origin(&self, _guard: &SharedRwLockReadGuard) -> Origin {
|
||||||
match *self {
|
match *self {
|
||||||
|
@ -125,6 +121,34 @@ impl StylesheetInDocument for ImportSheet {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// A sheet that is held from an import rule.
|
||||||
|
#[cfg(feature = "servo")]
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct ImportSheet(pub ::servo_arc::Arc<::stylesheets::Stylesheet>);
|
||||||
|
|
||||||
|
#[cfg(feature = "servo")]
|
||||||
|
impl StylesheetInDocument for ImportSheet {
|
||||||
|
fn origin(&self, guard: &SharedRwLockReadGuard) -> Origin {
|
||||||
|
self.0.origin(guard)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn quirks_mode(&self, guard: &SharedRwLockReadGuard) -> QuirksMode {
|
||||||
|
self.0.quirks_mode(guard)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn enabled(&self) -> bool {
|
||||||
|
self.0.enabled()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn media<'a>(&'a self, guard: &'a SharedRwLockReadGuard) -> Option<&'a MediaList> {
|
||||||
|
self.0.media(guard)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn rules<'a, 'b: 'a>(&'a self, guard: &'b SharedRwLockReadGuard) -> &'a [CssRule] {
|
||||||
|
self.0.rules(guard)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(feature = "servo")]
|
#[cfg(feature = "servo")]
|
||||||
impl DeepCloneWithLock for ImportSheet {
|
impl DeepCloneWithLock for ImportSheet {
|
||||||
fn deep_clone_with_lock(
|
fn deep_clone_with_lock(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue