Changeset 199659 in webkit
- Timestamp:
- Apr 18, 2016 1:44:55 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r199518 r199659 1 2016-04-18 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Menu list button doesn't use the text color from the theme 4 https://bugs.webkit.org/show_bug.cgi?id=118234 5 6 Reviewed by Darin Adler. 7 8 * ManualTests/gtk/theme.html: Add a disabled combo test. 9 1 10 2016-04-13 Konstantin Tokarev <annulen@yandex.ru> 2 11 -
trunk/ManualTests/gtk/theme.html
r199292 r199659 38 38 <td><select><option>A</option><option selected>B</option><option>C</option></td> 39 39 <td><select><option>Combo option 1</option><option>Combo option 2</option><option>Combo option 3</option></td> 40 <td><select disabled><option>Disabled option 1</option><option>Disabled option 2</option><option>Disabled option 3</option></td> 40 41 </tr> 41 42 </table> -
trunk/Source/WebCore/ChangeLog
r199657 r199659 1 2016-04-18 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Menu list button doesn't use the text color from the theme 4 https://bugs.webkit.org/show_bug.cgi?id=118234 5 6 Reviewed by Darin Adler. 7 8 Set the combo box color accroding to the theme when adjusting the menu list style like Mac port does. 9 10 * rendering/RenderThemeGtk.cpp: 11 (WebCore::menuListColor): 12 (WebCore::RenderThemeGtk::adjustMenuListStyle): 13 1 14 2016-04-18 Manuel Rego Casasnovas <rego@igalia.com> 2 15 -
trunk/Source/WebCore/rendering/RenderThemeGtk.cpp
r199640 r199659 774 774 #endif // GTK_CHECK_VERSION(3, 20, 0) 775 775 776 void RenderThemeGtk::adjustMenuListStyle(StyleResolver&, RenderStyle& style, const Element*) const 776 static Color menuListColor(const Element* element) 777 { 778 #if GTK_CHECK_VERSION(3, 20, 0) 779 RenderThemeGadget::Info info { RenderThemeGadget::Type::Generic, "combobox", element->isDisabledFormControl() ? GTK_STATE_FLAG_INSENSITIVE : GTK_STATE_FLAG_NORMAL, { } }; 780 auto comboGadget = RenderThemeGadget::create(info); 781 Vector<RenderThemeGadget::Info> children { 782 { RenderThemeGadget::Type::Generic, "button", info.state, { "combo" } } 783 }; 784 info.name = "box"; 785 info.classList = { "horizontal", "linked" }; 786 return RenderThemeBoxGadget(info, children, comboGadget.get()).child(0)->color(); 787 #else 788 GRefPtr<GtkStyleContext> parentStyleContext = createStyleContext(ComboBox); 789 GRefPtr<GtkStyleContext> buttonStyleContext = createStyleContext(ComboBoxButton, parentStyleContext.get()); 790 gtk_style_context_set_state(buttonStyleContext.get(), element->isDisabledFormControl() ? GTK_STATE_FLAG_INSENSITIVE : GTK_STATE_FLAG_NORMAL); 791 792 GdkRGBA gdkRGBAColor; 793 gtk_style_context_get_color(buttonStyleContext.get(), gtk_style_context_get_state(buttonStyleContext.get()), &gdkRGBAColor); 794 return gdkRGBAColor; 795 #endif // GTK_CHECK_VERSION(3, 20, 0) 796 } 797 798 void RenderThemeGtk::adjustMenuListStyle(StyleResolver&, RenderStyle& style, const Element* element) const 777 799 { 778 800 // The tests check explicitly that select menu buttons ignore line height. … … 781 803 // We cannot give a proper rendering when border radius is active, unfortunately. 782 804 style.resetBorderRadius(); 805 806 style.setColor(menuListColor(element)); 783 807 } 784 808
Note: See TracChangeset
for help on using the changeset viewer.