Chromium Code Reviews| Index: third_party/WebKit/Source/core/frame/FrameView.cpp |
| diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp |
| index 002fc8d1ec0aae8670224e90f8ff3dbf3c913059..c1bcb113968d0c9ecd9e516aba230b5c90b98274 100644 |
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp |
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp |
| @@ -810,8 +810,11 @@ void FrameView::performPreLayoutTasks() |
| m_viewportScrollableArea = RootFrameViewport::create(visualViewport, *layoutViewport); |
| } |
| - if (!m_scrollAnchor.hasScroller()) |
| - m_scrollAnchor.setScroller(m_viewportScrollableArea ? m_viewportScrollableArea : this); |
| + if (!m_scrollAnchor.hasScroller()) { |
| + m_scrollAnchor.setScroller(m_viewportScrollableArea |
| + ? static_cast<ScrollableArea*>(m_viewportScrollableArea.get()) |
|
skobes
2016/08/13 00:16:11
Can you avoid the cast with a ScrollableArea* temp
bokan
2016/08/13 00:38:21
Replaced with a ScrollableArea* temp
|
| + : this); |
| + } |
| if (shouldPerformScrollAnchoring()) |
| m_scrollAnchor.save(); |
| @@ -4082,6 +4085,11 @@ ScrollableArea* FrameView::layoutViewportScrollableArea() |
| return layoutViewItem.isNull() ? nullptr : layoutViewItem.getScrollableArea(); |
| } |
| +RootFrameViewport* FrameView::getRootFrameViewport() |
| +{ |
| + return m_viewportScrollableArea.get(); |
| +} |
| + |
| LayoutObject* FrameView::viewportLayoutObject() const |
| { |
| if (Document* document = frame().document()) { |