- Revision
- 292268
- Author
- z...@igalia.com
- Date
- 2022-04-02 11:38:23 -0700 (Sat, 02 Apr 2022)
Log Message
[css-ui] Only apply 'overflow:visible' to elements that support menulist appearance
https://bugs.webkit.org/show_bug.cgi?id=238501
Reviewed by Tim Nguyen.
Source/WebCore:
This CL adds support to alias appearance <compat-auto> keywords to 'auto' for menulist.
When an element supports '-webkit-appearance: menulist' or 'appearance: menulist' appearance,
we will apply 'overflow: visible'. The existing code, though, apply 'overflow: visible' before
the 'menulist' appearance is workable. This patch corrects it.
It is an import of chromium CL at
https://chromium.googlesource.com/chromium/src.git/+/1635202d8979f4d42b96021d8386278261e52768
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustAppearanceForElement const):
(WebCore::RenderTheme::adjustMenuListStyle const):
* rendering/RenderThemeAdwaita.cpp:
(WebCore::RenderThemeAdwaita::adjustMenuListStyle const):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::adjustMenuListStyle const):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::adjustMenuListStyle const):
* style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjust const):
LayoutTests:
Unskip the tests that are now passing.
* TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (292267 => 292268)
--- trunk/LayoutTests/ChangeLog 2022-04-02 16:36:36 UTC (rev 292267)
+++ trunk/LayoutTests/ChangeLog 2022-04-02 18:38:23 UTC (rev 292268)
@@ -1,3 +1,13 @@
+2022-04-02 Ziran Sun <z...@igalia.com>
+
+ [css-ui] Only apply 'overflow:visible' to elements that support menulist appearance
+ https://bugs.webkit.org/show_bug.cgi?id=238501
+
+ Reviewed by Tim Nguyen.
+
+ Unskip the tests that are now passing.
+ * TestExpectations:
+
2022-04-02 Youenn Fablet <you...@apple.com>
Remove notifications from notification list when notification gets closed
Modified: trunk/LayoutTests/TestExpectations (292267 => 292268)
--- trunk/LayoutTests/TestExpectations 2022-04-02 16:36:36 UTC (rev 292267)
+++ trunk/LayoutTests/TestExpectations 2022-04-02 18:38:23 UTC (rev 292268)
@@ -4325,7 +4325,6 @@
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-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-textfield-001.html [ ImageOnlyFailure ]
webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/outline-021.html [ ImageOnlyFailure ]
@@ -4333,7 +4332,6 @@
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-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-textfield-001.html [ ImageOnlyFailure ]
webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/resize-child-will-change-transform.html [ ImageOnlyFailure ]
Modified: trunk/Source/WebCore/ChangeLog (292267 => 292268)
--- trunk/Source/WebCore/ChangeLog 2022-04-02 16:36:36 UTC (rev 292267)
+++ trunk/Source/WebCore/ChangeLog 2022-04-02 18:38:23 UTC (rev 292268)
@@ -1,3 +1,30 @@
+2022-04-02 Ziran Sun <z...@igalia.com>
+
+ [css-ui] Only apply 'overflow:visible' to elements that support menulist appearance
+ https://bugs.webkit.org/show_bug.cgi?id=238501
+
+ Reviewed by Tim Nguyen.
+
+ This CL adds support to alias appearance <compat-auto> keywords to 'auto' for menulist.
+ When an element supports '-webkit-appearance: menulist' or 'appearance: menulist' appearance,
+ we will apply 'overflow: visible'. The existing code, though, apply 'overflow: visible' before
+ the 'menulist' appearance is workable. This patch corrects it.
+
+ It is an import of chromium CL at
+ https://chromium.googlesource.com/chromium/src.git/+/1635202d8979f4d42b96021d8386278261e52768
+
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::adjustAppearanceForElement const):
+ (WebCore::RenderTheme::adjustMenuListStyle const):
+ * rendering/RenderThemeAdwaita.cpp:
+ (WebCore::RenderThemeAdwaita::adjustMenuListStyle const):
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::adjustMenuListStyle const):
+ * rendering/RenderThemeWin.cpp:
+ (WebCore::RenderThemeWin::adjustMenuListStyle const):
+ * style/StyleAdjuster.cpp:
+ (WebCore::Style::Adjuster::adjust const):
+
2022-04-02 Patrick Griffis <pgrif...@igalia.com>
CSP: Improve compatibility of source matching
Modified: trunk/Source/WebCore/rendering/RenderTheme.cpp (292267 => 292268)
--- trunk/Source/WebCore/rendering/RenderTheme.cpp 2022-04-02 16:36:36 UTC (rev 292267)
+++ trunk/Source/WebCore/rendering/RenderTheme.cpp 2022-04-02 18:38:23 UTC (rev 292268)
@@ -96,7 +96,7 @@
// 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
- || part == SquareButtonPart || part == PushButtonPart || part == SliderHorizontalPart) {
+ || part == SquareButtonPart || part == PushButtonPart || part == SliderHorizontalPart || part == MenulistPart) {
style.setEffectiveAppearance(autoAppearance);
return autoAppearance;
}
@@ -1176,8 +1176,10 @@
{
}
-void RenderTheme::adjustMenuListStyle(RenderStyle&, const Element*) const
+void RenderTheme::adjustMenuListStyle(RenderStyle& style, const Element*) const
{
+ style.setOverflowX(Overflow::Visible);
+ style.setOverflowY(Overflow::Visible);
}
void RenderTheme::adjustMeterStyle(RenderStyle& style, const Element*) const
Modified: trunk/Source/WebCore/rendering/RenderThemeAdwaita.cpp (292267 => 292268)
--- trunk/Source/WebCore/rendering/RenderThemeAdwaita.cpp 2022-04-02 16:36:36 UTC (rev 292267)
+++ trunk/Source/WebCore/rendering/RenderThemeAdwaita.cpp 2022-04-02 18:38:23 UTC (rev 292268)
@@ -353,8 +353,9 @@
adjustTextFieldStyle(style, element);
}
-void RenderThemeAdwaita::adjustMenuListStyle(RenderStyle& style, const Element*) const
+void RenderThemeAdwaita::adjustMenuListStyle(RenderStyle& style, const Element* element) const
{
+ RenderTheme::adjustMenuListStyle(style, element);
style.setLineHeight(RenderStyle::initialLineHeight());
}
Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (292267 => 292268)
--- trunk/Source/WebCore/rendering/RenderThemeMac.mm 2022-04-02 16:36:36 UTC (rev 292267)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm 2022-04-02 18:38:23 UTC (rev 292268)
@@ -1644,6 +1644,7 @@
void RenderThemeMac::adjustMenuListStyle(RenderStyle& style, const Element* e) const
{
+ RenderTheme::adjustMenuListStyle(style, e);
NSControlSize controlSize = controlSizeForFont(style);
style.resetBorder();
Modified: trunk/Source/WebCore/rendering/RenderThemeWin.cpp (292267 => 292268)
--- trunk/Source/WebCore/rendering/RenderThemeWin.cpp 2022-04-02 16:36:36 UTC (rev 292267)
+++ trunk/Source/WebCore/rendering/RenderThemeWin.cpp 2022-04-02 18:38:23 UTC (rev 292268)
@@ -746,6 +746,7 @@
void RenderThemeWin::adjustMenuListStyle(RenderStyle& style, const Element* e) const
{
+ RenderTheme::adjustMenuListStyle(style, e);
style.resetBorder();
adjustMenuListButtonStyle(style, e);
}
Modified: trunk/Source/WebCore/style/StyleAdjuster.cpp (292267 => 292268)
--- trunk/Source/WebCore/style/StyleAdjuster.cpp 2022-04-02 16:36:36 UTC (rev 292267)
+++ trunk/Source/WebCore/style/StyleAdjuster.cpp 2022-04-02 18:38:23 UTC (rev 292268)
@@ -459,12 +459,6 @@
style.setOverflowY(Overflow::Visible);
}
- // Menulists should have visible overflow
- if (style.effectiveAppearance() == MenulistPart) {
- style.setOverflowX(Overflow::Visible);
- style.setOverflowY(Overflow::Visible);
- }
-
#if ENABLE(OVERFLOW_SCROLLING_TOUCH)
// Touch overflow scrolling creates a stacking context.
if (style.hasAutoUsedZIndex() && style.useTouchOverflowScrolling() && (isScrollableOverflow(style.overflowX()) || isScrollableOverflow(style.overflowY())))