Title: [279383] trunk
- Revision
- 279383
- Author
- da...@apple.com
- Date
- 2021-06-29 13:36:58 -0700 (Tue, 29 Jun 2021)
Log Message
CSS style sheets loaded by HTMLLinkElement do not fall back correctly when charset is an invalid encoding name
https://bugs.webkit.org/show_bug.cgi?id=227498
Reviewed by Sam Weinig.
LayoutTests/imported/w3c:
* web-platform-tests/css/css-syntax/charset/page-windows-1251-charset-attribute-bogus-expected.txt:
Expect a pass instead of a fail.
Source/WebCore:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process): Check for invalid text encoding names rather than
just empty string.
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (279382 => 279383)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-06-29 20:21:02 UTC (rev 279382)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-06-29 20:36:58 UTC (rev 279383)
@@ -1,3 +1,13 @@
+2021-06-29 Darin Adler <da...@apple.com>
+
+ CSS style sheets loaded by HTMLLinkElement do not fall back correctly when charset is an invalid encoding name
+ https://bugs.webkit.org/show_bug.cgi?id=227498
+
+ Reviewed by Sam Weinig.
+
+ * web-platform-tests/css/css-syntax/charset/page-windows-1251-charset-attribute-bogus-expected.txt:
+ Expect a pass instead of a fail.
+
2021-06-29 Alex Christensen <achristen...@webkit.org>
xhr.send(URLSearchParams) should align default Content-Type header field with Chrome and Firefox
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-syntax/charset/page-windows-1251-charset-attribute-bogus-expected.txt (279382 => 279383)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-syntax/charset/page-windows-1251-charset-attribute-bogus-expected.txt 2021-06-29 20:21:02 UTC (rev 279382)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-syntax/charset/page-windows-1251-charset-attribute-bogus-expected.txt 2021-06-29 20:36:58 UTC (rev 279383)
@@ -1,3 +1,3 @@
-FAIL CSS charset: page windows-1251, charset attribute bogus assert_equals: expected "hidden" but got "visible"
+PASS CSS charset: page windows-1251, charset attribute bogus
Modified: trunk/Source/WebCore/ChangeLog (279382 => 279383)
--- trunk/Source/WebCore/ChangeLog 2021-06-29 20:21:02 UTC (rev 279382)
+++ trunk/Source/WebCore/ChangeLog 2021-06-29 20:36:58 UTC (rev 279383)
@@ -1,3 +1,14 @@
+2021-06-29 Darin Adler <da...@apple.com>
+
+ CSS style sheets loaded by HTMLLinkElement do not fall back correctly when charset is an invalid encoding name
+ https://bugs.webkit.org/show_bug.cgi?id=227498
+
+ Reviewed by Sam Weinig.
+
+ * html/HTMLLinkElement.cpp:
+ (WebCore::HTMLLinkElement::process): Check for invalid text encoding names rather than
+ just empty string.
+
2021-06-29 Commit Queue <commit-qu...@webkit.org>
Unreviewed, reverting r279250.
Modified: trunk/Source/WebCore/html/HTMLLinkElement.cpp (279382 => 279383)
--- trunk/Source/WebCore/html/HTMLLinkElement.cpp 2021-06-29 20:21:02 UTC (rev 279382)
+++ trunk/Source/WebCore/html/HTMLLinkElement.cpp 2021-06-29 20:36:58 UTC (rev 279383)
@@ -287,7 +287,7 @@
if (m_disabledState != Disabled && treatAsStyleSheet && document().frame() && url.isValid()) {
String charset = attributeWithoutSynchronization(charsetAttr);
- if (charset.isEmpty())
+ if (!TextEncoding { charset }.isValid())
charset = document().charset();
if (m_cachedSheet) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes