Title: [279659] trunk
Revision
279659
Author
akeer...@apple.com
Date
2021-07-07 12:46:08 -0700 (Wed, 07 Jul 2021)

Log Message

[iOS] Inconsistent styling for input[type="submit"] and button[type="submit"]
https://bugs.webkit.org/show_bug.cgi?id=227043
<rdar://problem/79629354>

Reviewed by Wenson Hsieh.

Source/WebCore:

In iOS 15, submit buttons have a different appearance from standard
buttons, matching UIKit's "preferred" button style.

Previously, all buttons had the same styling, which meant that
input[type="submit"] and button[type="submit"] had the same
appearance by default. The changes made for iOS 15 were applied to
input[type="submit"], but not button[type="submit"], leading to
inconsistent styling.

Test: fast/forms/ios/form-control-refresh/button/button-type-submit.html

* css/html.css:

Ensure the different style applied to input[type="submit"] also applies
to button[type="submit"].

Additionally, apply the new style to button[type="menu"]. This type is
unsupported, but should have the same appearance as a submit button,
according to the button-type-menu-historical.html web platform test.

LayoutTests:

Added a reference test to verify that input[type="submit"] and
button[type="submit"] have the same appearance.

* fast/forms/ios/form-control-refresh/button/button-type-submit-expected.html: Added.
* fast/forms/ios/form-control-refresh/button/button-type-submit.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (279658 => 279659)


--- trunk/LayoutTests/ChangeLog	2021-07-07 19:43:49 UTC (rev 279658)
+++ trunk/LayoutTests/ChangeLog	2021-07-07 19:46:08 UTC (rev 279659)
@@ -1,3 +1,17 @@
+2021-07-07  Aditya Keerthi  <akeer...@apple.com>
+
+        [iOS] Inconsistent styling for input[type="submit"] and button[type="submit"]
+        https://bugs.webkit.org/show_bug.cgi?id=227043
+        <rdar://problem/79629354>
+
+        Reviewed by Wenson Hsieh.
+
+        Added a reference test to verify that input[type="submit"] and
+        button[type="submit"] have the same appearance.
+
+        * fast/forms/ios/form-control-refresh/button/button-type-submit-expected.html: Added.
+        * fast/forms/ios/form-control-refresh/button/button-type-submit.html: Added.
+
 2021-07-07  Commit Queue  <commit-qu...@webkit.org>
 
         Unreviewed, reverting r279271.

Added: trunk/LayoutTests/fast/forms/ios/form-control-refresh/button/button-type-submit-expected.html (0 => 279659)


--- trunk/LayoutTests/fast/forms/ios/form-control-refresh/button/button-type-submit-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/ios/form-control-refresh/button/button-type-submit-expected.html	2021-07-07 19:46:08 UTC (rev 279659)
@@ -0,0 +1,9 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ IOSFormControlRefreshEnabled=true ] -->
+<html>
+<head>
+<meta name="viewport" content="width=device-width, initial-scale=1">
+</head>
+<body>
+<input type="submit" value="Submit">
+</body>
+</html>

Added: trunk/LayoutTests/fast/forms/ios/form-control-refresh/button/button-type-submit.html (0 => 279659)


--- trunk/LayoutTests/fast/forms/ios/form-control-refresh/button/button-type-submit.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/ios/form-control-refresh/button/button-type-submit.html	2021-07-07 19:46:08 UTC (rev 279659)
@@ -0,0 +1,9 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ IOSFormControlRefreshEnabled=true ] -->
+<html>
+<head>
+<meta name="viewport" content="width=device-width, initial-scale=1">
+</head>
+<body>
+<button type="submit">Submit</button>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (279658 => 279659)


--- trunk/Source/WebCore/ChangeLog	2021-07-07 19:43:49 UTC (rev 279658)
+++ trunk/Source/WebCore/ChangeLog	2021-07-07 19:46:08 UTC (rev 279659)
@@ -1,3 +1,31 @@
+2021-07-07  Aditya Keerthi  <akeer...@apple.com>
+
+        [iOS] Inconsistent styling for input[type="submit"] and button[type="submit"]
+        https://bugs.webkit.org/show_bug.cgi?id=227043
+        <rdar://problem/79629354>
+
+        Reviewed by Wenson Hsieh.
+
+        In iOS 15, submit buttons have a different appearance from standard
+        buttons, matching UIKit's "preferred" button style.
+
+        Previously, all buttons had the same styling, which meant that
+        input[type="submit"] and button[type="submit"] had the same
+        appearance by default. The changes made for iOS 15 were applied to
+        input[type="submit"], but not button[type="submit"], leading to
+        inconsistent styling.
+
+        Test: fast/forms/ios/form-control-refresh/button/button-type-submit.html
+
+        * css/html.css:
+
+        Ensure the different style applied to input[type="submit"] also applies
+        to button[type="submit"].
+
+        Additionally, apply the new style to button[type="menu"]. This type is
+        unsupported, but should have the same appearance as a submit button,
+        according to the button-type-menu-historical.html web platform test.
+
 2021-07-07  Fujii Hironori  <hironori.fu...@sony.com>
 
         [Cairo] Merge PlatformContextCairo into GraphicsContextCairo

Modified: trunk/Source/WebCore/css/html.css (279658 => 279659)


--- trunk/Source/WebCore/css/html.css	2021-07-07 19:43:49 UTC (rev 279658)
+++ trunk/Source/WebCore/css/html.css	2021-07-07 19:46:08 UTC (rev 279659)
@@ -852,7 +852,9 @@
 
 #if defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY
 
-input[type="submit"], input[type="submit"]:active {
+input[type="submit"], input[type="submit"]:active,
+button[type="submit"], button[type="submit"]:active,
+button[type="menu"], button[type="menu"]:active {
     background-color: -apple-system-blue;
     color: white;
     font-weight: bold;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to