| 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 * Copyright (C) 2009 Kenneth Rohde Christiansen | 10 * Copyright (C) 2009 Kenneth Rohde Christiansen |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 * | 26 * |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #ifndef LayoutThemeDefault_h | 29 #ifndef LayoutThemeDefault_h |
| 30 #define LayoutThemeDefault_h | 30 #define LayoutThemeDefault_h |
| 31 | 31 |
| 32 #include "core/layout/LayoutTheme.h" | 32 #include "core/layout/LayoutTheme.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 class RenderProgress; | 36 class LayoutProgress; |
| 37 | 37 |
| 38 class LayoutThemeDefault : public LayoutTheme { | 38 class LayoutThemeDefault : public LayoutTheme { |
| 39 public: | 39 public: |
| 40 virtual String extraDefaultStyleSheet() override; | 40 virtual String extraDefaultStyleSheet() override; |
| 41 virtual String extraQuirksStyleSheet() override; | 41 virtual String extraQuirksStyleSheet() override; |
| 42 | 42 |
| 43 virtual Color systemColor(CSSValueID) const override; | 43 virtual Color systemColor(CSSValueID) const override; |
| 44 | 44 |
| 45 virtual bool supportsFocusRing(const LayoutStyle&) const override; | 45 virtual bool supportsFocusRing(const LayoutStyle&) const override; |
| 46 | 46 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 // menulist (a menulist with background-color or border set). They have | 136 // menulist (a menulist with background-color or border set). They have |
| 137 // this distinction to support showing aqua style themes whenever they | 137 // this distinction to support showing aqua style themes whenever they |
| 138 // possibly can, which is something we don't want to replicate. | 138 // possibly can, which is something we don't want to replicate. |
| 139 // | 139 // |
| 140 // In short, we either go down the MenuList code path or the MenuListButton | 140 // In short, we either go down the MenuList code path or the MenuListButton |
| 141 // codepath. We never go down both. And in both cases, they render the | 141 // codepath. We never go down both. And in both cases, they render the |
| 142 // entire menulist. | 142 // entire menulist. |
| 143 virtual void adjustMenuListStyle(LayoutStyle&, Element*) const override; | 143 virtual void adjustMenuListStyle(LayoutStyle&, Element*) const override; |
| 144 virtual void adjustMenuListButtonStyle(LayoutStyle&, Element*) const overrid
e; | 144 virtual void adjustMenuListButtonStyle(LayoutStyle&, Element*) const overrid
e; |
| 145 | 145 |
| 146 virtual double animationRepeatIntervalForProgressBar(RenderProgress*) const
override; | 146 virtual double animationRepeatIntervalForProgressBar(LayoutProgress*) const
override; |
| 147 virtual double animationDurationForProgressBar(RenderProgress*) const overri
de; | 147 virtual double animationDurationForProgressBar(LayoutProgress*) const overri
de; |
| 148 | 148 |
| 149 // These methods define the padding for the MenuList's inner block. | 149 // These methods define the padding for the MenuList's inner block. |
| 150 virtual int popupInternalPaddingLeft(const LayoutStyle&) const override; | 150 virtual int popupInternalPaddingLeft(const LayoutStyle&) const override; |
| 151 virtual int popupInternalPaddingRight(const LayoutStyle&) const override; | 151 virtual int popupInternalPaddingRight(const LayoutStyle&) const override; |
| 152 virtual int popupInternalPaddingTop(const LayoutStyle&) const override; | 152 virtual int popupInternalPaddingTop(const LayoutStyle&) const override; |
| 153 virtual int popupInternalPaddingBottom(const LayoutStyle&) const override; | 153 virtual int popupInternalPaddingBottom(const LayoutStyle&) const override; |
| 154 | 154 |
| 155 // Provide a way to pass the default font size from the Settings object | 155 // Provide a way to pass the default font size from the Settings object |
| 156 // to the render theme. FIXME: http://b/1129186 A cleaner way would be | 156 // to the render theme. FIXME: http://b/1129186 A cleaner way would be |
| 157 // to remove the default font size from this object and have callers | 157 // to remove the default font size from this object and have callers |
| 158 // that need the value to get it directly from the appropriate Settings | 158 // that need the value to get it directly from the appropriate Settings |
| 159 // object. | 159 // object. |
| 160 static void setDefaultFontSize(int); | 160 static void setDefaultFontSize(int); |
| 161 | 161 |
| 162 static void setSelectionColors(unsigned activeBackgroundColor, unsigned acti
veForegroundColor, unsigned inactiveBackgroundColor, unsigned inactiveForeground
Color); | 162 static void setSelectionColors(unsigned activeBackgroundColor, unsigned acti
veForegroundColor, unsigned inactiveBackgroundColor, unsigned inactiveForeground
Color); |
| 163 | 163 |
| 164 protected: | 164 protected: |
| 165 LayoutThemeDefault(); | 165 LayoutThemeDefault(); |
| 166 virtual ~LayoutThemeDefault(); | 166 virtual ~LayoutThemeDefault(); |
| 167 virtual bool shouldUseFallbackTheme(const LayoutStyle&) const override; | 167 virtual bool shouldUseFallbackTheme(const LayoutStyle&) const override; |
| 168 virtual int menuListArrowPadding() const; | 168 virtual int menuListArrowPadding() const; |
| 169 | 169 |
| 170 IntRect determinateProgressValueRectFor(RenderProgress*, const IntRect&) con
st; | 170 IntRect determinateProgressValueRectFor(LayoutProgress*, const IntRect&) con
st; |
| 171 IntRect indeterminateProgressValueRectFor(RenderProgress*, const IntRect&) c
onst; | 171 IntRect indeterminateProgressValueRectFor(LayoutProgress*, const IntRect&) c
onst; |
| 172 IntRect progressValueRectFor(RenderProgress*, const IntRect&) const; | 172 IntRect progressValueRectFor(LayoutProgress*, const IntRect&) const; |
| 173 | 173 |
| 174 class DirectionFlippingScope { | 174 class DirectionFlippingScope { |
| 175 public: | 175 public: |
| 176 DirectionFlippingScope(LayoutObject*, const PaintInfo&, const IntRect&); | 176 DirectionFlippingScope(LayoutObject*, const PaintInfo&, const IntRect&); |
| 177 ~DirectionFlippingScope(); | 177 ~DirectionFlippingScope(); |
| 178 | 178 |
| 179 private: | 179 private: |
| 180 bool m_needsFlipping; | 180 bool m_needsFlipping; |
| 181 const PaintInfo& m_paintInfo; | 181 const PaintInfo& m_paintInfo; |
| 182 }; | 182 }; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 193 | 193 |
| 194 static unsigned m_activeSelectionBackgroundColor; | 194 static unsigned m_activeSelectionBackgroundColor; |
| 195 static unsigned m_activeSelectionForegroundColor; | 195 static unsigned m_activeSelectionForegroundColor; |
| 196 static unsigned m_inactiveSelectionBackgroundColor; | 196 static unsigned m_inactiveSelectionBackgroundColor; |
| 197 static unsigned m_inactiveSelectionForegroundColor; | 197 static unsigned m_inactiveSelectionForegroundColor; |
| 198 }; | 198 }; |
| 199 | 199 |
| 200 } // namespace blink | 200 } // namespace blink |
| 201 | 201 |
| 202 #endif // LayoutThemeDefault_h | 202 #endif // LayoutThemeDefault_h |
| OLD | NEW |