Log Message
[Forms] change the default appearance of button, checkbox etc. to 'auto' https://bugs.webkit.org/show_bug.cgi?id=236012
Reviewed by Tim Nguyen. LayoutTests/imported/w3c: * web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt: Source/WebCore: Change the default appearance of a few element to 'auto'. This shouldn't change rendering behavior, but changes LayoutTests: * platform/ios-wk2/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt: Removed. * platform/mac-wk1/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt: Removed.
Modified Paths
- trunk/LayoutTests/ChangeLog
- trunk/LayoutTests/imported/w3c/ChangeLog
- trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt
- trunk/Source/WebCore/ChangeLog
- trunk/Source/WebCore/css/html.css
- trunk/Source/WebCore/rendering/RenderTheme.cpp
- trunk/Source/WebCore/rendering/RenderThemeIOS.mm
Removed Paths
- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/
- trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/
Diff
Modified: trunk/LayoutTests/ChangeLog (292375 => 292376)
--- trunk/LayoutTests/ChangeLog 2022-04-05 05:36:45 UTC (rev 292375)
+++ trunk/LayoutTests/ChangeLog 2022-04-05 05:38:59 UTC (rev 292376)
@@ -1,3 +1,13 @@
+2022-04-04 Ziran Sun <[email protected]>
+
+ [Forms] change the default appearance of button, checkbox etc. to 'auto'
+ https://bugs.webkit.org/show_bug.cgi?id=236012
+
+ Reviewed by Tim Nguyen.
+
+ * platform/ios-wk2/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt: Removed.
+ * platform/mac-wk1/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt: Removed.
+
2022-04-04 Matteo Flores <[email protected]>
REGRESSION(r291770-r291762): [ iOS ] css3/background/background-repeat-round-auto1.html is a flaky image failure
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (292375 => 292376)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2022-04-05 05:36:45 UTC (rev 292375)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2022-04-05 05:38:59 UTC (rev 292376)
@@ -1,3 +1,12 @@
+2022-04-04 Ziran Sun <[email protected]>
+
+ [Forms] change the default appearance of button, checkbox etc. to 'auto'
+ https://bugs.webkit.org/show_bug.cgi?id=236012
+
+ Reviewed by Tim Nguyen.
+
+ * web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt:
+
2022-04-04 J Pascoe <[email protected]>
[ iOS 15 ] imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any.worker.html is flaky timing out
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt (292375 => 292376)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt 2022-04-05 05:36:45 UTC (rev 292375)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt 2022-04-05 05:38:59 UTC (rev 292376)
@@ -1,33 +1,33 @@
-FAIL <input> assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL <input type="text"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL <input type="TEXT"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL <input type="search"> assert_equals: -webkit-appearance expected "auto" but got "searchfield"
-FAIL <input type="tel"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL <input type="url"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL <input type="email"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL <input type="password"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL <input type="date"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL <input type="month"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL <input type="week"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL <input type="time"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL <input type="datetime-local"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL <input type="number"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL <input type="range"> assert_equals: -webkit-appearance expected "auto" but got "slider-horizontal"
-FAIL <input type="color"> assert_equals: -webkit-appearance expected "auto" but got "color-well"
-FAIL <input type="checkbox"> assert_equals: -webkit-appearance expected "auto" but got "checkbox"
-FAIL <input type="radio"> assert_equals: -webkit-appearance expected "auto" but got "radio"
-FAIL <input type="submit"> assert_equals: -webkit-appearance expected "auto" but got "push-button"
-FAIL <input type="reset"> assert_equals: -webkit-appearance expected "auto" but got "push-button"
-FAIL <input type="button"> assert_equals: -webkit-appearance expected "auto" but got "push-button"
-FAIL <input type="unknowntype"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL <select> assert_equals: -webkit-appearance expected "auto" but got "menulist"
-FAIL <select multiple=""> assert_equals: -webkit-appearance expected "auto" but got "listbox"
-FAIL <select size="2"> assert_equals: -webkit-appearance expected "auto" but got "listbox"
-FAIL <button> assert_equals: -webkit-appearance expected "auto" but got "button"
-FAIL <textarea> assert_equals: -webkit-appearance expected "auto" but got "textarea"
-FAIL <meter> assert_equals: -webkit-appearance expected "auto" but got "meter"
-FAIL <progress> assert_equals: -webkit-appearance expected "auto" but got "progress-bar"
+PASS <input>
+PASS <input type="text">
+PASS <input type="TEXT">
+PASS <input type="search">
+PASS <input type="tel">
+PASS <input type="url">
+PASS <input type="email">
+PASS <input type="password">
+PASS <input type="date">
+PASS <input type="month">
+PASS <input type="week">
+PASS <input type="time">
+PASS <input type="datetime-local">
+PASS <input type="number">
+PASS <input type="range">
+PASS <input type="color">
+PASS <input type="checkbox">
+PASS <input type="radio">
+PASS <input type="submit">
+PASS <input type="reset">
+PASS <input type="button">
+PASS <input type="unknowntype">
+PASS <select>
+PASS <select multiple="">
+PASS <select size="2">
+PASS <button>
+PASS <textarea>
+PASS <meter>
+PASS <progress>
PASS <input type="hidden">
PASS <input type="HIDDEN">
PASS <input type="file">
Modified: trunk/Source/WebCore/ChangeLog (292375 => 292376)
--- trunk/Source/WebCore/ChangeLog 2022-04-05 05:36:45 UTC (rev 292375)
+++ trunk/Source/WebCore/ChangeLog 2022-04-05 05:38:59 UTC (rev 292376)
@@ -1,3 +1,43 @@
+2022-04-04 Ziran Sun <[email protected]>
+
+ [Forms] change the default appearance of button, checkbox etc. to 'auto'
+ https://bugs.webkit.org/show_bug.cgi?id=236012
+
+ Reviewed by Tim Nguyen.
+
+ Change the default appearance of a few element to 'auto'.
+ This shouldn't change rendering behavior, but changes
+| getComputedStyle(element)['appearance']| results. The new behavior
+ matches to Firefox and chromium.
+
+ * css/html.css:
+ (button):
+ (#if defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY):
+ (#endif):
+ (input[type="search"]::-webkit-search-cancel-button):
+ (input[type="search"]::-webkit-search-decoration):
+ (input[type="search"]::-webkit-search-results-decoration):
+ (input[type="search"]::-webkit-search-results-button):
+ (#if defined(ENABLE_DATE_AND_TIME_INPUT_TYPES) && ENABLE_DATE_AND_TIME_INPUT_TYPES):
+ (input::-webkit-inner-spin-button):
+ (input::-webkit-caps-lock-indicator):
+ (#if defined(ENABLE_DATALIST_ELEMENT) && ENABLE_DATALIST_ELEMENT):
+ (textarea):
+ (input:is([type="hidden"], [type="image"], [type="file"])):
+ (input:is([type="button"], [type="submit"], [type="reset"])):
+ (input[type="file"]::file-selector-button):
+ (input[type="range"]::-webkit-slider-thumb, input[type="range"]::-webkit-media-slider-thumb):
+ (input[type="checkbox"]):
+ (#endif // defined(ENABLE_INPUT_TYPE_COLOR) && ENABLE_INPUT_TYPE_COLOR):
+ (#if !(defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)):
+ (select:is([size=""], [size="0"], [size="1"])):
+ (meter):
+ (progress):
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::colorInputStyleSheet const):
+ * rendering/RenderThemeIOS.mm:
+ (WebCore::RenderThemeIOS::colorInputStyleSheet const):
+
2022-04-04 Antti Koivisto <[email protected]>
[CSS Container Queries] Simplify grammar
Modified: trunk/Source/WebCore/css/html.css (292375 => 292376)
--- trunk/Source/WebCore/css/html.css 2022-04-05 05:36:45 UTC (rev 292375)
+++ trunk/Source/WebCore/css/html.css 2022-04-05 05:38:59 UTC (rev 292376)
@@ -373,7 +373,7 @@
}
button {
- -webkit-appearance: button;
+ appearance: auto;
}
/* Form controls don't go vertical. */
@@ -405,7 +405,7 @@
textarea,
#endif
input {
- -webkit-appearance: textfield;
+ appearance: auto;
#if defined(HAVE_OS_DARK_MODE_SUPPORT) && HAVE_OS_DARK_MODE_SUPPORT
color: text;
background-color: -webkit-control-background;
@@ -435,7 +435,7 @@
#endif
input[type="search"] {
- -webkit-appearance: searchfield;
+ appearance: auto;
box-sizing: border-box;
#if defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY
border: 1px solid -webkit-control-background;
@@ -450,7 +450,7 @@
}
input[type="search"]::-webkit-search-cancel-button {
- -webkit-appearance: searchfield-cancel-button;
+ appearance: auto;
display: block;
flex: none;
align-self: flex-start;
@@ -458,7 +458,7 @@
}
input[type="search"]::-webkit-search-decoration {
- -webkit-appearance: searchfield-decoration;
+ appearance: auto;
display: block;
flex: none;
align-self: flex-start;
@@ -466,7 +466,7 @@
}
input[type="search"]::-webkit-search-results-decoration {
- -webkit-appearance: searchfield-results-decoration;
+ appearance: auto;
display: block;
flex: none;
align-self: flex-start;
@@ -474,7 +474,7 @@
}
input[type="search"]::-webkit-search-results-button {
- -webkit-appearance: searchfield-results-button;
+ appearance: auto;
display: block;
flex: none;
#if defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY
@@ -485,12 +485,11 @@
#if defined(ENABLE_DATE_AND_TIME_INPUT_TYPES) && ENABLE_DATE_AND_TIME_INPUT_TYPES
input:is([type="date"], [type="time"], [type="datetime-local"], [type="month"], [type="week"]) {
- -webkit-appearance: textfield;
+ appearance: auto;
align-items: center;
display: -webkit-inline-flex;
overflow: hidden;
#if defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY
- -webkit-appearance: menulist-button;
border: 1px solid -webkit-control-background;
background-color: -apple-system-opaque-secondary-fill;
font-family: system-ui;
@@ -497,7 +496,6 @@
color: -apple-system-blue;
padding: 0.2em 0.5em;
#else
- -webkit-appearance: textfield;
outline: none;
font-variant-numeric: tabular-nums;
/* FIXME: Font features should be defined in a @font-feature-values rule, so that the feature setting is only applied to the system font. */
@@ -590,7 +588,7 @@
}
input::-webkit-inner-spin-button {
- -webkit-appearance: inner-spin-button;
+ appearance: auto;
display: block;
position: relative;
cursor: default;
@@ -679,7 +677,7 @@
}
input::-webkit-caps-lock-indicator {
- -webkit-appearance: caps-lock-indicator;
+ appearance: auto;
content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="17" height="17"><path fill="black" fill-opacity="0.4" d="M12.5 0.5A 4 4 0 0 1 16.5 4.5L 16.5 12.5A 4 4 0 0 1 12.5 16.5L 4.5 16.5A 4 4 0 0 1 0.5 12.5L 0.5 4.5A 4 4 0 0 1 4.5 0.5L 12.5 0.5M 8.5 2L 4 7L 6.25 7L 6.25 10.25L 10.75 10.25L 10.75 7L 13 7L 8.5 2M 10.75 12L 6.25 12L 6.25 14.25L 10.75 14.25L 10.75 12"/></svg>');
max-width: 17px;
align-self: stretch;
@@ -689,7 +687,7 @@
#if defined(ENABLE_DATALIST_ELEMENT) && ENABLE_DATALIST_ELEMENT
input::-webkit-list-button {
- -webkit-appearance: list-button;
+ appearance: auto;
display: block;
position: relative;
cursor: default;
@@ -713,7 +711,7 @@
}
textarea {
- -webkit-appearance: textarea;
+ appearance: auto;
#if !(defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)
#if defined(HAVE_OS_DARK_MODE_SUPPORT) && HAVE_OS_DARK_MODE_SUPPORT
color: text;
@@ -756,7 +754,7 @@
}
input:is([type="hidden"], [type="image"], [type="file"]) {
- -webkit-appearance: initial;
+ appearance: initial;
padding: initial;
background-color: initial;
border: initial;
@@ -801,12 +799,12 @@
}
input:is([type="button"], [type="submit"], [type="reset"]) {
- -webkit-appearance: push-button;
+ appearance: auto;
white-space: pre;
}
input[type="file"]::file-selector-button {
- -webkit-appearance: push-button;
+ appearance: auto;
white-space: nowrap;
margin: 0;
font-size: inherit;
@@ -852,7 +850,7 @@
#endif
input[type="range"] {
- -webkit-appearance: slider-horizontal;
+ appearance: auto;
padding: initial;
border: initial;
margin: 2px;
@@ -876,7 +874,7 @@
}
input[type="range"]::-webkit-slider-thumb, input[type="range"]::-webkit-media-slider-thumb {
- -webkit-appearance: sliderthumb-horizontal;
+ appearance: auto;
box-sizing: border-box;
display: block;
}
@@ -944,7 +942,7 @@
}
input[type="checkbox"] {
- -webkit-appearance: checkbox;
+ appearance: auto;
#if !(defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)
box-sizing: border-box;
#else
@@ -959,7 +957,7 @@
#if defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY
input[type="radio"] {
- -webkit-appearance: radio;
+ appearance: auto;
border-radius: 50%;
width: 16px;
height: 16px;
@@ -993,7 +991,7 @@
#if !(defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)
input[type="radio"] {
- -webkit-appearance: radio;
+ appearance: auto;
box-sizing: border-box;
}
#endif
@@ -1033,8 +1031,8 @@
select {
box-sizing: border-box;
+ appearance: auto;
#if defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY
- -webkit-appearance: menulist-button;
letter-spacing: normal;
word-spacing: normal;
line-height: normal;
@@ -1045,7 +1043,6 @@
border-radius: initial;
background-color: -apple-system-opaque-secondary-fill;
#else
- -webkit-appearance: menulist;
border: 1px solid;
#if defined(HAVE_OS_DARK_MODE_SUPPORT) && HAVE_OS_DARK_MODE_SUPPORT
color: text;
@@ -1063,7 +1060,7 @@
#if !(defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)
select:is([size], [multiple]), select[size][multiple] {
- -webkit-appearance: listbox;
+ appearance: auto;
align-items: flex-start;
border: 1px inset gray;
border-radius: initial;
@@ -1071,7 +1068,7 @@
}
select:is([size=""], [size="0"], [size="1"]) {
- -webkit-appearance: menulist;
+ appearance: auto;
align-items: center;
border: 1px solid;
border-radius: 5px;
@@ -1157,7 +1154,7 @@
/* meter */
meter {
- -webkit-appearance: meter;
+ appearance: auto;
box-sizing: border-box;
display: inline-block;
height: 1em;
@@ -1168,7 +1165,7 @@
/* progress */
progress {
- -webkit-appearance: progress-bar;
+ appearance: auto;
box-sizing: border-box;
display: inline-block;
height: 1em;
Modified: trunk/Source/WebCore/rendering/RenderTheme.cpp (292375 => 292376)
--- trunk/Source/WebCore/rendering/RenderTheme.cpp 2022-04-05 05:36:45 UTC (rev 292375)
+++ trunk/Source/WebCore/rendering/RenderTheme.cpp 2022-04-05 05:38:59 UTC (rev 292376)
@@ -1232,7 +1232,7 @@
String RenderTheme::colorInputStyleSheet(const Settings&) const
{
- return "input[type=\"color\"] { -webkit-appearance: color-well; width: 44px; height: 23px; outline: none; } "_s;
+ return "input[type=\"color\"] { appearance: auto; width: 44px; height: 23px; outline: none; } "_s;
}
#endif // ENABLE(INPUT_TYPE_COLOR)
Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (292375 => 292376)
--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm 2022-04-05 05:36:45 UTC (rev 292375)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm 2022-04-05 05:38:59 UTC (rev 292376)
@@ -2605,7 +2605,7 @@
if (!settings.iOSFormControlRefreshEnabled())
return RenderTheme::colorInputStyleSheet(settings);
- return "input[type=\"color\"] { -webkit-appearance: color-well; width: 28px; height: 28px; outline: none; border: initial; border-radius: 50%; } "_s;
+ return "input[type=\"color\"] { appearance: auto; width: 28px; height: 28px; outline: none; border: initial; border-radius: 50%; } "_s;
}
void RenderThemeIOS::adjustColorWellStyle(RenderStyle& style, const Element* element) const
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
