Title: [270403] trunk/Source/WebCore
- Revision
- 270403
- Author
- [email protected]
- Date
- 2020-12-03 12:47:15 -0800 (Thu, 03 Dec 2020)
Log Message
[iOS][FCR] Add new look for buttons in their default state
https://bugs.webkit.org/show_bug.cgi?id=219446
<rdar://problem/71904353>
Reviewed by Wenson Hsieh.
Controls with a button-like appearance include <button> and <input>
elements with the following type attributes: “button”, “submit”,
“reset”, and “file”. All of these have the same default appearance,
with the exception of "submit", which has a darker background and
lighter text color than the others.
Note that styles for additional states (pressed, disabled) will be
added once final specifications are obtained.
* css/formControlsIOS.css:
(input:matches([type="button"], [type="submit"], [type="reset"]), input[type="file"]::-webkit-file-upload-button, button):
(input:matches([type="button"], [type="reset"]), input[type="file"]::-webkit-file-upload-button, button):
(input[type="submit"]):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintPushButtonDecorations):
The old button appearance painted a gradient over the button background.
This gradient is no longer necessary under the new design.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (270402 => 270403)
--- trunk/Source/WebCore/ChangeLog 2020-12-03 20:28:49 UTC (rev 270402)
+++ trunk/Source/WebCore/ChangeLog 2020-12-03 20:47:15 UTC (rev 270403)
@@ -1,3 +1,30 @@
+2020-12-03 Aditya Keerthi <[email protected]>
+
+ [iOS][FCR] Add new look for buttons in their default state
+ https://bugs.webkit.org/show_bug.cgi?id=219446
+ <rdar://problem/71904353>
+
+ Reviewed by Wenson Hsieh.
+
+ Controls with a button-like appearance include <button> and <input>
+ elements with the following type attributes: “button”, “submit”,
+ “reset”, and “file”. All of these have the same default appearance,
+ with the exception of "submit", which has a darker background and
+ lighter text color than the others.
+
+ Note that styles for additional states (pressed, disabled) will be
+ added once final specifications are obtained.
+
+ * css/formControlsIOS.css:
+ (input:matches([type="button"], [type="submit"], [type="reset"]), input[type="file"]::-webkit-file-upload-button, button):
+ (input:matches([type="button"], [type="reset"]), input[type="file"]::-webkit-file-upload-button, button):
+ (input[type="submit"]):
+ * rendering/RenderThemeIOS.mm:
+ (WebCore::RenderThemeIOS::paintPushButtonDecorations):
+
+ The old button appearance painted a gradient over the button background.
+ This gradient is no longer necessary under the new design.
+
2020-12-03 Fujii Hironori <[email protected]>
GraphicsContextGLOpenGL: Rename IOSurfaceTextureTarget to drawingBufferTextureTarget
Modified: trunk/Source/WebCore/css/formControlsIOS.css (270402 => 270403)
--- trunk/Source/WebCore/css/formControlsIOS.css 2020-12-03 20:28:49 UTC (rev 270402)
+++ trunk/Source/WebCore/css/formControlsIOS.css 2020-12-03 20:47:15 UTC (rev 270403)
@@ -58,4 +58,23 @@
-webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 73 73"><path fill="darkgray" d="M29.6875 59.375c6.2988 0 12.1094-1.953 16.9434-5.3222l17.334 17.334c.9277.9277 2.1484 1.3672 3.418 1.3672 2.7343 0 4.7362-2.0996 4.7362-4.7852 0-1.2695-.4394-2.4902-1.3672-3.418L53.5644 47.3145c3.6622-4.9316 5.8106-11.0352 5.8106-17.627C59.375 13.3301 46.045 0 29.6875 0 13.3301 0 0 13.3301 0 29.6875 0 46.045 13.33 59.375 29.6875 59.375zm0-7.2753c-12.2559 0-22.4121-10.1563-22.4121-22.4122 0-12.3046 10.1562-22.4121 22.4121-22.4121C41.9922 7.2754 52.1 17.3829 52.1 29.6875c0 12.256-10.1078 22.4122-22.4125 22.4122z"/></svg>');
}
+input:matches([type="button"], [type="submit"], [type="reset"]), input[type="file"]::-webkit-file-upload-button, button {
+ border: initial;
+ font: 11px system-ui;
+ font-weight: bold;
+}
+
+/* FIXME: Use semantic colors once final specifications are obtained. */
+/* FIXME: Add styles for additional button states once final specifications are obtained. */
+
+input:matches([type="button"], [type="reset"]), input[type="file"]::-webkit-file-upload-button, button {
+ background-color: rgb(235, 245, 255);
+ color: rgb(22, 122, 255);
+}
+
+input[type="submit"] {
+ background-color: rgb(22, 122, 255);
+ color: white;
+}
+
#endif
Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (270402 => 270403)
--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm 2020-12-03 20:28:49 UTC (rev 270402)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm 2020-12-03 20:47:15 UTC (rev 270403)
@@ -1077,6 +1077,11 @@
void RenderThemeIOS::paintPushButtonDecorations(const RenderObject& box, const PaintInfo& paintInfo, const IntRect& rect)
{
+#if ENABLE(IOS_FORM_CONTROL_REFRESH)
+ if (box.settings().iOSFormControlRefreshEnabled())
+ return;
+#endif
+
GraphicsContextStateSaver stateSaver(paintInfo.context());
FloatRect clip = addRoundedBorderClip(box, paintInfo.context(), rect);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes