| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of the WebKit project. | 2 * This file is part of the WebKit project. |
| 3 * | 3 * |
| 4 * Copyright (C) 2006 Apple Computer, Inc. | 4 * Copyright (C) 2006 Apple Computer, Inc. |
| 5 * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com | 5 * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com |
| 6 * Copyright (C) 2007 Holger Hans Peter Freyther | 6 * Copyright (C) 2007 Holger Hans Peter Freyther |
| 7 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 7 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
| 8 * Copyright (C) 2008, 2009 Google, Inc. | 8 * Copyright (C) 2008, 2009 Google, Inc. |
| 9 * All rights reserved. | 9 * All rights reserved. |
| 10 * | 10 * |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 namespace WebCore { | 33 namespace WebCore { |
| 34 | 34 |
| 35 class RenderProgress; | 35 class RenderProgress; |
| 36 | 36 |
| 37 class RenderThemeChromiumSkia : public RenderTheme { | 37 class RenderThemeChromiumSkia : public RenderTheme { |
| 38 public: | 38 public: |
| 39 RenderThemeChromiumSkia(); | 39 RenderThemeChromiumSkia(); |
| 40 virtual ~RenderThemeChromiumSkia(); | 40 virtual ~RenderThemeChromiumSkia(); |
| 41 | 41 |
| 42 virtual String extraDefaultStyleSheet(); | 42 virtual String extraDefaultStyleSheet() OVERRIDE; |
| 43 virtual String extraQuirksStyleSheet(); | 43 virtual String extraQuirksStyleSheet() OVERRIDE; |
| 44 | 44 |
| 45 virtual Color platformTapHighlightColor() const OVERRIDE | 45 virtual Color platformTapHighlightColor() const OVERRIDE |
| 46 { | 46 { |
| 47 return Color(defaultTapHighlightColor); | 47 return Color(defaultTapHighlightColor); |
| 48 } | 48 } |
| 49 | 49 |
| 50 // A method asking if the theme's controls actually care about redrawing whe
n hovered. | 50 // A method asking if the theme's controls actually care about redrawing whe
n hovered. |
| 51 virtual bool supportsHover(const RenderStyle*) const; | 51 virtual bool supportsHover(const RenderStyle*) const OVERRIDE FINAL; |
| 52 | 52 |
| 53 // A method asking if the theme is able to draw the focus ring. | 53 // A method asking if the theme is able to draw the focus ring. |
| 54 virtual bool supportsFocusRing(const RenderStyle*) const; | 54 virtual bool supportsFocusRing(const RenderStyle*) const OVERRIDE; |
| 55 | 55 |
| 56 virtual bool supportsClosedCaptioning() const OVERRIDE; | 56 virtual bool supportsClosedCaptioning() const OVERRIDE; |
| 57 // The platform selection color. | 57 // The platform selection color. |
| 58 virtual Color platformActiveSelectionBackgroundColor() const; | 58 virtual Color platformActiveSelectionBackgroundColor() const OVERRIDE; |
| 59 virtual Color platformInactiveSelectionBackgroundColor() const; | 59 virtual Color platformInactiveSelectionBackgroundColor() const OVERRIDE; |
| 60 virtual Color platformActiveSelectionForegroundColor() const; | 60 virtual Color platformActiveSelectionForegroundColor() const OVERRIDE; |
| 61 virtual Color platformInactiveSelectionForegroundColor() const; | 61 virtual Color platformInactiveSelectionForegroundColor() const OVERRIDE; |
| 62 virtual Color platformFocusRingColor() const; | 62 virtual Color platformFocusRingColor() const OVERRIDE; |
| 63 | 63 |
| 64 // To change the blink interval, override caretBlinkIntervalInternal instead
of this one so that we may share layout test code an intercepts. | 64 // To change the blink interval, override caretBlinkIntervalInternal instead
of this one so that we may share layout test code an intercepts. |
| 65 virtual double caretBlinkInterval() const; | 65 virtual double caretBlinkInterval() const OVERRIDE; |
| 66 | 66 |
| 67 // System fonts. | 67 // System fonts. |
| 68 virtual void systemFont(CSSValueID, FontDescription&) const; | 68 virtual void systemFont(CSSValueID, FontDescription&) const OVERRIDE; |
| 69 | 69 |
| 70 virtual int minimumMenuListSize(RenderStyle*) const; | 70 virtual int minimumMenuListSize(RenderStyle*) const OVERRIDE; |
| 71 | 71 |
| 72 virtual void setCheckboxSize(RenderStyle*) const; | 72 virtual void setCheckboxSize(RenderStyle*) const OVERRIDE; |
| 73 | 73 |
| 74 virtual void setRadioSize(RenderStyle*) const; | 74 virtual void setRadioSize(RenderStyle*) const OVERRIDE; |
| 75 | 75 |
| 76 virtual void adjustButtonStyle(RenderStyle*, Element*) const; | 76 virtual void adjustButtonStyle(RenderStyle*, Element*) const OVERRIDE; |
| 77 | 77 |
| 78 virtual bool paintTextArea(RenderObject*, const PaintInfo&, const IntRect&); | 78 virtual bool paintTextArea(RenderObject*, const PaintInfo&, const IntRect&)
OVERRIDE; |
| 79 | 79 |
| 80 virtual void adjustSearchFieldStyle(RenderStyle*, Element*) const; | 80 virtual void adjustSearchFieldStyle(RenderStyle*, Element*) const OVERRIDE; |
| 81 virtual bool paintSearchField(RenderObject*, const PaintInfo&, const IntRect
&); | 81 virtual bool paintSearchField(RenderObject*, const PaintInfo&, const IntRect
&) OVERRIDE; |
| 82 | 82 |
| 83 virtual void adjustSearchFieldCancelButtonStyle(RenderStyle*, Element*) cons
t; | 83 virtual void adjustSearchFieldCancelButtonStyle(RenderStyle*, Element*) cons
t OVERRIDE; |
| 84 virtual bool paintSearchFieldCancelButton(RenderObject*, const PaintInfo&, c
onst IntRect&); | 84 virtual bool paintSearchFieldCancelButton(RenderObject*, const PaintInfo&, c
onst IntRect&) OVERRIDE; |
| 85 | 85 |
| 86 virtual void adjustSearchFieldDecorationStyle(RenderStyle*, Element*) const; | 86 virtual void adjustSearchFieldDecorationStyle(RenderStyle*, Element*) const
OVERRIDE; |
| 87 | 87 |
| 88 virtual void adjustSearchFieldResultsDecorationStyle(RenderStyle*, Element*)
const; | 88 virtual void adjustSearchFieldResultsDecorationStyle(RenderStyle*, Element*)
const OVERRIDE; |
| 89 virtual bool paintSearchFieldResultsDecoration(RenderObject*, const PaintInf
o&, const IntRect&); | 89 virtual bool paintSearchFieldResultsDecoration(RenderObject*, const PaintInf
o&, const IntRect&) OVERRIDE; |
| 90 | 90 |
| 91 virtual bool paintMediaSliderTrack(RenderObject*, const PaintInfo&, const In
tRect&); | 91 virtual bool paintMediaSliderTrack(RenderObject*, const PaintInfo&, const In
tRect&) OVERRIDE; |
| 92 virtual bool paintMediaVolumeSliderTrack(RenderObject*, const PaintInfo&, co
nst IntRect&); | 92 virtual bool paintMediaVolumeSliderTrack(RenderObject*, const PaintInfo&, co
nst IntRect&) OVERRIDE; |
| 93 virtual void adjustSliderThumbSize(RenderStyle*, Element*) const; | 93 virtual void adjustSliderThumbSize(RenderStyle*, Element*) const OVERRIDE; |
| 94 virtual bool paintMediaSliderThumb(RenderObject*, const PaintInfo&, const In
tRect&); | 94 virtual bool paintMediaSliderThumb(RenderObject*, const PaintInfo&, const In
tRect&) OVERRIDE; |
| 95 virtual bool paintMediaToggleClosedCaptionsButton(RenderObject*, const Paint
Info&, const IntRect&); | 95 virtual bool paintMediaToggleClosedCaptionsButton(RenderObject*, const Paint
Info&, const IntRect&) OVERRIDE; |
| 96 virtual bool paintMediaVolumeSliderThumb(RenderObject*, const PaintInfo&, co
nst IntRect&); | 96 virtual bool paintMediaVolumeSliderThumb(RenderObject*, const PaintInfo&, co
nst IntRect&) OVERRIDE; |
| 97 virtual bool paintMediaPlayButton(RenderObject*, const PaintInfo&, const Int
Rect&); | 97 virtual bool paintMediaPlayButton(RenderObject*, const PaintInfo&, const Int
Rect&) OVERRIDE; |
| 98 virtual bool paintMediaMuteButton(RenderObject*, const PaintInfo&, const Int
Rect&); | 98 virtual bool paintMediaMuteButton(RenderObject*, const PaintInfo&, const Int
Rect&) OVERRIDE; |
| 99 virtual String formatMediaControlsTime(float time) const; | 99 virtual String formatMediaControlsTime(float time) const OVERRIDE; |
| 100 virtual String formatMediaControlsCurrentTime(float currentTime, float durat
ion) const; | 100 virtual String formatMediaControlsCurrentTime(float currentTime, float durat
ion) const OVERRIDE; |
| 101 virtual bool paintMediaFullscreenButton(RenderObject*, const PaintInfo&, con
st IntRect&); | 101 virtual bool paintMediaFullscreenButton(RenderObject*, const PaintInfo&, con
st IntRect&) OVERRIDE; |
| 102 | 102 |
| 103 // MenuList refers to an unstyled menulist (meaning a menulist without | 103 // MenuList refers to an unstyled menulist (meaning a menulist without |
| 104 // background-color or border set) and MenuListButton refers to a styled | 104 // background-color or border set) and MenuListButton refers to a styled |
| 105 // menulist (a menulist with background-color or border set). They have | 105 // menulist (a menulist with background-color or border set). They have |
| 106 // this distinction to support showing aqua style themes whenever they | 106 // this distinction to support showing aqua style themes whenever they |
| 107 // possibly can, which is something we don't want to replicate. | 107 // possibly can, which is something we don't want to replicate. |
| 108 // | 108 // |
| 109 // In short, we either go down the MenuList code path or the MenuListButton | 109 // In short, we either go down the MenuList code path or the MenuListButton |
| 110 // codepath. We never go down both. And in both cases, they render the | 110 // codepath. We never go down both. And in both cases, they render the |
| 111 // entire menulist. | 111 // entire menulist. |
| 112 virtual void adjustMenuListStyle(RenderStyle*, Element*) const; | 112 virtual void adjustMenuListStyle(RenderStyle*, Element*) const OVERRIDE; |
| 113 virtual void adjustMenuListButtonStyle(RenderStyle*, Element*) const; | 113 virtual void adjustMenuListButtonStyle(RenderStyle*, Element*) const OVERRID
E; |
| 114 virtual bool paintMenuListButton(RenderObject*, const PaintInfo&, const IntR
ect&); | 114 virtual bool paintMenuListButton(RenderObject*, const PaintInfo&, const IntR
ect&) OVERRIDE; |
| 115 | 115 |
| 116 virtual double animationRepeatIntervalForProgressBar(RenderProgress*) const; | 116 virtual double animationRepeatIntervalForProgressBar(RenderProgress*) const
OVERRIDE; |
| 117 virtual double animationDurationForProgressBar(RenderProgress*) const; | 117 virtual double animationDurationForProgressBar(RenderProgress*) const OVERRI
DE; |
| 118 | 118 |
| 119 // These methods define the padding for the MenuList's inner block. | 119 // These methods define the padding for the MenuList's inner block. |
| 120 virtual int popupInternalPaddingLeft(RenderStyle*) const; | 120 virtual int popupInternalPaddingLeft(RenderStyle*) const OVERRIDE; |
| 121 virtual int popupInternalPaddingRight(RenderStyle*) const; | 121 virtual int popupInternalPaddingRight(RenderStyle*) const OVERRIDE; |
| 122 virtual int popupInternalPaddingTop(RenderStyle*) const; | 122 virtual int popupInternalPaddingTop(RenderStyle*) const OVERRIDE; |
| 123 virtual int popupInternalPaddingBottom(RenderStyle*) const; | 123 virtual int popupInternalPaddingBottom(RenderStyle*) const OVERRIDE; |
| 124 | 124 |
| 125 // Media controls | 125 // Media controls |
| 126 virtual bool hasOwnDisabledStateHandlingFor(ControlPart) const { return true
; } | 126 virtual bool hasOwnDisabledStateHandlingFor(ControlPart) const OVERRIDE { re
turn true; } |
| 127 virtual bool usesVerticalVolumeSlider() const { return false; } | 127 virtual bool usesVerticalVolumeSlider() const OVERRIDE { return false; } |
| 128 | 128 |
| 129 // Provide a way to pass the default font size from the Settings object | 129 // Provide a way to pass the default font size from the Settings object |
| 130 // to the render theme. FIXME: http://b/1129186 A cleaner way would be | 130 // to the render theme. FIXME: http://b/1129186 A cleaner way would be |
| 131 // to remove the default font size from this object and have callers | 131 // to remove the default font size from this object and have callers |
| 132 // that need the value to get it directly from the appropriate Settings | 132 // that need the value to get it directly from the appropriate Settings |
| 133 // object. | 133 // object. |
| 134 static void setDefaultFontSize(int); | 134 static void setDefaultFontSize(int); |
| 135 | 135 |
| 136 protected: | 136 protected: |
| 137 virtual double caretBlinkIntervalInternal() const; | 137 virtual double caretBlinkIntervalInternal() const; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 158 int menuListInternalPadding(RenderStyle*, int paddingType) const; | 158 int menuListInternalPadding(RenderStyle*, int paddingType) const; |
| 159 bool paintMediaButtonInternal(GraphicsContext*, const IntRect&, Image*); | 159 bool paintMediaButtonInternal(GraphicsContext*, const IntRect&, Image*); |
| 160 IntRect convertToPaintingRect(RenderObject* inputRenderer, const RenderObjec
t* partRenderer, LayoutRect partRect, const IntRect& localOffset) const; | 160 IntRect convertToPaintingRect(RenderObject* inputRenderer, const RenderObjec
t* partRenderer, LayoutRect partRect, const IntRect& localOffset) const; |
| 161 | 161 |
| 162 static const RGBA32 defaultTapHighlightColor = 0x2e000000; // 18% black. | 162 static const RGBA32 defaultTapHighlightColor = 0x2e000000; // 18% black. |
| 163 }; | 163 }; |
| 164 | 164 |
| 165 } // namespace WebCore | 165 } // namespace WebCore |
| 166 | 166 |
| 167 #endif // RenderThemeChromiumSkia_h | 167 #endif // RenderThemeChromiumSkia_h |
| OLD | NEW |