Title: [275355] trunk
Revision
275355
Author
[email protected]
Date
2021-04-01 06:37:02 -0700 (Thu, 01 Apr 2021)

Log Message

[iOS] '-webkit-appearance: none' is not respected for searchfield decorations
https://bugs.webkit.org/show_bug.cgi?id=224018

Reviewed by Antti Koivisto.

Source/WebCore:

Specifying '-webkit-appearance: none' on a searchfield decoration
pseudo-element fails to hide the native icon. This issue arises from
the fact that we add the icon in the UA stylesheet, rather than painting
it in the theme.

To fix, remove the styles from the UA stylesheet, and paint the icon in
RenderThemeIOS. If a different '-webkit-appearance' is specified the
theme will not adjust styles or paint the icon.

Test: fast/forms/ios/form-control-refresh/search/search-decoration-appearance.html

* css/html.css:

Remove the UA styles for searchfield decorations so that they are not
applied when specifying a different -webkit-appearance.

* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::adjustSearchFieldDecorationPartStyle const):

Adjust the style to match the native appearance.

(WebCore::RenderThemeIOS::paintSearchFieldDecorationPart):

Paint the native icon.

(WebCore::RenderThemeIOS::adjustSearchFieldResultsDecorationPartStyle const):
(WebCore::RenderThemeIOS::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeIOS::adjustSearchFieldResultsButtonStyle const):
(WebCore::RenderThemeIOS::paintSearchFieldResultsButton):

LayoutTests:

Rebaselined tests to account for the change to the way we paint
searchfield decorations on iOS. Added a new test to verify that
'-webkit-appearance: none' is respected.

* fast/forms/ios/form-control-refresh/search/search-decoration-appearance-expected-mismatch.html: Added.
* fast/forms/ios/form-control-refresh/search/search-decoration-appearance.html: Added.
* platform/ios-simulator/fast/forms/datalist/datalist-searchinput-appearance-expected.txt:
* platform/ios/fast/css/focus-ring-exists-for-search-field-expected.txt:
* platform/ios/fast/css/input-search-padding-expected.txt:
* platform/ios/fast/css/text-input-with-webkit-border-radius-expected.txt:
* platform/ios/fast/css/text-overflow-input-expected.txt:
* platform/ios/fast/forms/box-shadow-override-expected.txt:
* platform/ios/fast/forms/control-restrict-line-height-expected.txt:
* platform/ios/fast/forms/input-appearance-height-expected.txt:
* platform/ios/fast/forms/placeholder-pseudo-style-expected.txt:
* platform/ios/fast/forms/search-cancel-button-style-sharing-expected.txt:
* platform/ios/fast/forms/search-display-none-cancel-button-expected.txt:
* platform/ios/fast/forms/search-input-rtl-expected.txt:
* platform/ios/fast/forms/search-styled-expected.txt:
* platform/ios/fast/replaced/width100percent-searchfield-expected.txt:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (275354 => 275355)


--- trunk/LayoutTests/ChangeLog	2021-04-01 11:45:53 UTC (rev 275354)
+++ trunk/LayoutTests/ChangeLog	2021-04-01 13:37:02 UTC (rev 275355)
@@ -1,3 +1,31 @@
+2021-04-01  Aditya Keerthi  <[email protected]>
+
+        [iOS] '-webkit-appearance: none' is not respected for searchfield decorations
+        https://bugs.webkit.org/show_bug.cgi?id=224018
+
+        Reviewed by Antti Koivisto.
+
+        Rebaselined tests to account for the change to the way we paint
+        searchfield decorations on iOS. Added a new test to verify that
+        '-webkit-appearance: none' is respected.
+
+        * fast/forms/ios/form-control-refresh/search/search-decoration-appearance-expected-mismatch.html: Added.
+        * fast/forms/ios/form-control-refresh/search/search-decoration-appearance.html: Added.
+        * platform/ios-simulator/fast/forms/datalist/datalist-searchinput-appearance-expected.txt:
+        * platform/ios/fast/css/focus-ring-exists-for-search-field-expected.txt:
+        * platform/ios/fast/css/input-search-padding-expected.txt:
+        * platform/ios/fast/css/text-input-with-webkit-border-radius-expected.txt:
+        * platform/ios/fast/css/text-overflow-input-expected.txt:
+        * platform/ios/fast/forms/box-shadow-override-expected.txt:
+        * platform/ios/fast/forms/control-restrict-line-height-expected.txt:
+        * platform/ios/fast/forms/input-appearance-height-expected.txt:
+        * platform/ios/fast/forms/placeholder-pseudo-style-expected.txt:
+        * platform/ios/fast/forms/search-cancel-button-style-sharing-expected.txt:
+        * platform/ios/fast/forms/search-display-none-cancel-button-expected.txt:
+        * platform/ios/fast/forms/search-input-rtl-expected.txt:
+        * platform/ios/fast/forms/search-styled-expected.txt:
+        * platform/ios/fast/replaced/width100percent-searchfield-expected.txt:
+
 2021-04-01  Rob Buis  <[email protected]>
 
         Use Element for checking Settings in CSSComputedStyleDeclaration

Added: trunk/LayoutTests/fast/forms/ios/form-control-refresh/search/search-decoration-appearance-expected-mismatch.html (0 => 275355)


--- trunk/LayoutTests/fast/forms/ios/form-control-refresh/search/search-decoration-appearance-expected-mismatch.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/ios/form-control-refresh/search/search-decoration-appearance-expected-mismatch.html	2021-04-01 13:37:02 UTC (rev 275355)
@@ -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="search">
+</body>
+</html>

Added: trunk/LayoutTests/fast/forms/ios/form-control-refresh/search/search-decoration-appearance.html (0 => 275355)


--- trunk/LayoutTests/fast/forms/ios/form-control-refresh/search/search-decoration-appearance.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/ios/form-control-refresh/search/search-decoration-appearance.html	2021-04-01 13:37:02 UTC (rev 275355)
@@ -0,0 +1,16 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ IOSFormControlRefreshEnabled=true ] -->
+<html>
+<head>
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<style>
+
+input[type="search"]::-webkit-search-decoration {
+    -webkit-appearance: none;
+}
+
+</style>
+</head>
+<body>
+<input type="search">
+</body>
+</html>

Modified: trunk/LayoutTests/platform/ios/fast/css/focus-ring-exists-for-search-field-expected.txt (275354 => 275355)


