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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // whether the CSS border/background should also be painted. | 75 // whether the CSS border/background should also be painted. |
76 bool paint(RenderObject*, const PaintInfo&, const IntRect&); | 76 bool paint(RenderObject*, const PaintInfo&, const IntRect&); |
77 bool paintBorderOnly(RenderObject*, const PaintInfo&, const IntRect&); | 77 bool paintBorderOnly(RenderObject*, const PaintInfo&, const IntRect&); |
78 bool paintDecorations(RenderObject*, const PaintInfo&, const IntRect&); | 78 bool paintDecorations(RenderObject*, const PaintInfo&, const IntRect&); |
79 | 79 |
80 // The remaining methods should be implemented by the platform-specific port
ion of the theme, e.g., | 80 // The remaining methods should be implemented by the platform-specific port
ion of the theme, e.g., |
81 // RenderThemeMac.cpp for Mac OS X. | 81 // RenderThemeMac.cpp for Mac OS X. |
82 | 82 |
83 // These methods return the theme's extra style sheets rules, to let each pl
atform | 83 // These methods return the theme's extra style sheets rules, to let each pl
atform |
84 // adjust the default CSS rules in html.css, quirks.css or mediaControls.css
. | 84 // adjust the default CSS rules in html.css, quirks.css or mediaControls.css
. |
85 virtual String extraDefaultStyleSheet() { return String(); } | 85 virtual String extraDefaultStyleSheet(); |
86 virtual String extraQuirksStyleSheet() { return String(); } | 86 virtual String extraQuirksStyleSheet() { return String(); } |
87 virtual String extraMediaControlsStyleSheet() { return String(); } | 87 virtual String extraMediaControlsStyleSheet() { return String(); } |
88 virtual String extraFullScreenStyleSheet() { return String(); } | 88 virtual String extraFullScreenStyleSheet() { return String(); } |
89 | 89 |
90 // A method to obtain the baseline position for a "leaf" control. This will
only be used if a baseline | 90 // A method to obtain the baseline position for a "leaf" control. This will
only be used if a baseline |
91 // position cannot be determined by examining child content. Checkboxes and
radio buttons are examples of | 91 // position cannot be determined by examining child content. Checkboxes and
radio buttons are examples of |
92 // controls that need to do this. | 92 // controls that need to do this. |
93 virtual int baselinePosition(const RenderObject*) const; | 93 virtual int baselinePosition(const RenderObject*) const; |
94 | 94 |
95 // A method for asking if a control is a container or not. Leaf controls ha
ve to have some special behavior (like | 95 // A method for asking if a control is a container or not. Leaf controls ha
ve to have some special behavior (like |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 virtual bool usesMediaControlVolumeSlider() const { return true; } | 189 virtual bool usesMediaControlVolumeSlider() const { return true; } |
190 virtual bool usesVerticalVolumeSlider() const { return true; } | 190 virtual bool usesVerticalVolumeSlider() const { return true; } |
191 virtual double mediaControlsFadeInDuration() { return 0.1; } | 191 virtual double mediaControlsFadeInDuration() { return 0.1; } |
192 virtual double mediaControlsFadeOutDuration() { return 0.3; } | 192 virtual double mediaControlsFadeOutDuration() { return 0.3; } |
193 virtual String formatMediaControlsTime(float time) const; | 193 virtual String formatMediaControlsTime(float time) const; |
194 virtual String formatMediaControlsCurrentTime(float currentTime, float durat
ion) const; | 194 virtual String formatMediaControlsCurrentTime(float currentTime, float durat
ion) const; |
195 | 195 |
196 virtual IntSize meterSizeForBounds(const RenderMeter*, const IntRect&) const
; | 196 virtual IntSize meterSizeForBounds(const RenderMeter*, const IntRect&) const
; |
197 virtual bool supportsMeter(ControlPart) const; | 197 virtual bool supportsMeter(ControlPart) const; |
198 | 198 |
199 #if ENABLE(DATALIST_ELEMENT) | |
200 // Returns the threshold distance for snapping to a slider tick mark. | 199 // Returns the threshold distance for snapping to a slider tick mark. |
201 virtual LayoutUnit sliderTickSnappingThreshold() const; | 200 virtual LayoutUnit sliderTickSnappingThreshold() const; |
202 // Returns size of one slider tick mark for a horizontal track. | 201 // Returns size of one slider tick mark for a horizontal track. |
203 // For vertical tracks we rotate it and use it. i.e. Width is always length
along the track. | 202 // For vertical tracks we rotate it and use it. i.e. Width is always length
along the track. |
204 virtual IntSize sliderTickSize() const = 0; | 203 virtual IntSize sliderTickSize() const = 0; |
205 // Returns the distance of slider tick origin from the slider track center. | 204 // Returns the distance of slider tick origin from the slider track center. |
206 virtual int sliderTickOffsetFromTrackCenter() const = 0; | 205 virtual int sliderTickOffsetFromTrackCenter() const = 0; |
207 void paintSliderTicks(RenderObject*, const PaintInfo&, const IntRect&); | 206 void paintSliderTicks(RenderObject*, const PaintInfo&, const IntRect&); |
208 #endif | |
209 | 207 |
210 virtual bool shouldShowPlaceholderWhenFocused() const { return false; } | 208 virtual bool shouldShowPlaceholderWhenFocused() const { return false; } |
211 virtual bool shouldHaveSpinButton(HTMLInputElement*) const; | 209 virtual bool shouldHaveSpinButton(HTMLInputElement*) const; |
212 | 210 |
213 // Functions for <select> elements. | 211 // Functions for <select> elements. |
214 virtual bool delegatesMenuListRendering() const { return false; } | 212 virtual bool delegatesMenuListRendering() const { return false; } |
215 virtual bool popsMenuByArrowKeys() const { return false; } | 213 virtual bool popsMenuByArrowKeys() const { return false; } |
216 virtual bool popsMenuBySpaceOrReturn() const { return false; } | 214 virtual bool popsMenuBySpaceOrReturn() const { return false; } |
217 | 215 |
218 virtual String fileListDefaultLabel(bool multipleFilesAllowed) const; | 216 virtual String fileListDefaultLabel(bool multipleFilesAllowed) const; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 static const RGBA32 defaultTapHighlightColor = 0x66000000; | 343 static const RGBA32 defaultTapHighlightColor = 0x66000000; |
346 | 344 |
347 #if USE(NEW_THEME) | 345 #if USE(NEW_THEME) |
348 Theme* m_theme; // The platform-specific theme. | 346 Theme* m_theme; // The platform-specific theme. |
349 #endif | 347 #endif |
350 }; | 348 }; |
351 | 349 |
352 } // namespace WebCore | 350 } // namespace WebCore |
353 | 351 |
354 #endif // RenderTheme_h | 352 #endif // RenderTheme_h |
OLD | NEW |