1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:58:11 +00:00

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
4 changed files with 24 additions and 10 deletions

View file

@ -1582,7 +1582,7 @@ void Document::evaluate_media_rules()
{
bool any_media_queries_changed_match_state = false;
for (auto& style_sheet : style_sheets().sheets()) {
if (style_sheet.evaluate_media_queries(window()))
if (style_sheet->evaluate_media_queries(window()))
any_media_queries_changed_match_state = true;
}