--- trunk/LayoutTests/platform/ios/fast/css/focus-ring-exists-for-search-field-expected.txt	2021-04-01 11:45:53 UTC (rev 275354)
+++ trunk/LayoutTests/platform/ios/fast/css/focus-ring-exists-for-search-field-expected.txt	2021-04-01 13:37:02 UTC (rev 275355)
@@ -10,11 +10,10 @@
       RenderBlock (anonymous) at (0,56) size 784x23
         RenderTextControl {INPUT} at (2,2) size 164x20 [bgcolor=#7676801F]
           RenderFlexibleBox {DIV} at (5,2) size 154x15
+            RenderBlock {DIV} at (0,1) size 11x12
             RenderBlock {DIV} at (15,0) size 138x14
             RenderBlock {DIV} at (152,7) size 0x0
         RenderText {#text} at (0,0) size 0x0
-layer at (31,68) size 137x14
+layer at (31,68) size 138x14 backgroundClip at (31,68) size 137x14 clip at (31,68) size 137x14
   RenderBlock {DIV} at (0,0) size 138x14
-layer at (16,70) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]
 caret: position 0 of child 0 {DIV} of child 1 {DIV} of child 0 {DIV} of {#document-fragment} of child 3 {INPUT} of body

Modified: trunk/LayoutTests/platform/ios/fast/css/input-search-padding-expected.txt (275354 => 275355)


--- trunk/LayoutTests/platform/ios/fast/css/input-search-padding-expected.txt	2021-04-01 11:45:53 UTC (rev 275354)
+++ trunk/LayoutTests/platform/ios/fast/css/input-search-padding-expected.txt	2021-04-01 13:37:02 UTC (rev 275355)
@@ -5,7 +5,8 @@
     RenderBody {BODY} at (8,8) size 784x584
       RenderTextControl {INPUT} at (2,2) size 575x87 [bgcolor=#7676801F]
         RenderFlexibleBox {DIV} at (20,8) size 535x49
-          RenderBlock {DIV} at (56,0) size 479x49
+          RenderBlock {DIV} at (0,4) size 40x41
+          RenderBlock {DIV} at (44,0) size 491x49
           RenderBlock {DIV} at (534,24) size 0x0
       RenderBR {BR} at (578,34) size 1x19
       RenderTextControl {INPUT} at (2,93) size 537x89 [bgcolor=#FFFFFF] [border: (1px solid #78788033)]
@@ -12,10 +13,11 @@
       RenderBR {BR} at (540,126) size 1x19
       RenderTextControl {INPUT} at (2,184) size 271x25 [bgcolor=#7676801F]
         RenderFlexibleBox {DIV} at (4,0) size 263x25
-          RenderBlock {DIV} at (28,0) size 235x25
+          RenderBlock {DIV} at (0,2) size 20x21
+          RenderBlock {DIV} at (24,0) size 239x25
           RenderBlock {DIV} at (262,12) size 0x0
-layer at (86,18) size 479x49
-  RenderBlock {DIV} at (0,0) size 479x49
+layer at (74,18) size 491x49
+  RenderBlock {DIV} at (0,0) size 491x49
     RenderText {#text} at (0,0) size 351x49
       text run at (0,0) width 351: "value jgq not clipped"
 layer at (31,110) size 495x49
@@ -22,11 +24,7 @@
   RenderBlock {DIV} at (21,9) size 495x49
     RenderText {#text} at (0,0) size 351x49
       text run at (0,0) width 351: "value jgq not clipped"
-layer at (42,192) size 235x25
-  RenderBlock {DIV} at (0,0) size 235x25
+layer at (38,192) size 239x25
+  RenderBlock {DIV} at (0,0) size 239x25
     RenderText {#text} at (0,0) size 116x25
       text run at (0,0) width 116: "Sample Input"
-layer at (30,23) size 40x40
-  RenderBlock {DIV} at (0,4) size 40x41 [bgcolor=#A9A9A9]
-layer at (14,195) size 20x20
-  RenderBlock {DIV} at (0,2) size 20x21 [bgcolor=#A9A9A9]

Modified: trunk/LayoutTests/platform/ios/fast/css/text-input-with-webkit-border-radius-expected.txt (275354 => 275355)


--- trunk/LayoutTests/platform/ios/fast/css/text-input-with-webkit-border-radius-expected.txt	2021-04-01 11:45:53 UTC (rev 275354)
+++ trunk/LayoutTests/platform/ios/fast/css/text-input-with-webkit-border-radius-expected.txt	2021-04-01 13:37:02 UTC (rev 275355)
@@ -17,6 +17,7 @@
       RenderBlock {DIV} at (0,72) size 163x45 [bgcolor=#888888]
         RenderTextControl {INPUT} at (11,9) size 133x20 [bgcolor=#00FF00]
           RenderFlexibleBox {DIV} at (5,2) size 123x15
+            RenderBlock {DIV} at (0,1) size 11x12
             RenderBlock {DIV} at (15,0) size 107x14
             RenderBlock {DIV} at (122,7) size 0x0
         RenderText {#text} at (0,0) size 0x0
@@ -24,5 +25,3 @@
   RenderBlock {DIV} at (0,0) size 107x14
     RenderText {#text} at (0,0) size 60x14
       text run at (0,0) width 60: "default text"
-layer at (25,101) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]

Modified: trunk/LayoutTests/platform/ios/fast/css/text-overflow-input-expected.txt (275354 => 275355)


--- trunk/LayoutTests/platform/ios/fast/css/text-overflow-input-expected.txt	2021-04-01 11:45:53 UTC (rev 275354)
+++ trunk/LayoutTests/platform/ios/fast/css/text-overflow-input-expected.txt	2021-04-01 13:37:02 UTC (rev 275355)
@@ -15,6 +15,7 @@
           text run at (158,21) width 5: " "
         RenderTextControl {INPUT} at (164,23) size 165x20 [bgcolor=#7676801F]
           RenderFlexibleBox {DIV} at (5,2) size 154x15
+            RenderBlock {DIV} at (0,1) size 11x12
             RenderBlock {DIV} at (15,0) size 138x14
             RenderBlock {DIV} at (152,7) size 0x0
         RenderText {#text} at (330,21) size 5x19
@@ -24,6 +25,7 @@
           text run at (493,21) width 5: " "
         RenderTextControl {INPUT} at (499,23) size 165x20 [bgcolor=#7676801F]
           RenderFlexibleBox {DIV} at (5,2) size 154x15
+            RenderBlock {DIV} at (0,1) size 11x12
             RenderBlock {DIV} at (15,0) size 138x14
             RenderBlock {DIV} at (152,7) size 0x0
         RenderText {#text} at (0,0) size 0x0
@@ -36,6 +38,7 @@
           text run at (156,71) width 5: " "
         RenderTextControl {INPUT} at (162,73) size 163x20 [bgcolor=#7676801F]
           RenderFlexibleBox {DIV} at (5,2) size 152x15
+            RenderBlock {DIV} at (139,1) size 12x12
             RenderBlock {DIV} at (0,0) size 136x14
             RenderBlock {DIV} at (0,7) size 0x0
         RenderText {#text} at (326,71) size 5x19
@@ -45,6 +48,7 @@
           text run at (487,71) width 5: " "
         RenderTextControl {INPUT} at (493,73) size 163x20 [bgcolor=#7676801F]
           RenderFlexibleBox {DIV} at (5,2) size 152x15
+            RenderBlock {DIV} at (139,1) size 12x12
             RenderBlock {DIV} at (0,0) size 136x14
             RenderBlock {DIV} at (0,7) size 0x0
         RenderText {#text} at (0,0) size 0x0
@@ -61,6 +65,7 @@
           text run at (158,21) width 5: " "
         RenderTextControl {INPUT} at (164,23) size 165x20 [bgcolor=#7676801F]
           RenderFlexibleBox {DIV} at (5,2) size 154x15
+            RenderBlock {DIV} at (0,1) size 11x12
             RenderBlock {DIV} at (15,0) size 138x14
             RenderBlock {DIV} at (152,7) size 0x0
         RenderText {#text} at (330,21) size 5x19
@@ -70,6 +75,7 @@
           text run at (493,21) width 5: " "
         RenderTextControl {INPUT} at (499,23) size 165x20 [bgcolor=#7676801F]
           RenderFlexibleBox {DIV} at (5,2) size 154x15
+            RenderBlock {DIV} at (0,1) size 11x12
             RenderBlock {DIV} at (15,0) size 138x14
             RenderBlock {DIV} at (152,7) size 0x0
         RenderText {#text} at (0,0) size 0x0
@@ -82,6 +88,7 @@
           text run at (156,71) width 5: " "
         RenderTextControl {INPUT} at (162,73) size 163x20 [bgcolor=#7676801F]
           RenderFlexibleBox {DIV} at (5,2) size 152x15
+            RenderBlock {DIV} at (139,1) size 12x12
             RenderBlock {DIV} at (0,0) size 136x14
             RenderBlock {DIV} at (0,7) size 0x0
         RenderText {#text} at (326,71) size 5x19
@@ -91,6 +98,7 @@
           text run at (487,71) width 5: " "
         RenderTextControl {INPUT} at (493,73) size 163x20 [bgcolor=#7676801F]
           RenderFlexibleBox {DIV} at (5,2) size 152x15
+            RenderBlock {DIV} at (139,1) size 12x12
             RenderBlock {DIV} at (0,0) size 136x14
             RenderBlock {DIV} at (0,7) size 0x0
         RenderText {#text} at (0,0) size 0x0
@@ -126,17 +134,17 @@
       text run at (0,0) width 288: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
 layer at (17,77) size 141x14
   RenderBlock {DIV} at (6,3) size 143x15
-layer at (194,77) size 137x14 scrollWidth 288
+layer at (193,77) size 137x14 scrollWidth 288
   RenderBlock {DIV} at (20,2) size 139x15 [color=#A9A9A9]
     RenderText {#text} at (0,0) size 288x14
       text run at (0,0) width 288: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
-layer at (194,77) size 137x14
+layer at (193,77) size 138x14
   RenderBlock {DIV} at (0,0) size 138x14
 layer at (351,77) size 141x14 scrollWidth 290
   RenderBlock {DIV} at (6,3) size 143x15
     RenderText {#text} at (0,0) size 288x14
       text run at (0,0) width 288: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
-layer at (529,77) size 137x14 scrollWidth 290
+layer at (528,77) size 138x14 scrollWidth 290
   RenderBlock {DIV} at (0,0) size 138x14
     RenderText {#text} at (0,0) size 288x14
       text run at (0,0) width 288: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
@@ -151,19 +159,19 @@
 layer at (17,127) size 139x14
   RenderBlock {DIV} at (6,3) size 141x15
 layer at (176,127) size 135x14 scrollX 152 scrollWidth 288
-  RenderBlock {DIV} at (5,2) size 136x15 [color=#A9A9A9]
-    RenderText {#text} at (-152,0) size 289x14
-      text run at (-152,0) width 288: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
-layer at (176,127) size 135x14
+  RenderBlock {DIV} at (5,2) size 137x15 [color=#A9A9A9]
+    RenderText {#text} at (-151,0) size 288x14
+      text run at (-151,0) width 287: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+layer at (176,127) size 136x14
   RenderBlock {DIV} at (0,0) size 136x14
 layer at (347,127) size 139x14 scrollX 148 scrollWidth 288
   RenderBlock {DIV} at (6,3) size 141x15
     RenderText {#text} at (-147,0) size 288x14
       text run at (-147,0) width 287: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
-layer at (507,127) size 135x14 scrollX 152 scrollWidth 288
+layer at (507,127) size 136x14 scrollX 152 scrollWidth 288
   RenderBlock {DIV} at (0,0) size 136x14
-    RenderText {#text} at (-152,0) size 289x14
-      text run at (-152,0) width 288: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+    RenderText {#text} at (-151,0) size 288x14
+      text run at (-151,0) width 287: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
 layer at (17,152) size 142x14 backgroundClip at (17,152) size 141x14 clip at (17,152) size 141x14 scrollWidth 387
   RenderBlock {DIV} at (0,0) size 142x14
     RenderText {#text} at (0,0) size 385x14
@@ -174,17 +182,17 @@
       text run at (0,0) width 288: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
 layer at (17,213) size 141x14
   RenderBlock {DIV} at (6,3) size 143x15
-layer at (194,213) size 137x14 scrollWidth 288
+layer at (193,213) size 137x14 scrollWidth 288
   RenderBlock {DIV} at (20,2) size 139x15 [color=#A9A9A9]
     RenderText {#text} at (0,0) size 288x14
       text run at (0,0) width 288: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
-layer at (194,213) size 137x14
+layer at (193,213) size 138x14
   RenderBlock {DIV} at (0,0) size 138x14
 layer at (351,213) size 141x14 scrollWidth 290
   RenderBlock {DIV} at (6,3) size 143x15
     RenderText {#text} at (0,0) size 288x14
       text run at (0,0) width 288: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
-layer at (529,213) size 137x14 scrollWidth 290
+layer at (528,213) size 138x14 scrollWidth 290
   RenderBlock {DIV} at (0,0) size 138x14
     RenderText {#text} at (0,0) size 288x14
       text run at (0,0) width 288: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
@@ -199,19 +207,19 @@
 layer at (17,263) size 139x14
   RenderBlock {DIV} at (6,3) size 141x15
 layer at (176,263) size 135x14 scrollX 152 scrollWidth 288
-  RenderBlock {DIV} at (5,2) size 136x15 [color=#A9A9A9]
-    RenderText {#text} at (-152,0) size 289x14
-      text run at (-152,0) width 288: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
-layer at (176,263) size 135x14
+  RenderBlock {DIV} at (5,2) size 137x15 [color=#A9A9A9]
+    RenderText {#text} at (-151,0) size 288x14
+      text run at (-151,0) width 287: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+layer at (176,263) size 136x14
   RenderBlock {DIV} at (0,0) size 136x14
 layer at (347,263) size 139x14 scrollX 148 scrollWidth 288
   RenderBlock {DIV} at (6,3) size 141x15
     RenderText {#text} at (-147,0) size 288x14
       text run at (-147,0) width 287: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
-layer at (507,263) size 135x14 scrollX 152 scrollWidth 288
+layer at (507,263) size 136x14 scrollX 152 scrollWidth 288
   RenderBlock {DIV} at (0,0) size 136x14
-    RenderText {#text} at (-152,0) size 289x14
-      text run at (-152,0) width 288: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+    RenderText {#text} at (-151,0) size 288x14
+      text run at (-151,0) width 287: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
 layer at (17,288) size 142x14 backgroundClip at (17,288) size 141x14 clip at (17,288) size 141x14 scrollWidth 394
   RenderBlock {DIV} at (0,0) size 142x14
     RenderText {#text} at (7,0) size 385x14
@@ -236,19 +244,3 @@
   RenderBlock {DIV} at (6,3) size 143x15
     RenderText {#text} at (0,0) size 288x14
       text run at (0,0) width 288: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
-layer at (178,79) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]
-layer at (513,79) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]
-layer at (316,129) size 11x11
-  RenderBlock {DIV} at (139,1) size 12x12 [bgcolor=#A9A9A9]
-layer at (647,129) size 11x11
-  RenderBlock {DIV} at (139,1) size 12x12 [bgcolor=#A9A9A9]
-layer at (178,215) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]
-layer at (513,215) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]
-layer at (316,265) size 11x11
-  RenderBlock {DIV} at (139,1) size 12x12 [bgcolor=#A9A9A9]
-layer at (647,265) size 11x11
-  RenderBlock {DIV} at (139,1) size 12x12 [bgcolor=#A9A9A9]

Modified: trunk/LayoutTests/platform/ios/fast/forms/box-shadow-override-expected.txt (275354 => 275355)


--- trunk/LayoutTests/platform/ios/fast/forms/box-shadow-override-expected.txt	2021-04-01 11:45:53 UTC (rev 275354)
+++ trunk/LayoutTests/platform/ios/fast/forms/box-shadow-override-expected.txt	2021-04-01 13:37:02 UTC (rev 275355)
@@ -12,6 +12,7 @@
       RenderBlock {DIV} at (0,72) size 784x23
         RenderTextControl {INPUT} at (2,2) size 164x20 [bgcolor=#7676801F]
           RenderFlexibleBox {DIV} at (5,2) size 154x15
+            RenderBlock {DIV} at (0,1) size 11x12
             RenderBlock {DIV} at (15,0) size 138x14
             RenderBlock {DIV} at (152,7) size 0x0
         RenderText {#text} at (0,0) size 0x0
@@ -18,6 +19,7 @@
       RenderBlock {DIV} at (0,95) size 784x23
         RenderTextControl {INPUT} at (2,2) size 164x20 [bgcolor=#7676801F]
           RenderFlexibleBox {DIV} at (5,2) size 154x15
+            RenderBlock {DIV} at (0,1) size 11x12
             RenderBlock {DIV} at (15,0) size 138x14
             RenderBlock {DIV} at (152,7) size 0x0
         RenderText {#text} at (0,0) size 0x0
@@ -24,6 +26,7 @@
       RenderBlock {DIV} at (0,118) size 784x23
         RenderTextControl {INPUT} at (2,2) size 164x20 [bgcolor=#7676801F]
           RenderFlexibleBox {DIV} at (5,2) size 154x15
+            RenderBlock {DIV} at (0,1) size 11x12
             RenderBlock {DIV} at (15,0) size 138x14
             RenderBlock {DIV} at (152,7) size 0x0
         RenderText {#text} at (0,0) size 0x0
@@ -70,17 +73,11 @@
             RenderText {#text} at (0,0) size 59x25
               text run at (0,0) width 59: "Button"
         RenderText {#text} at (0,0) size 0x0
-layer at (31,84) size 137x14
+layer at (31,84) size 138x14 backgroundClip at (31,84) size 137x14 clip at (31,84) size 137x14
   RenderBlock {DIV} at (0,0) size 138x14
     RenderText {#text} at (0,0) size 37x14
       text run at (0,0) width 37: "Search"
-layer at (31,107) size 137x14
+layer at (31,107) size 138x14 backgroundClip at (31,107) size 137x14 clip at (31,107) size 137x14
   RenderBlock {DIV} at (0,0) size 138x14
-layer at (31,130) size 137x14
+layer at (31,130) size 138x14 backgroundClip at (31,130) size 137x14 clip at (31,130) size 137x14
   RenderBlock {DIV} at (0,0) size 138x14
-layer at (16,86) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]
-layer at (16,109) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]
-layer at (16,132) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]

Modified: trunk/LayoutTests/platform/ios/fast/forms/control-restrict-line-height-expected.txt (275354 => 275355)


--- trunk/LayoutTests/platform/ios/fast/forms/control-restrict-line-height-expected.txt	2021-04-01 11:45:53 UTC (rev 275354)
+++ trunk/LayoutTests/platform/ios/fast/forms/control-restrict-line-height-expected.txt	2021-04-01 13:37:02 UTC (rev 275355)
@@ -18,12 +18,11 @@
       RenderBR {BR} at (296,48) size 1x19
       RenderTextControl {INPUT} at (2,76) size 164x32 [bgcolor=#7676801F]
         RenderFlexibleBox {DIV} at (5,2) size 154x27
+          RenderBlock {DIV} at (0,7) size 11x12
           RenderBlock {DIV} at (15,0) size 138x26
           RenderBlock {DIV} at (152,13) size 0x0
       RenderText {#text} at (0,0) size 0x0
-layer at (31,86) size 137x26 scrollWidth 273
+layer at (31,86) size 138x26 backgroundClip at (31,86) size 137x26 clip at (31,86) size 137x26 scrollWidth 273
   RenderBlock {DIV} at (0,0) size 138x26
     RenderText {#text} at (0,6) size 271x14
       text run at (0,6) width 271: "This text should be centered vertically in the button"
-layer at (16,94) size 11x11
-  RenderBlock {DIV} at (0,7) size 11x12 [bgcolor=#A9A9A9]

Modified: trunk/LayoutTests/platform/ios/fast/forms/input-appearance-height-expected.txt (275354 => 275355)


--- trunk/LayoutTests/platform/ios/fast/forms/input-appearance-height-expected.txt	2021-04-01 11:45:53 UTC (rev 275354)
+++ trunk/LayoutTests/platform/ios/fast/forms/input-appearance-height-expected.txt	2021-04-01 13:37:02 UTC (rev 275355)
@@ -92,6 +92,7 @@
           text run at (0,259) width 45: "search "
         RenderTextControl {INPUT} at (46,261) size 165x20 [bgcolor=#7676801F]
           RenderFlexibleBox {DIV} at (5,2) size 154x15
+            RenderBlock {DIV} at (0,1) size 11x12
             RenderBlock {DIV} at (15,0) size 138x14
             RenderBlock {DIV} at (152,7) size 0x0
         RenderText {#text} at (0,0) size 0x0
@@ -103,7 +104,5 @@
   RenderBlock {DIV} at (6,3) size 143x15
 layer at (81,267) size 142x14
   RenderBlock {DIV} at (0,0) size 142x14
-layer at (76,291) size 137x14
+layer at (75,291) size 138x14
   RenderBlock {DIV} at (0,0) size 138x14
-layer at (60,293) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]

Modified: trunk/LayoutTests/platform/ios/fast/forms/placeholder-pseudo-style-expected.txt (275354 => 275355)


--- trunk/LayoutTests/platform/ios/fast/forms/placeholder-pseudo-style-expected.txt	2021-04-01 11:45:53 UTC (rev 275354)
+++ trunk/LayoutTests/platform/ios/fast/forms/placeholder-pseudo-style-expected.txt	2021-04-01 13:37:02 UTC (rev 275355)
@@ -11,6 +11,7 @@
         text run at (158,21) width 5: " "
       RenderTextControl {INPUT} at (164,23) size 165x20 [bgcolor=#7676801F]
         RenderFlexibleBox {DIV} at (5,2) size 154x15
+          RenderBlock {DIV} at (0,1) size 11x12
           RenderBlock {DIV} at (15,0) size 138x14
           RenderBlock {DIV} at (152,7) size 0x0
       RenderText {#text} at (330,21) size 5x19
@@ -32,11 +33,11 @@
       text run at (0,0) width 21: "text"
 layer at (17,33) size 141x14
   RenderBlock {DIV} at (6,3) size 143x15
-layer at (194,33) size 137x14
+layer at (193,33) size 137x14
   RenderBlock {DIV} at (20,2) size 139x15 [color=#640000]
     RenderText {#text} at (0,0) size 36x14
       text run at (0,0) width 36: "search"
-layer at (194,33) size 137x14
+layer at (193,33) size 138x14
   RenderBlock {DIV} at (0,0) size 138x14
 layer at (351,33) size 141x14
   RenderBlock {DIV} at (6,3) size 143x15 [color=#640000]
@@ -56,8 +57,6 @@
       text run at (0,0) width 85: "default disabled"
 layer at (179,58) size 141x14
   RenderBlock {DIV} at (6,3) size 143x15
-layer at (178,35) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]
 layer at (508,30) size 153x21
   RenderTextControl {INPUT} at (499,22) size 154x22 [bgcolor=#FFFFFF] [border: (1px solid #78788033)]
 layer at (514,33) size 139x14

Modified: trunk/LayoutTests/platform/ios/fast/forms/search-cancel-button-style-sharing-expected.txt (275354 => 275355)


--- trunk/LayoutTests/platform/ios/fast/forms/search-cancel-button-style-sharing-expected.txt	2021-04-01 11:45:53 UTC (rev 275354)
+++ trunk/LayoutTests/platform/ios/fast/forms/search-cancel-button-style-sharing-expected.txt	2021-04-01 13:37:02 UTC (rev 275355)
@@ -9,6 +9,7 @@
       RenderBlock (anonymous) at (0,36) size 784x23
         RenderTextControl {INPUT} at (2,2) size 164x20 [bgcolor=#7676801F]
           RenderFlexibleBox {DIV} at (5,2) size 154x15
+            RenderBlock {DIV} at (0,1) size 11x12
             RenderBlock {DIV} at (15,0) size 138x14
             RenderBlock {DIV} at (152,7) size 0x0
         RenderText {#text} at (167,0) size 5x19
@@ -15,16 +16,13 @@
           text run at (167,0) width 5: " "
         RenderTextControl {INPUT} at (173,2) size 165x20 [bgcolor=#7676801F]
           RenderFlexibleBox {DIV} at (5,2) size 154x15
+            RenderBlock {DIV} at (0,1) size 11x12
             RenderBlock {DIV} at (15,0) size 138x14
             RenderBlock {DIV} at (152,7) size 0x0
         RenderText {#text} at (0,0) size 0x0
-layer at (31,48) size 137x14
+layer at (31,48) size 138x14 backgroundClip at (31,48) size 137x14 clip at (31,48) size 137x14
   RenderBlock {DIV} at (0,0) size 138x14
-layer at (203,48) size 137x14
+layer at (202,48) size 138x14
   RenderBlock {DIV} at (0,0) size 138x14
     RenderText {#text} at (0,0) size 42x14
       text run at (0,0) width 42: "this one"
-layer at (16,50) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]
-layer at (187,50) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]

Modified: trunk/LayoutTests/platform/ios/fast/forms/search-display-none-cancel-button-expected.txt (275354 => 275355)


--- trunk/LayoutTests/platform/ios/fast/forms/search-display-none-cancel-button-expected.txt	2021-04-01 11:45:53 UTC (rev 275354)
+++ trunk/LayoutTests/platform/ios/fast/forms/search-display-none-cancel-button-expected.txt	2021-04-01 13:37:02 UTC (rev 275355)
@@ -8,11 +8,10 @@
       RenderBR {BR} at (510,0) size 1x19
       RenderTextControl {INPUT} at (2,22) size 164x20 [bgcolor=#7676801F]
         RenderFlexibleBox {DIV} at (5,2) size 154x15
+          RenderBlock {DIV} at (0,1) size 11x12
           RenderBlock {DIV} at (15,0) size 138x14
       RenderText {#text} at (0,0) size 0x0
-layer at (31,32) size 137x14
+layer at (31,32) size 138x14 backgroundClip at (31,32) size 137x14 clip at (31,32) size 137x14
   RenderBlock {DIV} at (0,0) size 138x14
     RenderText {#text} at (0,0) size 21x14
       text run at (0,0) width 21: "test"
-layer at (16,34) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]

Modified: trunk/LayoutTests/platform/ios/fast/forms/search-input-rtl-expected.txt (275354 => 275355)


--- trunk/LayoutTests/platform/ios/fast/forms/search-input-rtl-expected.txt	2021-04-01 11:45:53 UTC (rev 275354)
+++ trunk/LayoutTests/platform/ios/fast/forms/search-input-rtl-expected.txt	2021-04-01 13:37:02 UTC (rev 275355)
@@ -9,6 +9,7 @@
           text run at (627,0) width 157: "right to left search fields"
         RenderTextControl {INPUT} at (455,2) size 163x20 [bgcolor=#7676801F]
           RenderFlexibleBox {DIV} at (5,2) size 152x15
+            RenderBlock {DIV} at (139,1) size 12x12
             RenderBlock {DIV} at (0,0) size 136x14
             RenderBlock {DIV} at (0,7) size 0x0
         RenderText {#text} at (449,0) size 5x19
@@ -15,6 +16,7 @@
           text run at (449,0) width 5 RTL: " "
         RenderTextControl {INPUT} at (285,2) size 163x20 [bgcolor=#7676801F]
           RenderFlexibleBox {DIV} at (5,2) size 152x15
+            RenderBlock {DIV} at (139,1) size 12x12
             RenderBlock {DIV} at (0,0) size 136x14
             RenderBlock {DIV} at (0,7) size 0x0
         RenderText {#text} at (0,0) size 0x0
@@ -23,6 +25,7 @@
           text run at (0,0) width 165: "left to right search fields: "
         RenderTextControl {INPUT} at (166,2) size 165x20 [bgcolor=#7676801F]
           RenderFlexibleBox {DIV} at (5,2) size 154x15
+            RenderBlock {DIV} at (0,1) size 11x12
             RenderBlock {DIV} at (15,0) size 138x14
             RenderBlock {DIV} at (152,7) size 0x0
         RenderText {#text} at (332,0) size 5x19
@@ -29,30 +32,23 @@
           text run at (332,0) width 5: " "
         RenderTextControl {INPUT} at (338,2) size 165x20 [bgcolor=#7676801F]
           RenderFlexibleBox {DIV} at (5,2) size 154x15
+            RenderBlock {DIV} at (0,1) size 11x12
             RenderBlock {DIV} at (15,0) size 138x14
             RenderBlock {DIV} at (152,7) size 0x0
         RenderText {#text} at (0,0) size 0x0
-layer at (469,12) size 135x14
+layer at (469,12) size 136x14
   RenderBlock {DIV} at (0,0) size 136x14
     RenderText {#text} at (101,0) size 35x14
       text run at (101,0) width 35: "foobar"
-layer at (299,12) size 135x14
+layer at (299,12) size 136x14
   RenderBlock {DIV} at (0,0) size 136x14
     RenderText {#text} at (101,0) size 35x14
       text run at (101,0) width 35: "foobar"
-layer at (196,35) size 137x14
+layer at (195,35) size 138x14
   RenderBlock {DIV} at (0,0) size 138x14
     RenderText {#text} at (0,0) size 35x14
       text run at (0,0) width 35: "foobar"
-layer at (368,35) size 137x14
+layer at (367,35) size 138x14
   RenderBlock {DIV} at (0,0) size 138x14
     RenderText {#text} at (0,0) size 35x14
       text run at (0,0) width 35: "foobar"
-layer at (609,14) size 11x11
-  RenderBlock {DIV} at (139,1) size 12x12 [bgcolor=#A9A9A9]
-layer at (439,14) size 11x11
-  RenderBlock {DIV} at (139,1) size 12x12 [bgcolor=#A9A9A9]
-layer at (180,37) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]
-layer at (352,37) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]

Modified: trunk/LayoutTests/platform/ios/fast/forms/search-styled-expected.txt (275354 => 275355)


--- trunk/LayoutTests/platform/ios/fast/forms/search-styled-expected.txt	2021-04-01 11:45:53 UTC (rev 275354)
+++ trunk/LayoutTests/platform/ios/fast/forms/search-styled-expected.txt	2021-04-01 13:37:02 UTC (rev 275355)
@@ -5,6 +5,7 @@
     RenderBody {BODY} at (8,8) size 784x27
       RenderTextControl {INPUT} at (2,2) size 155x23 [bgcolor=#FFFFFF] [border: (1px solid #BDC7D8)]
         RenderFlexibleBox {DIV} at (18,4) size 133x15
+          RenderBlock {DIV} at (0,2) size 11x11
           RenderBlock {DIV} at (15,0) size 118x15
           RenderBlock {DIV} at (133,7) size 0x0
       RenderText {#text} at (0,0) size 0x0
@@ -14,5 +15,3 @@
       text run at (0,0) width 98: "Search for Events"
 layer at (43,14) size 118x15
   RenderBlock {DIV} at (0,0) size 118x15
-layer at (28,16) size 11x11
-  RenderBlock {DIV} at (0,2) size 11x11 [bgcolor=#A9A9A9]

Modified: trunk/LayoutTests/platform/ios/fast/replaced/width100percent-searchfield-expected.txt (275354 => 275355)


--- trunk/LayoutTests/platform/ios/fast/replaced/width100percent-searchfield-expected.txt	2021-04-01 11:45:53 UTC (rev 275354)
+++ trunk/LayoutTests/platform/ios/fast/replaced/width100percent-searchfield-expected.txt	2021-04-01 13:37:02 UTC (rev 275355)
@@ -12,16 +12,19 @@
             RenderTableCell {TD} at (1,1) size 13x25 [r=0 c=0 rs=1 cs=1]
               RenderTextControl {INPUT} at (1,3) size 11x20 [bgcolor=#7676801F]
                 RenderFlexibleBox {DIV} at (5,2) size 0x15
+                  RenderBlock {DIV} at (0,1) size 11x12
                   RenderBlock {DIV} at (15,0) size 0x14
                   RenderBlock {DIV} at (15,7) size 0x0
             RenderTableCell {TD} at (15,1) size 13x25 [r=0 c=1 rs=1 cs=1]
               RenderTextControl {INPUT} at (1,3) size 11x20 [bgcolor=#7676801F]
                 RenderFlexibleBox {DIV} at (5,2) size 0x15
+                  RenderBlock {DIV} at (0,1) size 11x12
                   RenderBlock {DIV} at (15,0) size 0x14
                   RenderBlock {DIV} at (15,7) size 0x0
             RenderTableCell {TD} at (29,1) size 13x25 [r=0 c=2 rs=1 cs=1]
               RenderTextControl {INPUT} at (1,3) size 11x20 [bgcolor=#7676801F]
                 RenderFlexibleBox {DIV} at (5,2) size 0x15
+                  RenderBlock {DIV} at (0,1) size 11x12
                   RenderBlock {DIV} at (15,0) size 0x14
                   RenderBlock {DIV} at (15,7) size 0x0
             RenderTableCell {TD} at (43,2) size 740x23 [r=0 c=3 rs=1 cs=1]
@@ -36,30 +39,21 @@
             RenderTableCell {TD} at (1,1) size 13x25 [r=0 c=0 rs=1 cs=1]
               RenderTextControl {INPUT} at (1,3) size 11x20 [bgcolor=#7676801F]
                 RenderFlexibleBox {DIV} at (5,2) size 0x15
+                  RenderBlock {DIV} at (0,1) size 11x12
                   RenderBlock {DIV} at (15,0) size 0x14
                   RenderBlock {DIV} at (15,7) size 0x0
             RenderTableCell {TD} at (15,1) size 13x25 [r=0 c=1 rs=1 cs=1]
               RenderTextControl {INPUT} at (1,3) size 11x20 [bgcolor=#7676801F]
                 RenderFlexibleBox {DIV} at (5,2) size 0x15
+                  RenderBlock {DIV} at (0,1) size 11x12
                   RenderBlock {DIV} at (15,0) size 0x14
                   RenderBlock {DIV} at (15,7) size 0x0
             RenderTableCell {TD} at (29,1) size 13x25 [r=0 c=2 rs=1 cs=1]
               RenderTextControl {INPUT} at (1,3) size 11x20 [bgcolor=#7676801F]
                 RenderFlexibleBox {DIV} at (5,2) size 0x15
+                  RenderBlock {DIV} at (0,1) size 11x12
                   RenderBlock {DIV} at (15,0) size 0x14
                   RenderBlock {DIV} at (15,7) size 0x0
             RenderTableCell {TD} at (43,2) size 740x23 [r=0 c=3 rs=1 cs=1]
               RenderText {#text} at (1,1) size 4x20
                 text run at (1,2) width 4: " "
-layer at (16,36) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]
-layer at (30,36) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]
-layer at (44,36) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]
-layer at (16,103) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]
-layer at (30,103) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]
-layer at (44,103) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]

Modified: trunk/LayoutTests/platform/ios-simulator/fast/forms/datalist/datalist-searchinput-appearance-expected.txt (275354 => 275355)


--- trunk/LayoutTests/platform/ios-simulator/fast/forms/datalist/datalist-searchinput-appearance-expected.txt	2021-04-01 11:45:53 UTC (rev 275354)
+++ trunk/LayoutTests/platform/ios-simulator/fast/forms/datalist/datalist-searchinput-appearance-expected.txt	2021-04-01 13:37:02 UTC (rev 275355)
@@ -5,13 +5,12 @@
     RenderBody {BODY} at (8,8) size 784x23
       RenderTextControl {INPUT} at (2,2) size 164x20 [bgcolor=#7676801F]
         RenderFlexibleBox {DIV} at (5,2) size 154x15
+          RenderBlock {DIV} at (0,1) size 11x12
           RenderBlock {DIV} at (15,0) size 127x14
           RenderBlock {DIV} at (141,7) size 0x0
       RenderText {#text} at (0,0) size 0x0
       RenderText {#text} at (0,0) size 0x0
-layer at (31,12) size 126x14
+layer at (31,12) size 127x14 backgroundClip at (31,12) size 126x14 clip at (31,12) size 126x14
   RenderBlock {DIV} at (0,0) size 127x14
-layer at (16,14) size 11x11
-  RenderBlock {DIV} at (0,1) size 11x12 [bgcolor=#A9A9A9]
 layer at (150,5) size 25x28
   RenderImage {DIV} at (134,-7) size 26x28

Modified: trunk/Source/WebCore/ChangeLog (275354 => 275355)


--- trunk/Source/WebCore/ChangeLog	2021-04-01 11:45:53 UTC (rev 275354)
+++ trunk/Source/WebCore/ChangeLog	2021-04-01 13:37:02 UTC (rev 275355)
@@ -1,3 +1,41 @@
+2021-04-01  Aditya Keerthi  <[email protected]>
+
+        [iOS] '-webkit-appearance: none' is not respected for searchfield decorations
+        https://bugs.webkit.org/show_bug.cgi?id=224018
+
+        Reviewed by Antti Koivisto.
+
+        Specifying '-webkit-appearance: none' on a searchfield decoration
+        pseudo-element fails to hide the native icon. This issue arises from
+        the fact that we add the icon in the UA stylesheet, rather than painting
+        it in the theme.
+
+        To fix, remove the styles from the UA stylesheet, and paint the icon in
+        RenderThemeIOS. If a different '-webkit-appearance' is specified the
+        theme will not adjust styles or paint the icon.
+
+        Test: fast/forms/ios/form-control-refresh/search/search-decoration-appearance.html
+
+        * css/html.css:
+
+        Remove the UA styles for searchfield decorations so that they are not
+        applied when specifying a different -webkit-appearance.
+
+        * rendering/RenderThemeIOS.h:
+        * rendering/RenderThemeIOS.mm:
+        (WebCore::RenderThemeIOS::adjustSearchFieldDecorationPartStyle const):
+
+        Adjust the style to match the native appearance.
+
+        (WebCore::RenderThemeIOS::paintSearchFieldDecorationPart):
+
+        Paint the native icon.
+
+        (WebCore::RenderThemeIOS::adjustSearchFieldResultsDecorationPartStyle const):
+        (WebCore::RenderThemeIOS::paintSearchFieldResultsDecorationPart):
+        (WebCore::RenderThemeIOS::adjustSearchFieldResultsButtonStyle const):
+        (WebCore::RenderThemeIOS::paintSearchFieldResultsButton):
+
 2021-04-01  Martin Robinson  <[email protected]>
 
         Expose an alias for ScrollSnapOffsetInfo<T> to make it easier to use

Modified: trunk/Source/WebCore/css/html.css (275354 => 275355)


--- trunk/Source/WebCore/css/html.css	2021-04-01 11:45:53 UTC (rev 275354)
+++ trunk/Source/WebCore/css/html.css	2021-04-01 13:37:02 UTC (rev 275355)
@@ -490,20 +490,6 @@
 #endif
 }
 
-#if defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY
-
-input[type="search"]::-webkit-search-decoration,
-input[type="search"]::-webkit-search-results-decoration,
-input[type="search"]::-webkit-search-results-button {
-    background-color: darkgray;
-    height: 1em;
-    width: 1em;
-    margin-inline-end: 0.4em;
-    -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>');
-}
-
-#endif
-
 #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;

Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.h (275354 => 275355)


--- trunk/Source/WebCore/rendering/RenderThemeIOS.h	2021-04-01 11:45:53 UTC (rev 275354)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.h	2021-04-01 13:37:02 UTC (rev 275355)
@@ -136,6 +136,15 @@
     bool paintColorWell(const RenderObject&, const PaintInfo&, const IntRect&) final;
     void paintColorWellDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) final;
 #endif
+
+    void adjustSearchFieldDecorationPartStyle(RenderStyle&, const Element*) const final;
+    bool paintSearchFieldDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&) final;
+
+    void adjustSearchFieldResultsDecorationPartStyle(RenderStyle&, const Element*) const final;
+    bool paintSearchFieldResultsDecorationPart(const RenderBox&, const PaintInfo&, const IntRect&) final;
+
+    void adjustSearchFieldResultsButtonStyle(RenderStyle&, const Element*) const final;
+    bool paintSearchFieldResultsButton(const RenderBox&, const PaintInfo&, const IntRect&) final;
 #endif
 
     bool supportsFocusRing(const RenderStyle&) const final;

Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (275354 => 275355)


--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm	2021-04-01 11:45:53 UTC (rev 275354)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm	2021-04-01 13:37:02 UTC (rev 275355)
@@ -2542,6 +2542,86 @@
     context.fillPath(glyphPath);
 }
 
+void RenderThemeIOS::adjustSearchFieldDecorationPartStyle(RenderStyle& style, const Element* element) const
+{
+    if (!element || !element->document().settings().iOSFormControlRefreshEnabled())
+        return;
+
+    constexpr int searchFieldDecorationEmSize = 1;
+    constexpr int searchFieldDecorationMargin = 4;
+
+    CSSToLengthConversionData conversionData(&style, nullptr, nullptr, nullptr, 1.0, WTF::nullopt);
+
+    auto emSize = CSSPrimitiveValue::create(searchFieldDecorationEmSize, CSSUnitType::CSS_EMS);
+    auto size = emSize->computeLength<float>(conversionData);
+
+    style.setWidth({ size, LengthType::Fixed });
+    style.setHeight({ size, LengthType::Fixed });
+    style.setMarginEnd({ searchFieldDecorationMargin, LengthType::Fixed });
+}
+
+bool RenderThemeIOS::paintSearchFieldDecorationPart(const RenderObject& box, const PaintInfo& paintInfo, const IntRect& rect)
+{
+    if (!box.settings().iOSFormControlRefreshEnabled())
+        return RenderTheme::paintSearchFieldDecorationPart(box, paintInfo, rect);
+
+    auto& context = paintInfo.context();
+    GraphicsContextStateSaver stateSaver(context);
+
+    const FloatSize glyphSize(73.0f, 73.0f);
+
+    Path glyphPath;
+    glyphPath.moveTo({ 29.6875f, 59.375f });
+    glyphPath.addBezierCurveTo({ 35.9863f, 59.375f }, { 41.7969f, 57.422f }, { 46.6309f, 54.0528f });
+    glyphPath.addLineTo({ 63.9649f, 71.3868f });
+    glyphPath.addBezierCurveTo({ 64.8926f, 72.3145f }, { 66.1133f, 72.754f }, { 67.3829f, 72.754f });
+    glyphPath.addBezierCurveTo({ 70.1172f, 72.754f }, { 72.1191f, 70.6544f }, { 72.1191f, 67.9688f });
+    glyphPath.addBezierCurveTo({ 72.1191f, 66.6993f }, { 71.6797f, 65.4786f }, { 70.7519f, 64.5508f });
+    glyphPath.addLineTo({ 53.5644f, 47.3145f });
+    glyphPath.addBezierCurveTo({ 57.2266f, 42.3829f }, { 59.375f, 36.2793f }, { 59.375f, 29.6875f });
+    glyphPath.addBezierCurveTo({ 59.375f, 13.3301f }, { 46.045f, 0.0f }, { 29.6875f, 0.0f });
+    glyphPath.addBezierCurveTo({ 13.3301f, 0.0f }, { 0.0f, 13.3301f }, { 0.0f, 29.6875f });
+    glyphPath.addBezierCurveTo({ 0.0f, 46.045f }, { 13.33f, 59.375f }, { 29.6875f, 59.375f });
+    glyphPath.moveTo({ 29.6875f, 52.0997f });
+    glyphPath.addBezierCurveTo({ 17.4316f, 52.0997f }, { 7.2754f, 41.9434f }, { 7.2754f, 29.6875f });
+    glyphPath.addBezierCurveTo({ 7.2754f, 17.3829f }, { 17.4316f, 7.2754f }, { 29.6875f, 7.2754f });
+    glyphPath.addBezierCurveTo({ 41.9922f, 7.2754f }, { 52.1f, 17.3829f }, { 52.1f, 29.6875f });
+    glyphPath.addBezierCurveTo({ 52.1f, 41.9435f }, { 41.9922f, 52.0997f }, { 29.6875f, 52.0997f });
+
+    FloatRect paintRect(rect);
+    float scale = paintRect.width() / glyphSize.width();
+
+    AffineTransform transform;
+    transform.translate(paintRect.center() - (glyphSize * scale * 0.5f));
+    transform.scale(scale);
+    glyphPath.transform(transform);
+
+    context.setFillColor(systemColor(CSSValueAppleSystemSecondaryLabel, box.styleColorOptions()));
+    context.fillPath(glyphPath);
+
+    return false;
+}
+
+void RenderThemeIOS::adjustSearchFieldResultsDecorationPartStyle(RenderStyle& style, const Element* element) const
+{
+    adjustSearchFieldDecorationPartStyle(style, element);
+}
+
+bool RenderThemeIOS::paintSearchFieldResultsDecorationPart(const RenderBox& box, const PaintInfo& paintInfo, const IntRect& rect)
+{
+    return paintSearchFieldDecorationPart(box, paintInfo, rect);
+}
+
+void RenderThemeIOS::adjustSearchFieldResultsButtonStyle(RenderStyle& style, const Element* element) const
+{
+    adjustSearchFieldDecorationPartStyle(style, element);
+}
+
+bool RenderThemeIOS::paintSearchFieldResultsButton(const RenderBox& box, const PaintInfo& paintInfo, const IntRect& rect)
+{
+    return paintSearchFieldDecorationPart(box, paintInfo, rect);
+}
+
 #endif // ENABLE(IOS_FORM_CONTROL_REFRESH)
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to