mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Unify how servo and Gecko handle UA sheets.
This commit is contained in:
parent
2cbd27c83a
commit
0a9309aa96
11 changed files with 122 additions and 161 deletions
|
@ -2397,9 +2397,13 @@ impl Document {
|
|||
owner.is::<HTMLMetaElement>(), "Wat");
|
||||
|
||||
let mut stylesheets = self.stylesheets.borrow_mut();
|
||||
let insertion_point = stylesheets.iter().find(|sheet_in_doc| {
|
||||
owner.upcast::<Node>().is_before(sheet_in_doc.owner.upcast())
|
||||
}).cloned();
|
||||
let insertion_point =
|
||||
stylesheets
|
||||
.iter()
|
||||
.map(|(sheet, _origin)| sheet)
|
||||
.find(|sheet_in_doc| {
|
||||
owner.upcast::<Node>().is_before(sheet_in_doc.owner.upcast())
|
||||
}).cloned();
|
||||
|
||||
self.window()
|
||||
.layout_chan()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue