Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(815)

Unified Diff: Source/core/frame/RootFrameViewport.h

Issue 1215973002: Oilpan: improve ScrollableArea handling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review-induced improvements Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/PinchViewport.cpp ('k') | Source/core/frame/RootFrameViewport.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/core/frame/PinchViewport.cpp ('k') | Source/core/frame/RootFrameViewport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698