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 44f2446632fc84ee790b38e7d3a2133f1022b82c..b3945d6e4b50aed6850ba77ebfcc7475d0485c90 100644 |
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp |
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp |
@@ -158,6 +158,7 @@ FrameView::FrameView(LocalFrame* frame) |
, m_verticalScrollbarMode(ScrollbarAuto) |
, m_horizontalScrollbarLock(false) |
, m_verticalScrollbarLock(false) |
+ , m_visibleContentRectForRecording(nullptr) |
, m_scrollbarsAvoidingResizer(0) |
, m_scrollbarsSuppressed(false) |
, m_inUpdateScrollbars(false) |
@@ -3309,6 +3310,28 @@ IntSize FrameView::contentsSize() const |
return m_contentsSize; |
} |
+IntSize FrameView::visibleContentSizeForRecording() const |
+{ |
+ return visibleContentRectForRecording().size(); |
+} |
+ |
+IntRect FrameView::visibleContentRectForRecording() const |
+{ |
+ if (m_visibleContentRectForRecording) |
+ return *m_visibleContentRectForRecording; |
+ return visibleContentRect(); |
+} |
+ |
+void FrameView::setVisibleContentRectForRecording(const IntRect& rect) |
+{ |
+ m_visibleContentRectForRecording.reset(new IntRect(rect)); |
+} |
+ |
+void FrameView::resetVisibleContentRectForRecording() |
+{ |
+ m_visibleContentRectForRecording.reset(); |
+} |
+ |
IntPoint FrameView::minimumScrollPosition() const |
{ |
return IntPoint(-scrollOrigin().x(), -scrollOrigin().y()); |
@@ -3386,6 +3409,7 @@ void FrameView::setScrollOffset(const DoublePoint& offset, ScrollType scrollType |
if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache()) |
cache->handleScrollPositionChanged(this); |
+ frame().host()->chromeClient().mainFrameScrollOffsetChanged(); |
Sami
2016/08/11 10:09:07
May need to guard this with m_frame->isMainFrame()
Eric Seckler
2016/08/11 11:34:45
You're right, guarding it now. I looked into the d
|
frame().loader().saveScrollState(); |
frame().loader().client()->didChangeScrollOffset(); |