diff options
author | Ben Murdoch <benm@google.com> | 2009-08-11 17:01:47 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2009-08-11 18:21:02 +0100 |
commit | 0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 (patch) | |
tree | 2943df35f62d885c89d01063cc528dd73b480fea /WebCore/rendering/RenderScrollbar.h | |
parent | 7e7a70bfa49a1122b2597a1e6367d89eb4035eca (diff) | |
download | external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.zip external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.gz external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.bz2 |
Merge in WebKit r47029.
Diffstat (limited to 'WebCore/rendering/RenderScrollbar.h')
-rw-r--r-- | WebCore/rendering/RenderScrollbar.h | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/WebCore/rendering/RenderScrollbar.h b/WebCore/rendering/RenderScrollbar.h index 524c4e8..b3c00ef 100644 --- a/WebCore/rendering/RenderScrollbar.h +++ b/WebCore/rendering/RenderScrollbar.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * Copyright (C) 2008, 2009 Apple Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -33,7 +33,6 @@ namespace WebCore { class RenderBox; -class RenderStyle; class RenderScrollbarPart; class RenderStyle; @@ -46,21 +45,9 @@ public: static PassRefPtr<Scrollbar> createCustomScrollbar(ScrollbarClient*, ScrollbarOrientation, RenderBox*); virtual ~RenderScrollbar(); - virtual void setParent(ScrollView*); - virtual void setEnabled(bool); - - virtual void paint(GraphicsContext*, const IntRect& damageRect); - - virtual void setHoveredPart(ScrollbarPart); - virtual void setPressedPart(ScrollbarPart); - - void updateScrollbarParts(bool destroy = false); - static ScrollbarPart partForStyleResolve(); static RenderScrollbar* scrollbarForStyleResolve(); - virtual void styleChanged(); - RenderBox* owningRenderer() const { return m_owner; } void paintPart(GraphicsContext*, ScrollbarPart, const IntRect&); @@ -72,6 +59,20 @@ public: int minimumThumbLength(); private: + virtual void setParent(ScrollView*); + virtual void setEnabled(bool); + + virtual void paint(GraphicsContext*, const IntRect& damageRect); + + virtual void setHoveredPart(ScrollbarPart); + virtual void setPressedPart(ScrollbarPart); + + virtual void styleChanged(); + + virtual bool isCustomScrollbar() const { return true; } + + void updateScrollbarParts(bool destroy = false); + PassRefPtr<RenderStyle> getScrollbarPseudoStyle(ScrollbarPart, PseudoId); void updateScrollbarPart(ScrollbarPart, bool destroy = false); @@ -79,6 +80,15 @@ private: HashMap<unsigned, RenderScrollbarPart*> m_parts; }; +inline RenderScrollbar* toRenderScrollbar(Scrollbar* scrollbar) +{ + ASSERT(!scrollbar || scrollbar->isCustomScrollbar()); + return static_cast<RenderScrollbar*>(scrollbar); +} + +// This will catch anyone doing an unnecessary cast. +void toRenderScrollbar(const RenderScrollbar*); + } // namespace WebCore #endif // RenderScrollbar_h |