Changeset 244413 in webkit
- Timestamp:
- Apr 17, 2019 4:55:47 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r244408 r244413 1 2019-04-17 Timothy Hatcher <timothy@apple.com> 2 3 Standardize the `<meta name="color-scheme">` separator. 4 https://bugs.webkit.org/show_bug.cgi?id=193931 5 6 Reviewed by Simon Fraser. 7 8 * css-dark-mode/color-scheme-meta-expected.txt: 9 * css-dark-mode/color-scheme-meta.html: 10 * css-dark-mode/older-syntax/supported-color-scheme-meta-expected.txt: 11 * css-dark-mode/older-syntax/supported-color-schemes-meta.html: 12 1 13 2019-04-17 Timothy Hatcher <timothy@apple.com> 2 14 -
trunk/LayoutTests/css-dark-mode/color-scheme-meta-expected.txt
r244408 r244413 17 17 PASS Color schemes changed to empty value 18 18 PASS Element colors are correct in dark color scheme with implicit light color scheme 19 PASS Color schemes changed to light anddark20 PASS Element colors are correct in dark color scheme with light and dark color scheme19 PASS Color schemes changed to light,dark 20 PASS Element colors are in light color scheme since comma is not an allowed seperator 21 21 PASS Color schemes changed to a bogus value and dark 22 22 PASS Element colors are correct in dark color scheme with dark color scheme -
trunk/LayoutTests/css-dark-mode/color-scheme-meta.html
r244408 r244413 93 93 94 94 test(function() { 95 document.getElementById("meta").content = "light ,foo ";95 document.getElementById("meta").content = "light foo "; 96 96 }, "Color schemes changed to light and a bogus value"); 97 97 … … 111 111 112 112 test(function() { 113 document.getElementById("meta").content = " light, 114 }, "Color schemes changed to light anddark");113 document.getElementById("meta").content = " light,dark "; 114 }, "Color schemes changed to light,dark"); 115 115 116 116 test(function() { 117 // The semantic text color should be whitenow.118 test_color_is_ white("test1");119 }, "Element colors are correct in dark color scheme with light and dark color scheme");117 // The semantic text color should be black now. 118 test_color_is_black("test1"); 119 }, "Element colors are in light color scheme since comma is not an allowed seperator"); 120 120 121 121 test(function() { 122 document.getElementById("meta").content = " ,foo dark";122 document.getElementById("meta").content = " foo dark"; 123 123 }, "Color schemes changed to a bogus value and dark"); 124 124 -
trunk/LayoutTests/css-dark-mode/older-syntax/supported-color-schemes-meta-expected.txt
r244408 r244413 17 17 PASS Supported color schemes changed to empty value 18 18 PASS Element colors are correct in dark color scheme with implicit light color scheme 19 PASS Supported color schemes changed to light anddark20 PASS Element colors are correct in dark color scheme with light and dark color scheme19 PASS Supported color schemes changed to light,dark 20 PASS Element colors are in light color scheme since comma is not an allowed seperator 21 21 PASS Supported color schemes changed to a bogus value and dark 22 22 PASS Element colors are correct in dark color scheme with dark color scheme -
trunk/LayoutTests/css-dark-mode/older-syntax/supported-color-schemes-meta.html
r244408 r244413 111 111 112 112 test(function() { 113 document.getElementById("meta").content = " light, 114 }, "Supported color schemes changed to light anddark");113 document.getElementById("meta").content = " light,dark "; 114 }, "Supported color schemes changed to light,dark"); 115 115 116 116 test(function() { 117 // The semantic text color should be whitenow.118 test_color_is_ white("test1");119 }, "Element colors are correct in dark color scheme with light and dark color scheme");117 // The semantic text color should be black now. 118 test_color_is_black("test1"); 119 }, "Element colors are in light color scheme since comma is not an allowed seperator"); 120 120 121 121 test(function() { 122 document.getElementById("meta").content = " ,foo dark";122 document.getElementById("meta").content = " foo dark"; 123 123 }, "Supported color schemes changed to a bogus value and dark"); 124 124 -
trunk/Source/WebCore/ChangeLog
r244408 r244413 1 2019-04-17 Timothy Hatcher <timothy@apple.com> 2 3 Standardize the `<meta name="color-scheme">` separator. 4 https://bugs.webkit.org/show_bug.cgi?id=193931 5 6 Reviewed by Simon Fraser. 7 8 Drop support for comma as a valid seperator in <meta name="color-scheme"> to 9 match the proposal being tracked by: https://github.com/whatwg/html/issues/4504 10 11 Tests: css-dark-mode/color-scheme-meta.html 12 css-dark-mode/older-syntax/supported-color-schemes-meta.html 13 14 * dom/Document.cpp: 15 (WebCore::isColorSchemeSeparator): Drop support for comma. 16 1 17 2019-04-17 Timothy Hatcher <timothy@apple.com> 2 18 -
trunk/Source/WebCore/dom/Document.cpp
r244408 r244413 3617 3617 3618 3618 #if ENABLE(DARK_MODE_CSS) 3619 static bool isColorSchemeSeparator(UChar character)3620 { 3621 return isASCIISpace(character) || character == ',';3619 static inline bool isColorSchemeSeparator(UChar character) 3620 { 3621 return isASCIISpace(character); 3622 3622 } 3623 3623
Note: See TracChangeset
for help on using the changeset viewer.