mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Pass CSS loader to Servo for insertRule.
This commit is contained in:
parent
975043d0ce
commit
a097a293b5
3 changed files with 29 additions and 8 deletions
|
@ -92,7 +92,10 @@ impl CSSRuleList {
|
|||
let parent_stylesheet = self.parent_stylesheet.style_stylesheet();
|
||||
let new_rule = {
|
||||
let mut guard = parent_stylesheet.shared_lock.write();
|
||||
css_rules.write_with(&mut guard).insert_rule(rule, parent_stylesheet, index, nested)?
|
||||
// FIXME We should probably pass in a proper StylesheetLoader.
|
||||
// See servo/servo#16240
|
||||
css_rules.write_with(&mut guard).insert_rule(rule, parent_stylesheet,
|
||||
index, nested, None)?
|
||||
// Drop `guard` here,
|
||||
// CSSRule::new_specific re-acquires the lock for @support and @media.
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue