LibWeb: Keep CSS sheets sorted in document tree order

This ensures that style is applied consistently, even if the document
has external CSS resources that don't always arrive in the same order.
This commit is contained in:
Andreas Kling 2022-09-09 11:08:56 +02:00
parent 32c99313a6
commit 524ec95bcd
Notes: sideshowbarker 2024-07-17 07:19:24 +09:00
4 changed files with 24 additions and 10 deletions

View file

@ -141,7 +141,7 @@ void StyleComputer::for_each_stylesheet(CascadeOrigin cascade_origin, Callback c
}
if (cascade_origin == CascadeOrigin::Author) {
for (auto const& sheet : document().style_sheets().sheets()) {
callback(sheet);
callback(*sheet);
}
}
}