Title: [289201] trunk
- Revision
- 289201
- Author
- [email protected]
- Date
- 2022-02-07 01:22:33 -0800 (Mon, 07 Feb 2022)
Log Message
[Forms] Alias appearance <compat-auto> keywords to 'auto'
https://bugs.webkit.org/show_bug.cgi?id=235944
Reviewed by Aditya Keerthi.
Source/WebCore:
This CL alias the <compat-auto> keywords 'auto'. We need to address the cases of MenuList, button,
square-button, push-button and slider-horizontal etc. separately.
Spec ref: https://drafts.csswg.org/css-ui-4/#typedef-appearance-compat-auto
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustAppearanceWithElementType const):
(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::paint):
* rendering/RenderTheme.h:
LayoutTests:
Unskip tests in test expactation files that are now passing.
* TestExpectations:
* platform/gtk/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (289200 => 289201)
--- trunk/LayoutTests/ChangeLog 2022-02-07 05:45:40 UTC (rev 289200)
+++ trunk/LayoutTests/ChangeLog 2022-02-07 09:22:33 UTC (rev 289201)
@@ -1,3 +1,14 @@
+2022-02-07 Ziran Sun <[email protected]>
+
+ [Forms] Alias appearance <compat-auto> keywords to 'auto'
+ https://bugs.webkit.org/show_bug.cgi?id=235944
+
+ Reviewed by Aditya Keerthi.
+
+ Unskip tests in test expactation files that are now passing.
+ * TestExpectations:
+ * platform/gtk/TestExpectations:
+
2022-02-06 Jean-Yves Avenard <[email protected]>
media/media-source/media-webm-vorbis-partial.html is failing
Modified: trunk/LayoutTests/TestExpectations (289200 => 289201)
--- trunk/LayoutTests/TestExpectations 2022-02-07 05:45:40 UTC (rev 289200)
+++ trunk/LayoutTests/TestExpectations 2022-02-07 09:22:33 UTC (rev 289201)
@@ -4305,19 +4305,11 @@
# 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-checkbox-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-listbox-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-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-meter-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-progress-bar-001.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-radio-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-searchfield-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-textarea-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-024.html [ ImageOnlyFailure ]
@@ -4327,19 +4319,11 @@
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-checkbox-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-listbox-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-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-meter-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-progress-bar-001.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-radio-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-searchfield-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-textarea-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/platform/gtk/TestExpectations (289200 => 289201)
--- trunk/LayoutTests/platform/gtk/TestExpectations 2022-02-07 05:45:40 UTC (rev 289200)
+++ trunk/LayoutTests/platform/gtk/TestExpectations 2022-02-07 09:22:33 UTC (rev 289201)
@@ -185,8 +185,6 @@
# MESA-related segfault
webkit.org/b/216777 compositing/video/video-update-rendering.html [ Pass Crash ]
webkit.org/b/216777 imported/w3c/web-platform-tests/css/css-text/writing-system/writing-system-segment-break-001.html [ ImageOnlyFailure Crash ]
-webkit.org/b/216777 imported/w3c/web-platform-tests/css/css-ui/appearance-checkbox-001.html [ ImageOnlyFailure Crash ]
-webkit.org/b/216777 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-listbox-001.html [ ImageOnlyFailure Crash ]
# Navigation
webkit.org/b/218349 fast/forms/focus2.html [ Failure ]
Modified: trunk/Source/WebCore/ChangeLog (289200 => 289201)
--- trunk/Source/WebCore/ChangeLog 2022-02-07 05:45:40 UTC (rev 289200)
+++ trunk/Source/WebCore/ChangeLog 2022-02-07 09:22:33 UTC (rev 289201)
@@ -1,3 +1,21 @@
+2022-02-07 Ziran Sun <[email protected]>
+
+ [Forms] Alias appearance <compat-auto> keywords to 'auto'
+ https://bugs.webkit.org/show_bug.cgi?id=235944
+
+ Reviewed by Aditya Keerthi.
+
+ This CL alias the <compat-auto> keywords 'auto'. We need to address the cases of MenuList, button,
+ square-button, push-button and slider-horizontal etc. separately.
+
+ Spec ref: https://drafts.csswg.org/css-ui-4/#typedef-appearance-compat-auto
+
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::adjustAppearanceWithElementType const):
+ (WebCore::RenderTheme::adjustStyle):
+ (WebCore::RenderTheme::paint):
+ * rendering/RenderTheme.h:
+
2022-02-06 Lauro Moura <[email protected]>
Unreviewed, non-unified build fixes
Modified: trunk/Source/WebCore/rendering/RenderTheme.cpp (289200 => 289201)
--- trunk/Source/WebCore/rendering/RenderTheme.cpp 2022-02-07 05:45:40 UTC (rev 289200)
+++ trunk/Source/WebCore/rendering/RenderTheme.cpp 2022-02-07 09:22:33 UTC (rev 289201)
@@ -84,19 +84,40 @@
{
}
-void RenderTheme::adjustStyle(RenderStyle& style, const Element* element, const RenderStyle* userAgentAppearanceStyle)
+ControlPart RenderTheme::adjustAppearanceForElement(RenderStyle& style, const Element* element) const
{
- auto part = style.effectiveAppearance();
- if (part == AutoPart) {
- part = autoAppearanceForElement(element);
+ if (!element)
+ return NoControlPart;
- ASSERT(part != AutoPart);
- style.setEffectiveAppearance(part);
+ ControlPart part = style.effectiveAppearance();
+ ControlPart autoAppearance = autoAppearanceForElement(element);
+ if (part == autoAppearance)
+ return part;
- if (part == NoControlPart)
- return;
+ // 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) {
+ style.setEffectiveAppearance(autoAppearance);
+ return autoAppearance;
}
+ // 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) {
+ style.setEffectiveAppearance(autoAppearance);
+ part = autoAppearance;
+ }
+
+ return part;
+}
+
+void RenderTheme::adjustStyle(RenderStyle& style, const Element* element, const RenderStyle* userAgentAppearanceStyle)
+{
+ auto part = adjustAppearanceForElement(style, element);
+
+ if (part == NoControlPart)
+ return;
+
// Force inline and table display styles to be inline-block (except for table- which is block)
if (style.display() == DisplayType::Inline || style.display() == DisplayType::InlineTable || style.display() == DisplayType::TableRowGroup
|| style.display() == DisplayType::TableHeaderGroup || style.display() == DisplayType::TableFooterGroup
Modified: trunk/Source/WebCore/rendering/RenderTheme.h (289200 => 289201)
--- trunk/Source/WebCore/rendering/RenderTheme.h 2022-02-07 05:45:40 UTC (rev 289200)
+++ trunk/Source/WebCore/rendering/RenderTheme.h 2022-02-07 09:22:33 UTC (rev 289201)
@@ -466,6 +466,7 @@
private:
ControlPart autoAppearanceForElement(const Element*) const;
+ ControlPart adjustAppearanceForElement(RenderStyle&, const Element*) const;
void adjustSearchFieldDecorationStyle(RenderStyle&, const Element*) const;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes