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 10 matching lines...) Expand all Loading... |
21 */ | 21 */ |
22 | 22 |
23 #ifndef LayoutTheme_h | 23 #ifndef LayoutTheme_h |
24 #define LayoutTheme_h | 24 #define LayoutTheme_h |
25 | 25 |
26 #if USE(NEW_THEME) | 26 #if USE(NEW_THEME) |
27 #include "platform/Theme.h" | 27 #include "platform/Theme.h" |
28 #else | 28 #else |
29 #include "platform/ThemeTypes.h" | 29 #include "platform/ThemeTypes.h" |
30 #endif | 30 #endif |
31 #include "core/rendering/RenderObject.h" | 31 #include "core/layout/LayoutObject.h" |
32 #include "core/rendering/style/CachedUAStyle.h" | 32 #include "core/rendering/style/CachedUAStyle.h" |
33 #include "platform/scroll/ScrollTypes.h" | 33 #include "platform/scroll/ScrollTypes.h" |
34 #include "wtf/PassRefPtr.h" | 34 #include "wtf/PassRefPtr.h" |
35 #include "wtf/RefCounted.h" | 35 #include "wtf/RefCounted.h" |
36 #include "wtf/text/WTFString.h" | 36 #include "wtf/text/WTFString.h" |
37 | 37 |
38 namespace blink { | 38 namespace blink { |
39 | 39 |
40 class Element; | 40 class Element; |
41 class FileList; | 41 class FileList; |
(...skipping 15 matching lines...) Expand all Loading... |
57 | 57 |
58 static void setSizeIfAuto(RenderStyle&, const IntSize&); | 58 static void setSizeIfAuto(RenderStyle&, const IntSize&); |
59 | 59 |
60 // This method is called whenever style has been computed for an element and
the appearance | 60 // This method is called whenever style has been computed for an element and
the appearance |
61 // property has been set to a value other than "none". The theme should map
in all of the appropriate | 61 // property has been set to a value other than "none". The theme should map
in all of the appropriate |
62 // metrics and defaults given the contents of the style. This includes soph
isticated operations like | 62 // metrics and defaults given the contents of the style. This includes soph
isticated operations like |
63 // selection of control size based off the font, the disabling of appearance
when certain other properties like | 63 // selection of control size based off the font, the disabling of appearance
when certain other properties like |
64 // "border" are set, or if the appearance is not supported by the theme. | 64 // "border" are set, or if the appearance is not supported by the theme. |
65 void adjustStyle(RenderStyle&, Element*, const CachedUAStyle*); | 65 void adjustStyle(RenderStyle&, Element*, const CachedUAStyle*); |
66 | 66 |
67 // This method is called to paint the widget as a background of the RenderOb
ject. A widget's foreground, e.g., the | 67 // This method is called to paint the widget as a background of the LayoutOb
ject. A widget's foreground, e.g., the |
68 // text of a button, is always rendered by the engine itself. The boolean r
eturn value indicates | 68 // text of a button, is always rendered by the engine itself. The boolean r
eturn value indicates |
69 // whether the CSS border/background should also be painted. | 69 // whether the CSS border/background should also be painted. |
70 bool paint(RenderObject*, const PaintInfo&, const IntRect&); | 70 bool paint(LayoutObject*, const PaintInfo&, const IntRect&); |
71 bool paintBorderOnly(RenderObject*, const PaintInfo&, const IntRect&); | 71 bool paintBorderOnly(LayoutObject*, const PaintInfo&, const IntRect&); |
72 bool paintDecorations(RenderObject*, const PaintInfo&, const IntRect&); | 72 bool paintDecorations(LayoutObject*, const PaintInfo&, const IntRect&); |
73 | 73 |
74 // The remaining methods should be implemented by the platform-specific port
ion of the theme, e.g., | 74 // The remaining methods should be implemented by the platform-specific port
ion of the theme, e.g., |
75 // LayoutThemeMac.cpp for Mac OS X. | 75 // LayoutThemeMac.cpp for Mac OS X. |
76 | 76 |
77 // These methods return the theme's extra style sheets rules, to let each pl
atform | 77 // These methods return the theme's extra style sheets rules, to let each pl
atform |
78 // adjust the default CSS rules in html.css, quirks.css or mediaControls.css
. | 78 // adjust the default CSS rules in html.css, quirks.css or mediaControls.css
. |
79 virtual String extraDefaultStyleSheet(); | 79 virtual String extraDefaultStyleSheet(); |
80 virtual String extraQuirksStyleSheet() { return String(); } | 80 virtual String extraQuirksStyleSheet() { return String(); } |
81 virtual String extraMediaControlsStyleSheet() { return String(); } | 81 virtual String extraMediaControlsStyleSheet() { return String(); } |
82 virtual String extraFullScreenStyleSheet() { return String(); } | 82 virtual String extraFullScreenStyleSheet() { return String(); } |
83 | 83 |
84 // A method to obtain the baseline position for a "leaf" control. This will
only be used if a baseline | 84 // A method to obtain the baseline position for a "leaf" control. This will
only be used if a baseline |
85 // position cannot be determined by examining child content. Checkboxes and
radio buttons are examples of | 85 // position cannot be determined by examining child content. Checkboxes and
radio buttons are examples of |
86 // controls that need to do this. | 86 // controls that need to do this. |
87 virtual int baselinePosition(const RenderObject*) const; | 87 virtual int baselinePosition(const LayoutObject*) const; |
88 | 88 |
89 // A method for asking if a control is a container or not. Leaf controls ha
ve to have some special behavior (like | 89 // A method for asking if a control is a container or not. Leaf controls ha
ve to have some special behavior (like |
90 // the baseline position API above). | 90 // the baseline position API above). |
91 bool isControlContainer(ControlPart) const; | 91 bool isControlContainer(ControlPart) const; |
92 | 92 |
93 // Whether or not the control has been styled enough by the author to disabl
e the native appearance. | 93 // Whether or not the control has been styled enough by the author to disabl
e the native appearance. |
94 virtual bool isControlStyled(const RenderStyle&, const CachedUAStyle*) const
; | 94 virtual bool isControlStyled(const RenderStyle&, const CachedUAStyle*) const
; |
95 | 95 |
96 // Some controls may spill out of their containers (e.g., the check on an OS
X checkbox). When these controls issues paint invalidations, | 96 // Some controls may spill out of their containers (e.g., the check on an OS
X checkbox). When these controls issues paint invalidations, |
97 // the theme needs to communicate this inflated rect to the engine so that i
t can invalidate the whole control. | 97 // the theme needs to communicate this inflated rect to the engine so that i
t can invalidate the whole control. |
98 virtual void adjustPaintInvalidationRect(const RenderObject*, IntRect&); | 98 virtual void adjustPaintInvalidationRect(const LayoutObject*, IntRect&); |
99 | 99 |
100 // This method is called whenever a relevant state changes on a particular t
hemed object, e.g., the mouse becomes pressed | 100 // This method is called whenever a relevant state changes on a particular t
hemed object, e.g., the mouse becomes pressed |
101 // or a control becomes disabled. | 101 // or a control becomes disabled. |
102 virtual bool stateChanged(RenderObject*, ControlState) const; | 102 virtual bool stateChanged(LayoutObject*, ControlState) const; |
103 | 103 |
104 bool shouldDrawDefaultFocusRing(RenderObject*) const; | 104 bool shouldDrawDefaultFocusRing(LayoutObject*) const; |
105 | 105 |
106 // A method asking if the theme's controls actually care about redrawing whe
n hovered. | 106 // A method asking if the theme's controls actually care about redrawing whe
n hovered. |
107 virtual bool supportsHover(const RenderStyle&) const { return false; } | 107 virtual bool supportsHover(const RenderStyle&) const { return false; } |
108 | 108 |
109 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) | 109 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
110 // A method asking if the platform is able to show a calendar picker for a g
iven input type. | 110 // A method asking if the platform is able to show a calendar picker for a g
iven input type. |
111 virtual bool supportsCalendarPicker(const AtomicString&) const; | 111 virtual bool supportsCalendarPicker(const AtomicString&) const; |
112 #endif | 112 #endif |
113 | 113 |
114 // Text selection colors. | 114 // Text selection colors. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 virtual int popupInternalPaddingLeft(const RenderStyle&) const { return 0; } | 149 virtual int popupInternalPaddingLeft(const RenderStyle&) const { return 0; } |
150 virtual int popupInternalPaddingRight(const RenderStyle&) const { return 0;
} | 150 virtual int popupInternalPaddingRight(const RenderStyle&) const { return 0;
} |
151 virtual int popupInternalPaddingTop(const RenderStyle&) const { return 0; } | 151 virtual int popupInternalPaddingTop(const RenderStyle&) const { return 0; } |
152 virtual int popupInternalPaddingBottom(const RenderStyle&) const { return 0;
} | 152 virtual int popupInternalPaddingBottom(const RenderStyle&) const { return 0;
} |
153 virtual bool popupOptionSupportsTextIndent() const { return false; } | 153 virtual bool popupOptionSupportsTextIndent() const { return false; } |
154 | 154 |
155 virtual ScrollbarControlSize scrollbarControlSizeForPart(ControlPart) { retu
rn RegularScrollbar; } | 155 virtual ScrollbarControlSize scrollbarControlSizeForPart(ControlPart) { retu
rn RegularScrollbar; } |
156 | 156 |
157 // Method for painting the caps lock indicator | 157 // Method for painting the caps lock indicator |
158 virtual bool paintCapsLockIndicator(RenderObject*, const PaintInfo&, const I
ntRect&) { return 0; }; | 158 virtual bool paintCapsLockIndicator(LayoutObject*, const PaintInfo&, const I
ntRect&) { return 0; }; |
159 | 159 |
160 // Returns the repeat interval of the animation for the progress bar. | 160 // Returns the repeat interval of the animation for the progress bar. |
161 virtual double animationRepeatIntervalForProgressBar(RenderProgress*) const; | 161 virtual double animationRepeatIntervalForProgressBar(RenderProgress*) const; |
162 // Returns the duration of the animation for the progress bar. | 162 // Returns the duration of the animation for the progress bar. |
163 virtual double animationDurationForProgressBar(RenderProgress*) const; | 163 virtual double animationDurationForProgressBar(RenderProgress*) const; |
164 | 164 |
165 // Media controls | 165 // Media controls |
166 virtual String formatMediaControlsTime(float time) const; | 166 virtual String formatMediaControlsTime(float time) const; |
167 virtual String formatMediaControlsCurrentTime(float currentTime, float durat
ion) const; | 167 virtual String formatMediaControlsCurrentTime(float currentTime, float durat
ion) const; |
168 | 168 |
169 virtual IntSize meterSizeForBounds(const RenderMeter*, const IntRect&) const
; | 169 virtual IntSize meterSizeForBounds(const RenderMeter*, const IntRect&) const
; |
170 virtual bool supportsMeter(ControlPart) const; | 170 virtual bool supportsMeter(ControlPart) const; |
171 | 171 |
172 // Returns size of one slider tick mark for a horizontal track. | 172 // Returns size of one slider tick mark for a horizontal track. |
173 // For vertical tracks we rotate it and use it. i.e. Width is always length
along the track. | 173 // For vertical tracks we rotate it and use it. i.e. Width is always length
along the track. |
174 virtual IntSize sliderTickSize() const = 0; | 174 virtual IntSize sliderTickSize() const = 0; |
175 // Returns the distance of slider tick origin from the slider track center. | 175 // Returns the distance of slider tick origin from the slider track center. |
176 virtual int sliderTickOffsetFromTrackCenter() const = 0; | 176 virtual int sliderTickOffsetFromTrackCenter() const = 0; |
177 void paintSliderTicks(RenderObject*, const PaintInfo&, const IntRect&); | 177 void paintSliderTicks(LayoutObject*, const PaintInfo&, const IntRect&); |
178 | 178 |
179 virtual bool shouldShowPlaceholderWhenFocused() const { return false; } | 179 virtual bool shouldShowPlaceholderWhenFocused() const { return false; } |
180 virtual bool shouldHaveSpinButton(HTMLInputElement*) const; | 180 virtual bool shouldHaveSpinButton(HTMLInputElement*) const; |
181 | 181 |
182 // Functions for <select> elements. | 182 // Functions for <select> elements. |
183 virtual bool delegatesMenuListRendering() const { return false; } | 183 virtual bool delegatesMenuListRendering() const { return false; } |
184 virtual bool popsMenuByArrowKeys() const { return false; } | 184 virtual bool popsMenuByArrowKeys() const { return false; } |
185 virtual bool popsMenuBySpaceKey() const { return false; } | 185 virtual bool popsMenuBySpaceKey() const { return false; } |
186 virtual bool popsMenuByReturnKey() const { return false; } | 186 virtual bool popsMenuByReturnKey() const { return false; } |
187 virtual bool popsMenuByAltDownUpOrF4Key() const { return false; } | 187 virtual bool popsMenuByAltDownUpOrF4Key() const { return false; } |
(...skipping 17 matching lines...) Expand all Loading... |
205 virtual Color platformInactiveListBoxSelectionBackgroundColor() const; | 205 virtual Color platformInactiveListBoxSelectionBackgroundColor() const; |
206 virtual Color platformActiveListBoxSelectionForegroundColor() const; | 206 virtual Color platformActiveListBoxSelectionForegroundColor() const; |
207 virtual Color platformInactiveListBoxSelectionForegroundColor() const; | 207 virtual Color platformInactiveListBoxSelectionForegroundColor() const; |
208 | 208 |
209 // A method asking if the theme is able to draw the focus ring. | 209 // A method asking if the theme is able to draw the focus ring. |
210 virtual bool supportsFocusRing(const RenderStyle&) const; | 210 virtual bool supportsFocusRing(const RenderStyle&) const; |
211 | 211 |
212 #if !USE(NEW_THEME) | 212 #if !USE(NEW_THEME) |
213 // Methods for each appearance value. | 213 // Methods for each appearance value. |
214 virtual void adjustCheckboxStyle(RenderStyle&, Element*) const; | 214 virtual void adjustCheckboxStyle(RenderStyle&, Element*) const; |
215 virtual bool paintCheckbox(RenderObject*, const PaintInfo&, const IntRect&)
{ return true; } | 215 virtual bool paintCheckbox(LayoutObject*, const PaintInfo&, const IntRect&)
{ return true; } |
216 virtual void setCheckboxSize(RenderStyle&) const { } | 216 virtual void setCheckboxSize(RenderStyle&) const { } |
217 | 217 |
218 virtual void adjustRadioStyle(RenderStyle&, Element*) const; | 218 virtual void adjustRadioStyle(RenderStyle&, Element*) const; |
219 virtual bool paintRadio(RenderObject*, const PaintInfo&, const IntRect&) { r
eturn true; } | 219 virtual bool paintRadio(LayoutObject*, const PaintInfo&, const IntRect&) { r
eturn true; } |
220 virtual void setRadioSize(RenderStyle&) const { } | 220 virtual void setRadioSize(RenderStyle&) const { } |
221 | 221 |
222 virtual void adjustButtonStyle(RenderStyle&, Element*) const; | 222 virtual void adjustButtonStyle(RenderStyle&, Element*) const; |
223 virtual bool paintButton(RenderObject*, const PaintInfo&, const IntRect&) {
return true; } | 223 virtual bool paintButton(LayoutObject*, const PaintInfo&, const IntRect&) {
return true; } |
224 | 224 |
225 virtual void adjustInnerSpinButtonStyle(RenderStyle&, Element*) const; | 225 virtual void adjustInnerSpinButtonStyle(RenderStyle&, Element*) const; |
226 virtual bool paintInnerSpinButton(RenderObject*, const PaintInfo&, const Int
Rect&) { return true; } | 226 virtual bool paintInnerSpinButton(LayoutObject*, const PaintInfo&, const Int
Rect&) { return true; } |
227 #endif | 227 #endif |
228 | 228 |
229 virtual bool paintTextField(RenderObject*, const PaintInfo&, const IntRect&)
{ return true; } | 229 virtual bool paintTextField(LayoutObject*, const PaintInfo&, const IntRect&)
{ return true; } |
230 | 230 |
231 virtual bool paintTextArea(RenderObject*, const PaintInfo&, const IntRect&)
{ return true; } | 231 virtual bool paintTextArea(LayoutObject*, const PaintInfo&, const IntRect&)
{ return true; } |
232 | 232 |
233 virtual void adjustMenuListStyle(RenderStyle&, Element*) const; | 233 virtual void adjustMenuListStyle(RenderStyle&, Element*) const; |
234 virtual bool paintMenuList(RenderObject*, const PaintInfo&, const IntRect&)
{ return true; } | 234 virtual bool paintMenuList(LayoutObject*, const PaintInfo&, const IntRect&)
{ return true; } |
235 | 235 |
236 virtual void adjustMenuListButtonStyle(RenderStyle&, Element*) const; | 236 virtual void adjustMenuListButtonStyle(RenderStyle&, Element*) const; |
237 virtual bool paintMenuListButton(RenderObject*, const PaintInfo&, const IntR
ect&) { return true; } | 237 virtual bool paintMenuListButton(LayoutObject*, const PaintInfo&, const IntR
ect&) { return true; } |
238 | 238 |
239 virtual bool paintMeter(RenderObject*, const PaintInfo&, const IntRect&); | 239 virtual bool paintMeter(LayoutObject*, const PaintInfo&, const IntRect&); |
240 | 240 |
241 virtual bool paintProgressBar(RenderObject*, const PaintInfo&, const IntRect
&) { return true; } | 241 virtual bool paintProgressBar(LayoutObject*, const PaintInfo&, const IntRect
&) { return true; } |
242 | 242 |
243 virtual bool paintSliderTrack(RenderObject*, const PaintInfo&, const IntRect
&) { return true; } | 243 virtual bool paintSliderTrack(LayoutObject*, const PaintInfo&, const IntRect
&) { return true; } |
244 | 244 |
245 virtual void adjustSliderThumbStyle(RenderStyle&, Element*) const; | 245 virtual void adjustSliderThumbStyle(RenderStyle&, Element*) const; |
246 virtual bool paintSliderThumb(RenderObject*, const PaintInfo&, const IntRect
&) { return true; } | 246 virtual bool paintSliderThumb(LayoutObject*, const PaintInfo&, const IntRect
&) { return true; } |
247 | 247 |
248 virtual void adjustSearchFieldStyle(RenderStyle&, Element*) const; | 248 virtual void adjustSearchFieldStyle(RenderStyle&, Element*) const; |
249 virtual bool paintSearchField(RenderObject*, const PaintInfo&, const IntRect
&) { return true; } | 249 virtual bool paintSearchField(LayoutObject*, const PaintInfo&, const IntRect
&) { return true; } |
250 | 250 |
251 virtual void adjustSearchFieldCancelButtonStyle(RenderStyle&, Element*) cons
t; | 251 virtual void adjustSearchFieldCancelButtonStyle(RenderStyle&, Element*) cons
t; |
252 virtual bool paintSearchFieldCancelButton(RenderObject*, const PaintInfo&, c
onst IntRect&) { return true; } | 252 virtual bool paintSearchFieldCancelButton(LayoutObject*, const PaintInfo&, c
onst IntRect&) { return true; } |
253 | 253 |
254 virtual void adjustSearchFieldDecorationStyle(RenderStyle&, Element*) const; | 254 virtual void adjustSearchFieldDecorationStyle(RenderStyle&, Element*) const; |
255 virtual bool paintSearchFieldDecoration(RenderObject*, const PaintInfo&, con
st IntRect&) { return true; } | 255 virtual bool paintSearchFieldDecoration(LayoutObject*, const PaintInfo&, con
st IntRect&) { return true; } |
256 | 256 |
257 virtual void adjustSearchFieldResultsDecorationStyle(RenderStyle&, Element*)
const; | 257 virtual void adjustSearchFieldResultsDecorationStyle(RenderStyle&, Element*)
const; |
258 virtual bool paintSearchFieldResultsDecoration(RenderObject*, const PaintInf
o&, const IntRect&) { return true; } | 258 virtual bool paintSearchFieldResultsDecoration(LayoutObject*, const PaintInf
o&, const IntRect&) { return true; } |
259 | 259 |
260 virtual bool paintMediaFullscreenButton(RenderObject*, const PaintInfo&, con
st IntRect&) { return true; } | 260 virtual bool paintMediaFullscreenButton(LayoutObject*, const PaintInfo&, con
st IntRect&) { return true; } |
261 virtual bool paintMediaPlayButton(RenderObject*, const PaintInfo&, const Int
Rect&) { return true; } | 261 virtual bool paintMediaPlayButton(LayoutObject*, const PaintInfo&, const Int
Rect&) { return true; } |
262 virtual bool paintMediaOverlayPlayButton(RenderObject*, const PaintInfo&, co
nst IntRect&) { return true; } | 262 virtual bool paintMediaOverlayPlayButton(LayoutObject*, const PaintInfo&, co
nst IntRect&) { return true; } |
263 virtual bool paintMediaMuteButton(RenderObject*, const PaintInfo&, const Int
Rect&) { return true; } | 263 virtual bool paintMediaMuteButton(LayoutObject*, const PaintInfo&, const Int
Rect&) { return true; } |
264 virtual bool paintMediaSliderTrack(RenderObject*, const PaintInfo&, const In
tRect&) { return true; } | 264 virtual bool paintMediaSliderTrack(LayoutObject*, const PaintInfo&, const In
tRect&) { return true; } |
265 virtual bool paintMediaSliderThumb(RenderObject*, const PaintInfo&, const In
tRect&) { return true; } | 265 virtual bool paintMediaSliderThumb(LayoutObject*, const PaintInfo&, const In
tRect&) { return true; } |
266 virtual bool paintMediaVolumeSliderContainer(RenderObject*, const PaintInfo&
, const IntRect&) { return true; } | 266 virtual bool paintMediaVolumeSliderContainer(LayoutObject*, const PaintInfo&
, const IntRect&) { return true; } |
267 virtual bool paintMediaVolumeSliderTrack(RenderObject*, const PaintInfo&, co
nst IntRect&) { return true; } | 267 virtual bool paintMediaVolumeSliderTrack(LayoutObject*, const PaintInfo&, co
nst IntRect&) { return true; } |
268 virtual bool paintMediaVolumeSliderThumb(RenderObject*, const PaintInfo&, co
nst IntRect&) { return true; } | 268 virtual bool paintMediaVolumeSliderThumb(LayoutObject*, const PaintInfo&, co
nst IntRect&) { return true; } |
269 virtual bool paintMediaToggleClosedCaptionsButton(RenderObject*, const Paint
Info&, const IntRect&) { return true; } | 269 virtual bool paintMediaToggleClosedCaptionsButton(LayoutObject*, const Paint
Info&, const IntRect&) { return true; } |
270 virtual bool paintMediaCastButton(RenderObject*, const PaintInfo&, const Int
Rect&) { return true; }; | 270 virtual bool paintMediaCastButton(LayoutObject*, const PaintInfo&, const Int
Rect&) { return true; }; |
271 virtual bool paintMediaControlsBackground(RenderObject*, const PaintInfo&, c
onst IntRect&) { return true; } | 271 virtual bool paintMediaControlsBackground(LayoutObject*, const PaintInfo&, c
onst IntRect&) { return true; } |
272 virtual bool paintMediaCurrentTime(RenderObject*, const PaintInfo&, const In
tRect&) { return true; } | 272 virtual bool paintMediaCurrentTime(LayoutObject*, const PaintInfo&, const In
tRect&) { return true; } |
273 virtual bool paintMediaTimeRemaining(RenderObject*, const PaintInfo&, const
IntRect&) { return true; } | 273 virtual bool paintMediaTimeRemaining(LayoutObject*, const PaintInfo&, const
IntRect&) { return true; } |
274 virtual bool paintMediaFullScreenVolumeSliderTrack(RenderObject*, const Pain
tInfo&, const IntRect&) { return true; } | 274 virtual bool paintMediaFullScreenVolumeSliderTrack(LayoutObject*, const Pain
tInfo&, const IntRect&) { return true; } |
275 virtual bool paintMediaFullScreenVolumeSliderThumb(RenderObject*, const Pain
tInfo&, const IntRect&) { return true; } | 275 virtual bool paintMediaFullScreenVolumeSliderThumb(LayoutObject*, const Pain
tInfo&, const IntRect&) { return true; } |
276 | 276 |
277 virtual bool shouldUseFallbackTheme(const RenderStyle&) const; | 277 virtual bool shouldUseFallbackTheme(const RenderStyle&) const; |
278 void adjustStyleUsingFallbackTheme(RenderStyle&, Element*); | 278 void adjustStyleUsingFallbackTheme(RenderStyle&, Element*); |
279 bool paintUsingFallbackTheme(RenderObject*, const PaintInfo&, const IntRect&
); | 279 bool paintUsingFallbackTheme(LayoutObject*, const PaintInfo&, const IntRect&
); |
280 void adjustCheckboxStyleUsingFallbackTheme(RenderStyle&, Element*) const; | 280 void adjustCheckboxStyleUsingFallbackTheme(RenderStyle&, Element*) const; |
281 bool paintCheckboxUsingFallbackTheme(RenderObject*, const PaintInfo&, const
IntRect&); | 281 bool paintCheckboxUsingFallbackTheme(LayoutObject*, const PaintInfo&, const
IntRect&); |
282 void adjustRadioStyleUsingFallbackTheme(RenderStyle&, Element*) const; | 282 void adjustRadioStyleUsingFallbackTheme(RenderStyle&, Element*) const; |
283 bool paintRadioUsingFallbackTheme(RenderObject*, const PaintInfo&, const Int
Rect&); | 283 bool paintRadioUsingFallbackTheme(LayoutObject*, const PaintInfo&, const Int
Rect&); |
284 | 284 |
285 public: | 285 public: |
286 // Methods for state querying | 286 // Methods for state querying |
287 ControlStates controlStatesForRenderer(const RenderObject*) const; | 287 ControlStates controlStatesForRenderer(const LayoutObject*) const; |
288 bool isActive(const RenderObject*) const; | 288 bool isActive(const LayoutObject*) const; |
289 bool isChecked(const RenderObject*) const; | 289 bool isChecked(const LayoutObject*) const; |
290 bool isIndeterminate(const RenderObject*) const; | 290 bool isIndeterminate(const LayoutObject*) const; |
291 bool isEnabled(const RenderObject*) const; | 291 bool isEnabled(const LayoutObject*) const; |
292 bool isFocused(const RenderObject*) const; | 292 bool isFocused(const LayoutObject*) const; |
293 bool isPressed(const RenderObject*) const; | 293 bool isPressed(const LayoutObject*) const; |
294 bool isSpinUpButtonPartPressed(const RenderObject*) const; | 294 bool isSpinUpButtonPartPressed(const LayoutObject*) const; |
295 bool isHovered(const RenderObject*) const; | 295 bool isHovered(const LayoutObject*) const; |
296 bool isSpinUpButtonPartHovered(const RenderObject*) const; | 296 bool isSpinUpButtonPartHovered(const LayoutObject*) const; |
297 bool isReadOnlyControl(const RenderObject*) const; | 297 bool isReadOnlyControl(const LayoutObject*) const; |
298 | 298 |
299 private: | 299 private: |
300 Color m_customFocusRingColor; | 300 Color m_customFocusRingColor; |
301 bool m_hasCustomFocusRingColor; | 301 bool m_hasCustomFocusRingColor; |
302 | 302 |
303 // This color is expected to be drawn on a semi-transparent overlay, | 303 // This color is expected to be drawn on a semi-transparent overlay, |
304 // making it more transparent than its alpha value indicates. | 304 // making it more transparent than its alpha value indicates. |
305 static const RGBA32 defaultTapHighlightColor = 0x66000000; | 305 static const RGBA32 defaultTapHighlightColor = 0x66000000; |
306 | 306 |
307 static const RGBA32 defaultCompositionBackgroundColor = 0xFFFFDD55; | 307 static const RGBA32 defaultCompositionBackgroundColor = 0xFFFFDD55; |
308 | 308 |
309 #if USE(NEW_THEME) | 309 #if USE(NEW_THEME) |
310 Theme* m_platformTheme; // The platform-specific theme. | 310 Theme* m_platformTheme; // The platform-specific theme. |
311 #endif | 311 #endif |
312 }; | 312 }; |
313 | 313 |
314 } // namespace blink | 314 } // namespace blink |
315 | 315 |
316 #endif // LayoutTheme_h | 316 #endif // LayoutTheme_h |
OLD | NEW |