diff --git a/Tests/LibWeb/Text/expected/css/constructed-style-sheets.txt b/Tests/LibWeb/Text/expected/css/constructed-style-sheets.txt new file mode 100644 index 00000000000..9359dbb8690 --- /dev/null +++ b/Tests/LibWeb/Text/expected/css/constructed-style-sheets.txt @@ -0,0 +1 @@ +Disabled constructed style sheet applies to document: false diff --git a/Tests/LibWeb/Text/input/css/constructed-style-sheets.html b/Tests/LibWeb/Text/input/css/constructed-style-sheets.html new file mode 100644 index 00000000000..64de3f5f029 --- /dev/null +++ b/Tests/LibWeb/Text/input/css/constructed-style-sheets.html @@ -0,0 +1,20 @@ + + + diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index 9e065b17b52..80528f74948 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -4904,7 +4904,7 @@ void Document::for_each_css_style_sheet(Function&& ca if (m_adopted_style_sheets) { m_adopted_style_sheets->for_each([&](auto& style_sheet) { - if (!(style_sheet.is_alternate() && style_sheet.disabled())) + if (!style_sheet.disabled()) callback(style_sheet); }); }