mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Make parent stylesheet optional for CSSRules
This commit is contained in:
parent
52a3a71be3
commit
53c99662bc
11 changed files with 41 additions and 32 deletions
|
@ -15,14 +15,14 @@ pub struct CSSGroupingRule {
|
|||
}
|
||||
|
||||
impl CSSGroupingRule {
|
||||
pub fn new_inherited(parent: &CSSStyleSheet) -> CSSGroupingRule {
|
||||
pub fn new_inherited(parent: Option<&CSSStyleSheet>) -> CSSGroupingRule {
|
||||
CSSGroupingRule {
|
||||
cssrule: CSSRule::new_inherited(parent),
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(window: &Window, parent: &CSSStyleSheet) -> Root<CSSGroupingRule> {
|
||||
pub fn new(window: &Window, parent: Option<&CSSStyleSheet>) -> Root<CSSGroupingRule> {
|
||||
reflect_dom_object(box CSSGroupingRule::new_inherited(parent),
|
||||
window,
|
||||
CSSGroupingRuleBinding::Wrap)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue