Title: [294249] trunk
Revision
294249
Author
z...@igalia.com
Date
2022-05-16 12:00:08 -0700 (Mon, 16 May 2022)

Log Message

[css-ui] alias appearance <compat-auto> keywords to 'auto' for textfield
https://bugs.webkit.org/show_bug.cgi?id=238551

Reviewed by Tim Nguyen.

Source/WebCore:

This is to add support of aliasing appearance to 'auto' for textfield.
It has improved the following wpt tests
imported/w3c/web-platform-tests/css/css-ui/appearance-textfield-001.html
and
imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-textfield-001.html.

The test failures though, are not fully fixed. The issue left is that the search cancel button
for input type="search" still present while it is expected to disappear (Bug 238751).

* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustAppearanceForElement const):

LayoutTests:

Rename test name as the test result now matches the expected.
* fast/forms/color/color-input-uses-color-well-appearance-expected.html: Renamed from LayoutTests/fast/forms/color/color-input-uses-color-well-appearance-expected-mismatch.html.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (294248 => 294249)


--- trunk/LayoutTests/ChangeLog	2022-05-16 18:54:01 UTC (rev 294248)
+++ trunk/LayoutTests/ChangeLog	2022-05-16 19:00:08 UTC (rev 294249)
@@ -1,3 +1,13 @@
+2022-05-16  Ziran Sun  <z...@igalia.com>
+
+        [css-ui] alias appearance <compat-auto> keywords to 'auto' for textfield
+        https://bugs.webkit.org/show_bug.cgi?id=238551
+
+        Reviewed by Tim Nguyen.
+
+        Rename test name as the test result now matches the expected.
+        * fast/forms/color/color-input-uses-color-well-appearance-expected.html: Renamed from LayoutTests/fast/forms/color/color-input-uses-color-well-appearance-expected-mismatch.html.
+
 2022-05-16  Karl Rackler  <rack...@apple.com>
 
         [Gardening]: REGRESSION (r264117): [ Mac iOS ] imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/blob.https.html

Deleted: trunk/LayoutTests/fast/forms/color/color-input-uses-color-well-appearance-expected-mismatch.html (294248 => 294249)


--- trunk/LayoutTests/fast/forms/color/color-input-uses-color-well-appearance-expected-mismatch.html	2022-05-16 18:54:01 UTC (rev 294248)
+++ trunk/LayoutTests/fast/forms/color/color-input-uses-color-well-appearance-expected-mismatch.html	2022-05-16 19:00:08 UTC (rev 294249)
@@ -1 +0,0 @@
-<input style="-webkit-appearance: textfield;" type="color" value="#00FF00" style="font-size:18px">

Copied: trunk/LayoutTests/fast/forms/color/color-input-uses-color-well-appearance-expected.html (from rev 294248, trunk/LayoutTests/fast/forms/color/color-input-uses-color-well-appearance-expected-mismatch.html) (0 => 294249)


--- trunk/LayoutTests/fast/forms/color/color-input-uses-color-well-appearance-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/color/color-input-uses-color-well-appearance-expected.html	2022-05-16 19:00:08 UTC (rev 294249)
@@ -0,0 +1 @@
+<input style="-webkit-appearance: textfield;" type="color" value="#00FF00" style="font-size:18px">

Modified: trunk/Source/WebCore/ChangeLog (294248 => 294249)


--- trunk/Source/WebCore/ChangeLog	2022-05-16 18:54:01 UTC (rev 294248)
+++ trunk/Source/WebCore/ChangeLog	2022-05-16 19:00:08 UTC (rev 294249)
@@ -1,3 +1,22 @@
+2022-05-16  Ziran Sun  <z...@igalia.com>
+
+        [css-ui] alias appearance <compat-auto> keywords to 'auto' for textfield
+        https://bugs.webkit.org/show_bug.cgi?id=238551
+
+        Reviewed by Tim Nguyen.
+
+        This is to add support of aliasing appearance to 'auto' for textfield.
+        It has improved the following wpt tests
+        imported/w3c/web-platform-tests/css/css-ui/appearance-textfield-001.html
+        and
+        imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-textfield-001.html.
+
+        The test failures though, are not fully fixed. The issue left is that the search cancel button
+        for input type="search" still present while it is expected to disappear (Bug 238751).
+
+        * rendering/RenderTheme.cpp:
+        (WebCore::RenderTheme::adjustAppearanceForElement const):
+
 2022-05-16  Loïc Le Page  <llep...@igalia.com>
 
         REGRESSION(r294104): [GStreamer][VideoCapture] Webcam raw streams may hang up the video capture pipeline

Modified: trunk/Source/WebCore/rendering/RenderTheme.cpp (294248 => 294249)


--- trunk/Source/WebCore/rendering/RenderTheme.cpp	2022-05-16 18:54:01 UTC (rev 294248)
+++ trunk/Source/WebCore/rendering/RenderTheme.cpp	2022-05-16 19:00:08 UTC (rev 294249)
@@ -117,6 +117,13 @@
         return autoAppearance;
     }
 
+    if (part == TextFieldPart) {
+        if (is<HTMLInputElement>(*element) && downcast<HTMLInputElement>(*element).isSearchField())
+            return part;
+        style.setEffectiveAppearance(autoAppearance);
+        return autoAppearance;
+    }
+
     return part;
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to