| Index: Source/core/frame/FrameView.h
|
| diff --git a/Source/core/frame/FrameView.h b/Source/core/frame/FrameView.h
|
| index 509b9dc0e099a29c5786010dcf2c1df239ece37d..63452ce0275534df330d8da26a9a2d8c27c452a9 100644
|
| --- a/Source/core/frame/FrameView.h
|
| +++ b/Source/core/frame/FrameView.h
|
| @@ -63,8 +63,8 @@ public:
|
| friend class RenderView;
|
| friend class Internals;
|
|
|
| - static PassRefPtr<FrameView> create(LocalFrame*);
|
| - static PassRefPtr<FrameView> create(LocalFrame*, const IntSize& initialSize);
|
| + static PassRefPtrWillBeRawPtr<FrameView> create(LocalFrame*);
|
| + static PassRefPtrWillBeRawPtr<FrameView> create(LocalFrame*, const IntSize& initialSize);
|
|
|
| virtual ~FrameView();
|
|
|
| @@ -85,7 +85,7 @@ public:
|
|
|
| virtual void setCanHaveScrollbars(bool) OVERRIDE;
|
|
|
| - virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation) OVERRIDE;
|
| + virtual PassRefPtrWillBeRawPtr<Scrollbar> createScrollbar(ScrollbarOrientation) OVERRIDE;
|
|
|
| virtual void setContentsSize(const IntSize&) OVERRIDE;
|
| IntPoint clampOffsetAtScale(const IntPoint& offset, float scale) const;
|
| @@ -225,7 +225,7 @@ public:
|
| void incrementVisuallyNonEmptyPixelCount(const IntSize&);
|
| void setIsVisuallyNonEmpty() { m_isVisuallyNonEmpty = true; }
|
| void enableAutoSizeMode(const IntSize& minSize, const IntSize& maxSize);
|
| - void disableAutoSizeMode() { m_autoSizeInfo.clear(); }
|
| + void disableAutoSizeMode() { disposeAutoSizeInfo(); }
|
|
|
| void forceLayout(bool allowSubtree = false);
|
| void forceLayoutForPagination(const FloatSize& pageSize, const FloatSize& originalPageSize, float maximumShrinkFactor);
|
| @@ -332,6 +332,9 @@ public:
|
| virtual GraphicsLayer* layerForVerticalScrollbar() const OVERRIDE;
|
| virtual GraphicsLayer* layerForScrollCorner() const OVERRIDE;
|
|
|
| + virtual void trace(Visitor*) OVERRIDE;
|
| + void dispose();
|
| +
|
| protected:
|
| virtual bool scrollContentsFastPath(const IntSize& scrollDelta) OVERRIDE;
|
| virtual void scrollContentsSlowPath(const IntRect& updateRect) OVERRIDE;
|
| @@ -417,6 +420,8 @@ private:
|
|
|
| void setLayoutSizeInternal(const IntSize&);
|
|
|
| + void disposeAutoSizeInfo();
|
| +
|
| bool paintInvalidationIsAllowed() const
|
| {
|
| return !isInPerformLayout() || canInvalidatePaintDuringPerformLayout();
|
| @@ -428,18 +433,16 @@ private:
|
| LayoutSize m_size;
|
|
|
| typedef WillBeHeapHashSet<RefPtrWillBeMember<RenderEmbeddedObject> > EmbeddedObjectSet;
|
| - WillBePersistentHeapHashSet<RefPtrWillBeMember<RenderEmbeddedObject> > m_widgetUpdateSet;
|
| + WillBeHeapHashSet<RefPtrWillBeMember<RenderEmbeddedObject> > m_widgetUpdateSet;
|
|
|
| // FIXME: These are just "children" of the FrameView and should be RefPtr<Widget> instead.
|
| - WillBePersistentHeapHashSet<RefPtrWillBeMember<RenderWidget> > m_widgets;
|
| + WillBeHeapHashSet<RefPtrWillBeMember<RenderWidget> > m_widgets;
|
|
|
| - // Oilpan: the use of a persistent back reference 'emulates' the
|
| - // RefPtr-cycle that is kept between the two objects non-Oilpan.
|
| - //
|
| - // That cycle is broken when a LocalFrame is detached by
|
| - // FrameLoader::detachFromParent(), it then clears its
|
| - // FrameView's m_frame reference by calling setView(nullptr).
|
| - RefPtrWillBePersistent<LocalFrame> m_frame;
|
| + // The RefPtr cycle between LocalFrame and FrameView is broken
|
| + // when a LocalFrame is detached by FrameLoader::detachFromParent(),
|
| + // it then clears its FrameView's m_frame reference by calling
|
| + // setView(nullptr).
|
| + RefPtrWillBeMember<LocalFrame> m_frame;
|
|
|
| bool m_doFullPaintInvalidation;
|
|
|
| @@ -482,7 +485,7 @@ private:
|
| bool m_isTrackingPaintInvalidations; // Used for testing.
|
| Vector<IntRect> m_trackedPaintInvalidationRects;
|
|
|
| - RefPtrWillBePersistent<Node> m_nodeToDraw;
|
| + RefPtrWillBeMember<Node> m_nodeToDraw;
|
| PaintBehavior m_paintBehavior;
|
| bool m_isPainting;
|
|
|
| @@ -491,15 +494,15 @@ private:
|
| bool m_isVisuallyNonEmpty;
|
| bool m_firstVisuallyNonEmptyLayoutCallbackPending;
|
|
|
| - RefPtrWillBePersistent<Node> m_maintainScrollPositionAnchor;
|
| + RefPtrWillBeMember<Node> m_maintainScrollPositionAnchor;
|
|
|
| // Renderer to hold our custom scroll corner.
|
| - RawPtrWillBePersistent<RenderScrollbarPart> m_scrollCorner;
|
| + RawPtrWillBeMember<RenderScrollbarPart> m_scrollCorner;
|
|
|
| OwnPtr<ScrollableAreaSet> m_scrollableAreas;
|
| OwnPtr<ResizerAreaSet> m_resizerAreas;
|
| OwnPtr<ViewportConstrainedObjectSet> m_viewportConstrainedObjects;
|
| - OwnPtr<FrameViewAutoSizeInfo> m_autoSizeInfo;
|
| + OwnPtrWillBeMember<FrameViewAutoSizeInfo> m_autoSizeInfo;
|
|
|
| float m_visibleContentScaleFactor;
|
| IntSize m_inputEventsOffsetForEmulation;
|
| @@ -542,6 +545,7 @@ inline void FrameView::incrementVisuallyNonEmptyPixelCount(const IntSize& size)
|
| DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFrameView());
|
|
|
| class AllowPaintInvalidationScope {
|
| + STACK_ALLOCATED();
|
| public:
|
| explicit AllowPaintInvalidationScope(FrameView* view)
|
| : m_view(view)
|
| @@ -560,8 +564,9 @@ public:
|
|
|
| m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue);
|
| }
|
| +
|
| private:
|
| - FrameView* m_view;
|
| + RawPtrWillBeMember<FrameView> m_view;
|
| bool m_originalValue;
|
| };
|
|
|
|
|