From 0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Tue, 11 Aug 2009 17:01:47 +0100 Subject: Merge in WebKit r47029. --- WebCore/rendering/RenderScrollbar.h | 38 +++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) (limited to 'WebCore/rendering/RenderScrollbar.h') 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 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 getScrollbarPseudoStyle(ScrollbarPart, PseudoId); void updateScrollbarPart(ScrollbarPart, bool destroy = false); @@ -79,6 +80,15 @@ private: HashMap m_parts; }; +inline RenderScrollbar* toRenderScrollbar(Scrollbar* scrollbar) +{ + ASSERT(!scrollbar || scrollbar->isCustomScrollbar()); + return static_cast(scrollbar); +} + +// This will catch anyone doing an unnecessary cast. +void toRenderScrollbar(const RenderScrollbar*); + } // namespace WebCore #endif // RenderScrollbar_h -- cgit v1.1