Changeset 232392 in webkit
- Timestamp:
- Jun 1, 2018 6:02:39 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r232390 r232392 1 2018-06-01 Carlos Eduardo Ramalho <cadubentzen@gmail.com> 2 3 [GTK] Difficult to read combo box text in dark theme 4 https://bugs.webkit.org/show_bug.cgi?id=165072 5 6 Reviewed by Carlos Garcia Campos. 7 8 Set listbox foreground color to theme color to fix hard-to-read 9 text color in combo box while using dark theme. 10 11 No new tests required. ManualTests/gtk/theme.html already covers it. 12 See the "Option Lists" section. 13 14 * rendering/RenderTheme.cpp: 15 (WebCore::RenderTheme::adjustStyle): 16 Adjust style for ListboxPart as well. 17 * rendering/RenderTheme.h: Add adjustListboxStyle() 18 * rendering/RenderThemeGtk.cpp: 19 (WebCore::RenderThemeGtk::adjustListboxStyle const): 20 Set color to the theme foreground color. 21 * rendering/RenderThemeGtk.h: adjustListboxStyle() overriden. 22 1 23 2018-06-01 Carlos Garcia Campos <cgarcia@igalia.com> 2 24 -
trunk/Source/WebCore/rendering/RenderTheme.cpp
r232306 r232392 214 214 case MenulistButtonPart: 215 215 return adjustMenuListButtonStyle(styleResolver, style, element); 216 case ListboxPart: 217 return adjustListboxStyle(styleResolver, style, element); 216 218 case MediaPlayButtonPart: 217 219 case MediaCurrentTimePart: -
trunk/Source/WebCore/rendering/RenderTheme.h
r231557 r232392 305 305 virtual void adjustMenuListButtonStyle(StyleResolver&, RenderStyle&, const Element*) const; 306 306 virtual bool paintMenuListButtonDecorations(const RenderBox&, const PaintInfo&, const FloatRect&) { return true; } 307 308 virtual void adjustListboxStyle(StyleResolver&, RenderStyle&, const Element*) const { }; 307 309 308 310 virtual bool paintPushButtonDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; } -
trunk/Source/WebCore/rendering/RenderThemeGtk.cpp
r232338 r232392 1136 1136 } 1137 1137 1138 void RenderThemeGtk::adjustListboxStyle(StyleResolver&, RenderStyle& style, const Element* element) const 1139 { 1140 if (element) 1141 style.setColor(styleColor(ListBox, element->isDisabledFormControl() ? GTK_STATE_FLAG_INSENSITIVE : GTK_STATE_FLAG_NORMAL, StyleColorForeground)); 1142 } 1143 1138 1144 bool RenderThemeGtk::paintTextArea(const RenderObject& o, const PaintInfo& i, const FloatRect& r) 1139 1145 { -
trunk/Source/WebCore/rendering/RenderThemeGtk.h
r232338 r232392 134 134 bool paintMenuListButtonDecorations(const RenderBox&, const PaintInfo&, const FloatRect&) override; 135 135 136 void adjustListboxStyle(StyleResolver&, RenderStyle&, const Element*) const override; 137 136 138 void adjustSearchFieldResultsDecorationPartStyle(StyleResolver&, RenderStyle&, const Element*) const override; 137 139 bool paintSearchFieldResultsDecorationPart(const RenderBox&, const PaintInfo&, const IntRect&) override;
Note: See TracChangeset
for help on using the changeset viewer.