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/page/FrameView.h | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) (limited to 'WebCore/page/FrameView.h') diff --git a/WebCore/page/FrameView.h b/WebCore/page/FrameView.h index 16eadc5..1bdcfb3 100644 --- a/WebCore/page/FrameView.h +++ b/WebCore/page/FrameView.h @@ -48,7 +48,7 @@ class String; template class Timer; -class FrameView : public ScrollView, public RefCounted { +class FrameView : public ScrollView { public: friend class RenderView; @@ -93,18 +93,21 @@ public: bool needsFullRepaint() const { return m_doFullRepaint; } #if USE(ACCELERATED_COMPOSITING) - enum CompositingUpdate { NormalCompositingUpdate, ForcedCompositingUpdate }; - void updateCompositingLayers(CompositingUpdate updateType = NormalCompositingUpdate); + void updateCompositingLayers(); // Called when changes to the GraphicsLayer hierarchy have to be synchronized with // content rendered via the normal painting path. void setNeedsOneShotDrawingSynchronization(); #endif + // Only used with accelerated compositing, but outside the #ifdef to make linkage easier. + // Returns true if the sync was completed. + bool syncCompositingStateRecursive(); void didMoveOnscreen(); void willMoveOffscreen(); void resetScrollbars(); + void detachCustomScrollbars(); void clear(); @@ -125,11 +128,6 @@ public: virtual IntRect windowClipRect(bool clipToContents = true) const; IntRect windowClipRectForLayer(const RenderLayer*, bool clipToLayerContents) const; - virtual bool isActive() const; - virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&); - virtual void valueChanged(Scrollbar*); - virtual void getTickmarks(Vector&) const; - virtual IntRect windowResizerRect() const; virtual void scrollRectIntoViewRecursively(const IntRect&); @@ -184,9 +182,13 @@ public: void adjustPageHeight(float* newBottom, float oldTop, float oldBottom, float bottomLimit); - bool lockedToAnchor() { return m_lockedToAnchor; } - void setLockedToAnchor(bool lockedToAnchor) { m_lockedToAnchor = lockedToAnchor; } + void maintainScrollPositionAtAnchor(Node*); + // Methods to convert points and rects between the coordinate space of the renderer, and this view. + virtual IntRect convertFromRenderer(const RenderObject*, const IntRect&) const; + virtual IntRect convertToRenderer(const RenderObject*, const IntRect&) const; + virtual IntPoint convertFromRenderer(const RenderObject*, const IntPoint&) const; + virtual IntPoint convertToRenderer(const RenderObject*, const IntPoint&) const; private: FrameView(Frame*); @@ -208,11 +210,20 @@ private: virtual void repaintContentRectangle(const IntRect&, bool immediate); virtual void contentsResized() { setNeedsLayout(); } - virtual void visibleContentsResized() - { - if (needsLayout()) - layout(); - } + virtual void visibleContentsResized(); + + // Override ScrollView methods to do point conversion via renderers, in order to + // take transforms into account. + virtual IntRect convertToContainingView(const IntRect&) const; + virtual IntRect convertFromContainingView(const IntRect&) const; + virtual IntPoint convertToContainingView(const IntPoint&) const; + virtual IntPoint convertFromContainingView(const IntPoint&) const; + + // ScrollBarClient interface + virtual void valueChanged(Scrollbar*); + virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&); + virtual bool isActive() const; + virtual void getTickmarks(Vector&) const; void deferredRepaintTimerFired(Timer*); void doDeferredRepaints(); @@ -220,6 +231,7 @@ private: double adjustedDeferredRepaintDelay() const; bool updateWidgets(); + void scrollToAnchor(); static double sCurrentPaintTimeStamp; // used for detecting decoded resource thrash in the cache @@ -289,7 +301,7 @@ private: bool m_isVisuallyNonEmpty; bool m_firstVisuallyNonEmptyLayoutCallbackPending; - bool m_lockedToAnchor; + RefPtr m_maintainScrollPositionAnchor; }; } // namespace WebCore -- cgit v1.1