diff --git a/Tests/LibWeb/Layout/expected/css-imported-sheet-with-media-rule.txt b/Tests/LibWeb/Layout/expected/css-imported-sheet-with-media-rule.txt new file mode 100644 index 0000000000..1769f5d796 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/css-imported-sheet-with-media-rule.txt @@ -0,0 +1,7 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (0,0) content-size 800x125.179687 children: not-inline + BlockContainer
at (8,8) content-size 784x109.179687 children: inline + line 0 width: 275.292968, height: 109.179687, bottom: 109.179687, baseline: 84.570312 + frag 0 from TextNode start: 0, length: 5, rect: [8,8 275.292968x109.179687] + "Crazy" + TextNode <#text> diff --git a/Tests/LibWeb/Layout/input/css-imported-sheet-with-media-rule.css b/Tests/LibWeb/Layout/input/css-imported-sheet-with-media-rule.css new file mode 100644 index 0000000000..fe93702aae --- /dev/null +++ b/Tests/LibWeb/Layout/input/css-imported-sheet-with-media-rule.css @@ -0,0 +1,5 @@ +@media screen { + body { + font-size: 100px; + } +} diff --git a/Tests/LibWeb/Layout/input/css-imported-sheet-with-media-rule.html b/Tests/LibWeb/Layout/input/css-imported-sheet-with-media-rule.html new file mode 100644 index 0000000000..7cf047ffe4 --- /dev/null +++ b/Tests/LibWeb/Layout/input/css-imported-sheet-with-media-rule.html @@ -0,0 +1,7 @@ + +Crazy diff --git a/Userland/Libraries/LibWeb/CSS/CSSImportRule.h b/Userland/Libraries/LibWeb/CSS/CSSImportRule.h index caf436c90a..03df9a6e96 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSImportRule.h +++ b/Userland/Libraries/LibWeb/CSS/CSSImportRule.h @@ -29,7 +29,6 @@ public: // FIXME: This should return only the specified part of the url. eg, "stuff/foo.css", not "https://example.com/stuff/foo.css". DeprecatedString href() const { return m_url.to_deprecated_string(); } - bool has_import_result() const { return !m_style_sheet; } CSSStyleSheet* loaded_style_sheet() { return m_style_sheet; } CSSStyleSheet const* loaded_style_sheet() const { return m_style_sheet; } CSSStyleSheet* style_sheet_for_bindings() { return m_style_sheet; } diff --git a/Userland/Libraries/LibWeb/CSS/CSSRuleList.cpp b/Userland/Libraries/LibWeb/CSS/CSSRuleList.cpp index 8b26140d2b..27c3e5335f 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSRuleList.cpp +++ b/Userland/Libraries/LibWeb/CSS/CSSRuleList.cpp @@ -128,7 +128,7 @@ void CSSRuleList::for_each_effective_style_rule(Function