diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/rendering/RenderTheme.h')
-rw-r--r-- | src/3rdparty/webkit/WebCore/rendering/RenderTheme.h | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderTheme.h b/src/3rdparty/webkit/WebCore/rendering/RenderTheme.h index bc81d4d..a1519ce 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderTheme.h +++ b/src/3rdparty/webkit/WebCore/rendering/RenderTheme.h @@ -23,13 +23,16 @@ #ifndef RenderTheme_h #define RenderTheme_h -#include "RenderObject.h" #if USE(NEW_THEME) #include "Theme.h" #else #include "ThemeTypes.h" #endif +#include "RenderObject.h" +#include "RenderTheme.h" #include "ScrollTypes.h" +#include <wtf/PassRefPtr.h> +#include <wtf/RefCounted.h> namespace WebCore { @@ -38,11 +41,24 @@ class PopupMenu; class RenderMenuList; class CSSStyleSheet; -class RenderTheme { -public: +class RenderTheme : public RefCounted<RenderTheme> { +protected: RenderTheme(); + +public: virtual ~RenderTheme() { } + // This function is to be implemented in your platform-specific theme implementation to hand back the + // appropriate platform theme. When the theme is needed in non-page dependent code, a default theme is + // used as fallback, which is returned for a nulled page, so the platform code needs to account for this. + static PassRefPtr<RenderTheme> themeForPage(Page* page); + + // When the theme is needed in non-page dependent code, the defaultTheme() is used as fallback. + static inline PassRefPtr<RenderTheme> defaultTheme() + { + return themeForPage(0); + }; + // This method is called whenever style has been computed for an element and the appearance // property has been set to a value other than "none". The theme should map in all of the appropriate // metrics and defaults given the contents of the style. This includes sophisticated operations like @@ -121,6 +137,8 @@ public: virtual Color platformActiveTextSearchHighlightColor() const; virtual Color platformInactiveTextSearchHighlightColor() const; + virtual Color focusRingColor() const; + virtual void platformColorsDidChange(); virtual double caretBlinkInterval() const { return 0.5; } @@ -257,10 +275,6 @@ private: #endif }; -// Function to obtain the theme. This is implemented in your platform-specific theme implementation to hand -// back the appropriate platform theme. -RenderTheme* theme(); - } // namespace WebCore #endif // RenderTheme_h |