OLD | NEW |
1 /* | 1 /* |
2 * This file is part of the theme implementation for form controls in WebCore. | 2 * This file is part of the theme implementation for form controls in WebCore. |
3 * | 3 * |
4 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc. | 4 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 virtual void adjustRepaintRect(const RenderObject*, IntRect&); | 112 virtual void adjustRepaintRect(const RenderObject*, IntRect&); |
113 | 113 |
114 // This method is called whenever a relevant state changes on a particular t
hemed object, e.g., the mouse becomes pressed | 114 // This method is called whenever a relevant state changes on a particular t
hemed object, e.g., the mouse becomes pressed |
115 // or a control becomes disabled. | 115 // or a control becomes disabled. |
116 virtual bool stateChanged(RenderObject*, ControlState) const; | 116 virtual bool stateChanged(RenderObject*, ControlState) const; |
117 | 117 |
118 // This method is called whenever the theme changes on the system in order t
o flush cached resources from the | 118 // This method is called whenever the theme changes on the system in order t
o flush cached resources from the |
119 // old theme. | 119 // old theme. |
120 virtual void themeChanged() { } | 120 virtual void themeChanged() { } |
121 | 121 |
122 // A method asking if the theme is able to draw the focus ring. | 122 bool shouldDrawDefaultFocusRing(RenderObject*) const; |
123 virtual bool supportsFocusRing(const RenderStyle*) const; | |
124 | 123 |
125 // A method asking if the theme's controls actually care about redrawing whe
n hovered. | 124 // A method asking if the theme's controls actually care about redrawing whe
n hovered. |
126 virtual bool supportsHover(const RenderStyle*) const { return false; } | 125 virtual bool supportsHover(const RenderStyle*) const { return false; } |
127 | 126 |
128 // A method asking if the platform is able to show datalist suggestions for
a given input type. | 127 // A method asking if the platform is able to show datalist suggestions for
a given input type. |
129 virtual bool supportsDataListUI(const AtomicString&) const; | 128 virtual bool supportsDataListUI(const AtomicString&) const; |
130 | 129 |
131 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) | 130 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
132 // A method asking if the platform is able to show a calendar picker for a g
iven input type. | 131 // A method asking if the platform is able to show a calendar picker for a g
iven input type. |
133 virtual bool supportsCalendarPicker(const AtomicString&) const; | 132 virtual bool supportsCalendarPicker(const AtomicString&) const; |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 virtual Color platformActiveSelectionBackgroundColor() const; | 222 virtual Color platformActiveSelectionBackgroundColor() const; |
224 virtual Color platformInactiveSelectionBackgroundColor() const; | 223 virtual Color platformInactiveSelectionBackgroundColor() const; |
225 virtual Color platformActiveSelectionForegroundColor() const; | 224 virtual Color platformActiveSelectionForegroundColor() const; |
226 virtual Color platformInactiveSelectionForegroundColor() const; | 225 virtual Color platformInactiveSelectionForegroundColor() const; |
227 | 226 |
228 virtual Color platformActiveListBoxSelectionBackgroundColor() const; | 227 virtual Color platformActiveListBoxSelectionBackgroundColor() const; |
229 virtual Color platformInactiveListBoxSelectionBackgroundColor() const; | 228 virtual Color platformInactiveListBoxSelectionBackgroundColor() const; |
230 virtual Color platformActiveListBoxSelectionForegroundColor() const; | 229 virtual Color platformActiveListBoxSelectionForegroundColor() const; |
231 virtual Color platformInactiveListBoxSelectionForegroundColor() const; | 230 virtual Color platformInactiveListBoxSelectionForegroundColor() const; |
232 | 231 |
| 232 // A method asking if the theme is able to draw the focus ring. |
| 233 virtual bool supportsFocusRing(const RenderStyle*) const; |
233 virtual bool supportsSelectionForegroundColors() const { return true; } | 234 virtual bool supportsSelectionForegroundColors() const { return true; } |
234 virtual bool supportsListBoxSelectionForegroundColors() const { return true;
} | 235 virtual bool supportsListBoxSelectionForegroundColors() const { return true;
} |
235 | 236 |
236 #if !USE(NEW_THEME) | 237 #if !USE(NEW_THEME) |
237 // Methods for each appearance value. | 238 // Methods for each appearance value. |
238 virtual void adjustCheckboxStyle(RenderStyle*, Element*) const; | 239 virtual void adjustCheckboxStyle(RenderStyle*, Element*) const; |
239 virtual bool paintCheckbox(RenderObject*, const PaintInfo&, const IntRect&)
{ return true; } | 240 virtual bool paintCheckbox(RenderObject*, const PaintInfo&, const IntRect&)
{ return true; } |
240 virtual void setCheckboxSize(RenderStyle*) const { } | 241 virtual void setCheckboxSize(RenderStyle*) const { } |
241 | 242 |
242 virtual void adjustRadioStyle(RenderStyle*, Element*) const; | 243 virtual void adjustRadioStyle(RenderStyle*, Element*) const; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 static const RGBA32 defaultTapHighlightColor = 0x66000000; | 352 static const RGBA32 defaultTapHighlightColor = 0x66000000; |
352 | 353 |
353 #if USE(NEW_THEME) | 354 #if USE(NEW_THEME) |
354 Theme* m_theme; // The platform-specific theme. | 355 Theme* m_theme; // The platform-specific theme. |
355 #endif | 356 #endif |
356 }; | 357 }; |
357 | 358 |
358 } // namespace WebCore | 359 } // namespace WebCore |
359 | 360 |
360 #endif // RenderTheme_h | 361 #endif // RenderTheme_h |
OLD | NEW |