diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-06 20:27:06 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-06 20:27:06 +0000 |
commit | c1d30c3b23ee24c2932a94ba19089d404822b4c1 (patch) | |
tree | 581c61373ef275a6321745aa00707a63c78d26c0 /webkit/pending | |
parent | 8c46a646092ee205bf10312e9d5f1eac822a3a59 (diff) | |
download | chromium_src-c1d30c3b23ee24c2932a94ba19089d404822b4c1.zip chromium_src-c1d30c3b23ee24c2932a94ba19089d404822b4c1.tar.gz chromium_src-c1d30c3b23ee24c2932a94ba19089d404822b4c1.tar.bz2 |
port RenderTheme
Review URL: http://codereview.chromium.org/6280
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2895 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/pending')
-rw-r--r-- | webkit/pending/RenderThemeMac.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/webkit/pending/RenderThemeMac.h b/webkit/pending/RenderThemeMac.h index f6fe7fe..19f424a 100644 --- a/webkit/pending/RenderThemeMac.h +++ b/webkit/pending/RenderThemeMac.h @@ -24,6 +24,7 @@ #define RenderThemeMac_h #import "RenderTheme.h" +#import <wtf/HashMap.h> #import <wtf/RetainPtr.h> #ifdef __OBJC__ @@ -44,7 +45,7 @@ public: // A method to obtain the baseline position for a "leaf" control. This will only be used if a baseline // position cannot be determined by examining child content. Checkboxes and radio buttons are examples of // controls that need to do this. - virtual short baselinePosition(const RenderObject*) const; + virtual int baselinePosition(const RenderObject*) const; // A method asking if the control changes its tint when the window has focus or not. virtual bool controlSupportsTints(const RenderObject*) const; @@ -55,16 +56,16 @@ public: virtual void adjustRepaintRect(const RenderObject*, IntRect&); virtual bool isControlStyled(const RenderStyle*, const BorderData&, - const BackgroundLayer&, const Color& backgroundColor) const; - - virtual void paintResizeControl(GraphicsContext*, const IntRect&); + const FillLayer&, const Color& backgroundColor) const; virtual Color platformActiveSelectionBackgroundColor() const; virtual Color platformInactiveSelectionBackgroundColor() const; virtual Color activeListBoxSelectionBackgroundColor() const; + + virtual void platformColorsDidChange(); // System fonts. - virtual void systemFont(int cssValueId, Document*, FontDescription&) const; + virtual void systemFont(int cssValueId, Document* document, FontDescription&) const; virtual int minimumMenuListSize(RenderStyle*) const; @@ -77,6 +78,8 @@ public: virtual bool paintCapsLockIndicator(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); + virtual Color systemColor(int cssValueId) const; + protected: // Methods for each appearance value. virtual bool paintCheckbox(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); @@ -131,12 +134,12 @@ protected: virtual bool paintMediaSliderThumb(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); private: - IntRect inflateRect(const IntRect&, const IntSize&, const int* margins) const; + IntRect inflateRect(const IntRect&, const IntSize&, const int* margins, float zoomLevel = 1.0f) const; // Get the control size based off the font. Used by some of the controls (like buttons). NSControlSize controlSizeForFont(RenderStyle*) const; NSControlSize controlSizeForSystemFont(RenderStyle*) const; - void setControlSize(NSCell*, const IntSize* sizes, const IntSize& minSize); + void setControlSize(NSCell*, const IntSize* sizes, const IntSize& minSize, float zoomLevel = 1.0f); void setSizeFromFont(RenderStyle*, const IntSize* sizes) const; IntSize sizeForFont(RenderStyle*, const IntSize* sizes) const; IntSize sizeForSystemFont(RenderStyle*, const IntSize* sizes) const; @@ -182,7 +185,6 @@ private: NSMenu* searchMenuTemplate() const; NSSliderCell* sliderThumbHorizontal() const; NSSliderCell* sliderThumbVertical() const; - Image* resizeCornerImage() const; private: mutable RetainPtr<NSButtonCell> m_checkbox; @@ -193,11 +195,12 @@ private: mutable RetainPtr<NSMenu> m_searchMenuTemplate; mutable RetainPtr<NSSliderCell> m_sliderThumbHorizontal; mutable RetainPtr<NSSliderCell> m_sliderThumbVertical; - mutable Image* m_resizeCornerImage; bool m_isSliderThumbHorizontalPressed; bool m_isSliderThumbVerticalPressed; + mutable HashMap<int, RGBA32> m_systemColorCache; + RetainPtr<WebCoreRenderThemeNotificationObserver> m_notificationObserver; }; |