Title: [280910] trunk
- Revision
- 280910
- Author
- [email protected]
- Date
- 2021-08-11 08:40:13 -0700 (Wed, 11 Aug 2021)
Log Message
HTMLStyleElement should create its style sheet even if its media attribute is invalid
https://bugs.webkit.org/show_bug.cgi?id=228977
Reviewed by Antti Koivisto.
LayoutTests/imported/w3c:
Rebaseline WPT test that is now passing.
* web-platform-tests/html/semantics/document-metadata/the-style-element/style_non_matching_media-expected.txt:
Source/WebCore:
HTMLStyleElement should create its style sheet even if its media attribute is invalid.
WebKit currently didn't and this was causing us to fail the following WPT test:
- html/semantics/document-metadata/the-style-element/style_non_matching_media.html
This WPT test is passing in both Firefox and Chrome.
No new tests, rebaselined existing tests.
* dom/InlineStyleSheetOwner.cpp:
(WebCore::InlineStyleSheetOwner::createSheet):
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (280909 => 280910)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-08-11 15:39:04 UTC (rev 280909)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-08-11 15:40:13 UTC (rev 280910)
@@ -1,5 +1,16 @@
2021-08-11 Chris Dumez <[email protected]>
+ HTMLStyleElement should create its style sheet even if its media attribute is invalid
+ https://bugs.webkit.org/show_bug.cgi?id=228977
+
+ Reviewed by Antti Koivisto.
+
+ Rebaseline WPT test that is now passing.
+
+ * web-platform-tests/html/semantics/document-metadata/the-style-element/style_non_matching_media-expected.txt:
+
+2021-08-11 Chris Dumez <[email protected]>
+
Dynamically changing HTMLStyleElement.type should change the rendering accordingly
https://bugs.webkit.org/show_bug.cgi?id=228980
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-style-element/style_non_matching_media-expected.txt (280909 => 280910)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-style-element/style_non_matching_media-expected.txt 2021-08-11 15:39:04 UTC (rev 280909)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-style-element/style_non_matching_media-expected.txt 2021-08-11 15:40:13 UTC (rev 280910)
@@ -1,3 +1,3 @@
-FAIL HTML Test: Non-matching media type should have stylesheet assert_equals: expected 1 but got 0
+PASS HTML Test: Non-matching media type should have stylesheet
Modified: trunk/Source/WebCore/ChangeLog (280909 => 280910)
--- trunk/Source/WebCore/ChangeLog 2021-08-11 15:39:04 UTC (rev 280909)
+++ trunk/Source/WebCore/ChangeLog 2021-08-11 15:40:13 UTC (rev 280910)
@@ -1,5 +1,24 @@
2021-08-11 Chris Dumez <[email protected]>
+ HTMLStyleElement should create its style sheet even if its media attribute is invalid
+ https://bugs.webkit.org/show_bug.cgi?id=228977
+
+ Reviewed by Antti Koivisto.
+
+ HTMLStyleElement should create its style sheet even if its media attribute is invalid.
+
+ WebKit currently didn't and this was causing us to fail the following WPT test:
+ - html/semantics/document-metadata/the-style-element/style_non_matching_media.html
+
+ This WPT test is passing in both Firefox and Chrome.
+
+ No new tests, rebaselined existing tests.
+
+ * dom/InlineStyleSheetOwner.cpp:
+ (WebCore::InlineStyleSheetOwner::createSheet):
+
+2021-08-11 Chris Dumez <[email protected]>
+
Dynamically changing HTMLStyleElement.type should change the rendering accordingly
https://bugs.webkit.org/show_bug.cgi?id=228980
Modified: trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp (280909 => 280910)
--- trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp 2021-08-11 15:39:04 UTC (rev 280909)
+++ trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp 2021-08-11 15:40:13 UTC (rev 280910)
@@ -174,12 +174,6 @@
auto mediaQueries = MediaQuerySet::create(m_media, MediaQueryParserContext(document));
- MediaQueryEvaluator screenEval("screen"_s, true);
- MediaQueryEvaluator printEval("print"_s, true);
- LOG(MediaQueries, "InlineStyleSheetOwner::createSheet evaluating queries");
- if (!screenEval.evaluate(mediaQueries.get()) && !printEval.evaluate(mediaQueries.get()))
- return;
-
if (m_styleScope)
m_styleScope->addPendingSheet(element);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes