Title: [291962] trunk
- Revision
- 291962
- Author
- [email protected]
- Date
- 2022-03-28 05:08:56 -0700 (Mon, 28 Mar 2022)
Log Message
[Forms] Alias appearance <compat-auto> keywords to 'auto' for button
https://bugs.webkit.org/show_bug.cgi?id=238252
Reviewed by Darin Adler.
Source/WebCore:
We need to alias appearance <compat-auto> keywords to 'auto'. This is to
handle some button related cases including button, push-button and square-button.
Also the slider-horizontal case has been addressed. We still have menulist and
textfield cases left to look into.
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustAppearanceForElement const):
LayoutTests:
Unskip the tests that are now passing.
-webkit-appearance: square-button doesnt work for ::-webkit-file-upload-button any more.
Replace it with -webkit-appearance: none in fast/forms/file/file-style-inheritance.html.
This is also in line with the change in Chromium.
* TestExpectations:
* fast/forms/file/file-style-inheritance.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (291961 => 291962)
--- trunk/LayoutTests/ChangeLog 2022-03-28 08:27:30 UTC (rev 291961)
+++ trunk/LayoutTests/ChangeLog 2022-03-28 12:08:56 UTC (rev 291962)
@@ -1,3 +1,17 @@
+2022-03-28 Ziran Sun <[email protected]>
+
+ [Forms] Alias appearance <compat-auto> keywords to 'auto' for button
+ https://bugs.webkit.org/show_bug.cgi?id=238252
+
+ Reviewed by Darin Adler.
+
+ Unskip the tests that are now passing.
+ -webkit-appearance: square-button doesnt work for ::-webkit-file-upload-button any more.
+ Replace it with -webkit-appearance: none in fast/forms/file/file-style-inheritance.html.
+ This is also in line with the change in Chromium.
+ * TestExpectations:
+ * fast/forms/file/file-style-inheritance.html:
+
2022-03-28 Cameron McCormack <[email protected]>
Remove pending UA shadow tree state when an input element is removed from the document
Modified: trunk/LayoutTests/TestExpectations (291961 => 291962)
--- trunk/LayoutTests/TestExpectations 2022-03-28 08:27:30 UTC (rev 291961)
+++ trunk/LayoutTests/TestExpectations 2022-03-28 12:08:56 UTC (rev 291962)
@@ -4312,12 +4312,8 @@
webkit.org/b/234762 imported/w3c/web-platform-tests/css/css-writing-modes/wm-propagation-body-dynamic-change-003.html [ ImageOnlyFailure ]
# New failures after updating WPT import of css/css-text on 2020-07
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-button-001.html [ ImageOnlyFailure ]
webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-menulist-001.html [ ImageOnlyFailure ]
webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-menulist-button-002.tentative.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-push-button-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-slider-horizontal-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-square-button-001.html [ ImageOnlyFailure ]
webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-textfield-001.html [ ImageOnlyFailure ]
webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/outline-021.html [ ImageOnlyFailure ]
webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/outline-025.html [ ImageOnlyFailure ]
@@ -4324,12 +4320,8 @@
webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/outline-026.html [ ImageOnlyFailure ]
webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/outline-offset-table-001.html [ ImageOnlyFailure ]
webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/text-overflow-ruby.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-button-001.html [ ImageOnlyFailure ]
webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-menulist-001.html [ ImageOnlyFailure ]
webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-menulist-button-002.tentative.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-push-button-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-slider-horizontal-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-square-button-001.html [ ImageOnlyFailure ]
webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-textfield-001.html [ ImageOnlyFailure ]
webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/resize-child-will-change-transform.html [ ImageOnlyFailure ]
webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/resize-generated-content.html [ ImageOnlyFailure ]
Modified: trunk/LayoutTests/fast/forms/file/file-style-inheritance.html (291961 => 291962)
--- trunk/LayoutTests/fast/forms/file/file-style-inheritance.html 2022-03-28 08:27:30 UTC (rev 291961)
+++ trunk/LayoutTests/fast/forms/file/file-style-inheritance.html 2022-03-28 12:08:56 UTC (rev 291962)
@@ -5,8 +5,8 @@
font-size: 30px;
}
#large::-webkit-file-upload-button {
- /* Uses square-button for ease of testing on Mac. */
- -webkit-appearance: square-button;
+ /* Uses none for ease of testing on Mac. */
+ -webkit-appearance: none;
}
#dark {
Modified: trunk/Source/WebCore/ChangeLog (291961 => 291962)
--- trunk/Source/WebCore/ChangeLog 2022-03-28 08:27:30 UTC (rev 291961)
+++ trunk/Source/WebCore/ChangeLog 2022-03-28 12:08:56 UTC (rev 291962)
@@ -1,3 +1,18 @@
+2022-03-28 Ziran Sun <[email protected]>
+
+ [Forms] Alias appearance <compat-auto> keywords to 'auto' for button
+ https://bugs.webkit.org/show_bug.cgi?id=238252
+
+ Reviewed by Darin Adler.
+
+ We need to alias appearance <compat-auto> keywords to 'auto'. This is to
+ handle some button related cases including button, push-button and square-button.
+ Also the slider-horizontal case has been addressed. We still have menulist and
+ textfield cases left to look into.
+
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::adjustAppearanceForElement const):
+
2022-03-28 Cameron McCormack <[email protected]>
Remove pending UA shadow tree state when an input element is removed from the document
Modified: trunk/Source/WebCore/rendering/RenderTheme.cpp (291961 => 291962)
--- trunk/Source/WebCore/rendering/RenderTheme.cpp 2022-03-28 08:27:30 UTC (rev 291961)
+++ trunk/Source/WebCore/rendering/RenderTheme.cpp 2022-03-28 12:08:56 UTC (rev 291962)
@@ -95,7 +95,8 @@
// Aliases of 'auto'.
// https://drafts.csswg.org/css-ui-4/#typedef-appearance-compat-auto
- if (part == AutoPart || part == SearchFieldPart || part == TextAreaPart || part == CheckboxPart || part == RadioPart || part == ListboxPart || part == MeterPart || part == ProgressBarPart) {
+ if (part == AutoPart || part == SearchFieldPart || part == TextAreaPart || part == CheckboxPart || part == RadioPart || part == ListboxPart || part == MeterPart || part == ProgressBarPart
+ || part == SquareButtonPart || part == PushButtonPart || part == SliderHorizontalPart) {
style.setEffectiveAppearance(autoAppearance);
return autoAppearance;
}
@@ -102,11 +103,20 @@
// The following keywords should work well for some element types
// even if their default appearances are different from the keywords.
- if (part == MenulistButtonPart && autoAppearance != MenulistPart) {
+ if (part == ButtonPart) {
+ if (autoAppearance == PushButtonPart || autoAppearance == SquareButtonPart)
+ return part;
style.setEffectiveAppearance(autoAppearance);
- part = autoAppearance;
+ return autoAppearance;
}
+ if (part == MenulistButtonPart) {
+ if (autoAppearance == MenulistPart)
+ return part;
+ style.setEffectiveAppearance(autoAppearance);
+ return autoAppearance;
+ }
+
return part;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes