diff options
author | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-23 02:54:01 +0000 |
---|---|---|
committer | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-23 02:54:01 +0000 |
commit | 99ab978f453538829f278af5477957683677ab24 (patch) | |
tree | 5d39b56caef4a73c1f122a4486b551f269e8527b /webkit/port/rendering/RenderThemeWin.h | |
parent | 6d15caab249096abecd889bf68c3c51ba2bab785 (diff) | |
download | chromium_src-99ab978f453538829f278af5477957683677ab24.zip chromium_src-99ab978f453538829f278af5477957683677ab24.tar.gz chromium_src-99ab978f453538829f278af5477957683677ab24.tar.bz2 |
Try to bring a bit more structure to RenderThemeWin. This will help as Mac and Linux try to match it.
- Remove trailing whitespace and extra newlines.
- Reorder some declarations in the header to
better group similar methods.
- Drop unimplemented declaration of addIntrinsicMargins.
- Implement the empty RenderThemeWin constructor and
destructor in the header file.
- Reorder all implementations to match declaration order.
- Move the enums into the anonymous namespace.
- Don't indent in an anonymous namespace.
- Move all internal static helpers together.
Review URL: http://codereview.chromium.org/11596
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5911 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port/rendering/RenderThemeWin.h')
-rw-r--r-- | webkit/port/rendering/RenderThemeWin.h | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/webkit/port/rendering/RenderThemeWin.h b/webkit/port/rendering/RenderThemeWin.h index 5304677..c1bf7e8 100644 --- a/webkit/port/rendering/RenderThemeWin.h +++ b/webkit/port/rendering/RenderThemeWin.h @@ -43,8 +43,8 @@ struct ThemeData { class RenderThemeWin : public RenderTheme { public: - RenderThemeWin(); - ~RenderThemeWin(); + RenderThemeWin() { } + ~RenderThemeWin() { } // A method asking if the theme's controls actually care about redrawing when hovered. virtual bool supportsHover(const RenderStyle*) const { return true; } @@ -80,14 +80,16 @@ public: virtual bool paintTextArea(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) { return paintTextField(o, i, r); } - // MenuList refers to an unstyled menulist (meaning a menulist without - // background-color or border set) and MenuListButton refers to a styled - // menulist (a menulist with background-color or border set). They have - // this distinction to support showing aqua style themes whenever they + virtual bool paintSearchField(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); + + // MenuList refers to an unstyled menulist (meaning a menulist without + // background-color or border set) and MenuListButton refers to a styled + // menulist (a menulist with background-color or border set). They have + // this distinction to support showing aqua style themes whenever they // possibly can, which is something we don't want to replicate. // // In short, we either go down the MenuList code path or the MenuListButton - // codepath. We never go down both. And in both cases, they render the + // codepath. We never go down both. And in both cases, they render the // entire menulist. virtual void adjustMenuListStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const; virtual bool paintMenuList(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); @@ -104,14 +106,12 @@ public: virtual void adjustSliderThumbSize(RenderObject*) const; - virtual void adjustSearchFieldCancelButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const; virtual void adjustSearchFieldStyle(CSSStyleSelector*, RenderStyle*, Element*) const; + virtual void adjustSearchFieldCancelButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const; virtual void adjustSearchFieldDecorationStyle(CSSStyleSelector*, RenderStyle*, Element*) const; virtual void adjustSearchFieldResultsDecorationStyle(CSSStyleSelector*, RenderStyle*, Element*) const; virtual void adjustSearchFieldResultsButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const; - virtual bool paintSearchField(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); - // Provide a way to pass the default font size from the Settings object to // the render theme. TODO(tc): http://b/1129186 A cleaner way would be to // remove the default font size from this object and have callers that need @@ -119,8 +119,6 @@ public: static void setDefaultFontSize(int); private: - void addIntrinsicMargins(RenderStyle*) const; - unsigned determineState(RenderObject*); unsigned determineClassicState(RenderObject*); @@ -129,7 +127,7 @@ private: bool paintTextFieldInternal(RenderObject*, const RenderObject::PaintInfo&, const IntRect&, bool); void setButtonPadding(RenderStyle* style) const; - + // Gets the minimal x button padding according to the current theme. void getMinimalButtonPadding(Length* minXPadding) const; |