diff options
Diffstat (limited to 'WebCore/platform/ScrollView.h')
-rw-r--r-- | WebCore/platform/ScrollView.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/WebCore/platform/ScrollView.h b/WebCore/platform/ScrollView.h index 9847350..88e2564 100644 --- a/WebCore/platform/ScrollView.h +++ b/WebCore/platform/ScrollView.h @@ -55,7 +55,6 @@ class Scrollbar; class ScrollView : public Widget, public ScrollbarClient { public: - ScrollView(); ~ScrollView(); // ScrollbarClient method. FrameView overrides the other two. @@ -69,8 +68,8 @@ public: virtual IntRect windowClipRect(bool clipToContents = true) const = 0; // Methods for child manipulation and inspection. - const HashSet<Widget*>* children() const { return &m_children; } - void addChild(Widget*); + const HashSet<RefPtr<Widget> >* children() const { return &m_children; } + void addChild(PassRefPtr<Widget>); void removeChild(Widget*); // If the scroll view does not use a native widget, then it will have cross-platform Scrollbars. These methods @@ -181,7 +180,7 @@ public: virtual void setFrameRect(const IntRect&); // For platforms that need to hit test scrollbars from within the engine's event handlers (like Win32). - Scrollbar* scrollbarUnderMouse(const PlatformMouseEvent& mouseEvent); + Scrollbar* scrollbarAtPoint(const IntPoint& windowPoint); // This method exists for scrollviews that need to handle wheel events manually. // On Mac the underlying NSScrollView just does the scrolling, but on other platforms @@ -214,13 +213,22 @@ public: virtual void hide(); virtual void setParentVisible(bool); - // Pan scrolling methods. + // Pan scrolling. + static const int noPanScrollRadius = 15; void addPanScrollIcon(const IntPoint&); void removePanScrollIcon(); + virtual bool isPointInScrollbarCorner(const IntPoint&); virtual bool scrollbarCornerPresent() const; + virtual IntRect convertFromScrollbarToContainingView(const Scrollbar*, const IntRect&) const; + virtual IntRect convertFromContainingViewToScrollbar(const Scrollbar*, const IntRect&) const; + virtual IntPoint convertFromScrollbarToContainingView(const Scrollbar*, const IntPoint&) const; + virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, const IntPoint&) const; + protected: + ScrollView(); + virtual void repaintContentRectangle(const IntRect&, bool now = false); virtual void paintContents(GraphicsContext*, const IntRect& damageRect) = 0; @@ -238,7 +246,7 @@ private: ScrollbarMode m_verticalScrollbarMode; bool m_prohibitsScrolling; - HashSet<Widget*> m_children; + HashSet<RefPtr<Widget> > m_children; // This bool is unused on Mac OS because we directly ask the platform widget // whether it is safe to blit on scroll. |