Index: Source/core/frame/RootFrameViewport.h |
diff --git a/Source/core/frame/RootFrameViewport.h b/Source/core/frame/RootFrameViewport.h |
index afa481d7f3849147fb07d1db23642f20c0dba534..a192307408168bb8cde248bf33f0fce25d0d805b 100644 |
--- a/Source/core/frame/RootFrameViewport.h |
+++ b/Source/core/frame/RootFrameViewport.h |
@@ -21,13 +21,16 @@ class LayoutRect; |
// APIs that don't make sense on the combined viewport, the call is delegated to |
// the layout viewport. Thus, we could say this class is a decorator on the |
// FrameView scrollable area that adds pinch-zoom semantics to scrolling. |
-class CORE_EXPORT RootFrameViewport final : public ScrollableArea { |
+class CORE_EXPORT RootFrameViewport final : public NoBaseWillBeGarbageCollectedFinalized<RootFrameViewport>, public ScrollableArea { |
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RootFrameViewport); |
public: |
- static PassOwnPtr<RootFrameViewport> create(ScrollableArea& visualViewport, ScrollableArea& layoutViewport) |
+ static PassOwnPtrWillBeRawPtr<RootFrameViewport> create(ScrollableArea& visualViewport, ScrollableArea& layoutViewport) |
{ |
- return adoptPtr(new RootFrameViewport(visualViewport, layoutViewport)); |
+ return adoptPtrWillBeNoop(new RootFrameViewport(visualViewport, layoutViewport)); |
} |
+ DECLARE_VIRTUAL_TRACE(); |
+ |
// ScrollableArea Implementation |
void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavior = ScrollBehaviorInstant) override; |
LayoutRect scrollIntoView( |
@@ -80,11 +83,11 @@ private: |
// animator so use this method to pull updated values when necessary. |
void updateScrollAnimator(); |
- ScrollableArea& visualViewport() const { return m_visualViewport; } |
- ScrollableArea& layoutViewport() const { return m_layoutViewport; } |
+ ScrollableArea& visualViewport() const { ASSERT(m_visualViewport); return *m_visualViewport; } |
+ ScrollableArea& layoutViewport() const { ASSERT(m_layoutViewport); return *m_layoutViewport; } |
- ScrollableArea& m_visualViewport; |
- ScrollableArea& m_layoutViewport; |
+ RawPtrWillBeMember<ScrollableArea> m_visualViewport; |
+ RawPtrWillBeMember<ScrollableArea> m_layoutViewport; |
}; |
} // namespace blink |