| Index: Source/web/WebLocalFrameImpl.cpp
|
| diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
|
| index e4e21e5f38fbfce797becce09acd7643582395c1..0afc8a1b7c52df3c1394f37327c510ec2928e0ed 100644
|
| --- a/Source/web/WebLocalFrameImpl.cpp
|
| +++ b/Source/web/WebLocalFrameImpl.cpp
|
| @@ -669,34 +669,38 @@ void WebLocalFrameImpl::setSharedWorkerRepositoryClient(WebSharedWorkerRepositor
|
| m_sharedWorkerRepositoryClient = SharedWorkerRepositoryClientImpl::create(client);
|
| }
|
|
|
| +ScrollableArea* WebLocalFrameImpl::layoutViewportScrollableArea() const
|
| +{
|
| + if (FrameView* view = frameView())
|
| + return view->layoutViewportScrollableArea();
|
| + return nullptr;
|
| +}
|
| +
|
| WebSize WebLocalFrameImpl::scrollOffset() const
|
| {
|
| - FrameView* view = frameView();
|
| - if (!view)
|
| - return WebSize();
|
| - return view->scrollOffset();
|
| + if (ScrollableArea* scrollableArea = layoutViewportScrollableArea())
|
| + return toIntSize(scrollableArea->scrollPosition());
|
| + return WebSize();
|
| }
|
|
|
| WebSize WebLocalFrameImpl::minimumScrollOffset() const
|
| {
|
| - FrameView* view = frameView();
|
| - if (!view)
|
| - return WebSize();
|
| - return toIntSize(view->minimumScrollPosition());
|
| + if (ScrollableArea* scrollableArea = layoutViewportScrollableArea())
|
| + return toIntSize(scrollableArea->minimumScrollPosition());
|
| + return WebSize();
|
| }
|
|
|
| WebSize WebLocalFrameImpl::maximumScrollOffset() const
|
| {
|
| - FrameView* view = frameView();
|
| - if (!view)
|
| - return WebSize();
|
| - return toIntSize(view->maximumScrollPosition());
|
| + if (ScrollableArea* scrollableArea = layoutViewportScrollableArea())
|
| + return toIntSize(scrollableArea->maximumScrollPosition());
|
| + return WebSize();
|
| }
|
|
|
| void WebLocalFrameImpl::setScrollOffset(const WebSize& offset)
|
| {
|
| - if (FrameView* view = frameView())
|
| - view->setScrollPosition(IntPoint(offset.width, offset.height), ProgrammaticScroll);
|
| + if (ScrollableArea* scrollableArea = layoutViewportScrollableArea())
|
| + scrollableArea->setScrollPosition(IntPoint(offset.width, offset.height), ProgrammaticScroll);
|
| }
|
|
|
| WebSize WebLocalFrameImpl::contentsSize() const
|
|
|