mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Introduce a ToCssWithGuard trait
This commit is contained in:
parent
3ae2ecbec2
commit
fe4e70c5f8
16 changed files with 104 additions and 54 deletions
|
@ -20,6 +20,7 @@ use dom::cssviewportrule::CSSViewportRule;
|
|||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use std::cell::Cell;
|
||||
use style::shared_lock::SharedRwLock;
|
||||
use style::stylesheets::CssRule as StyleCssRule;
|
||||
|
||||
|
||||
|
@ -103,6 +104,10 @@ impl CSSRule {
|
|||
pub fn parent_stylesheet(&self) -> &CSSStyleSheet {
|
||||
&self.parent_stylesheet
|
||||
}
|
||||
|
||||
pub fn shared_lock(&self) -> &SharedRwLock {
|
||||
&self.parent_stylesheet.style_stylesheet().shared_lock
|
||||
}
|
||||
}
|
||||
|
||||
impl CSSRuleMethods for CSSRule {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue