Chromium Code Reviews| Index: third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp |
| diff --git a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp |
| index 6919dc60f653438c46489a00bc4165c7a1e3f78e..c7f0dc3449f15820967ce5d0d48bc0f78a2dc8d0 100644 |
| --- a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp |
| +++ b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp |
| @@ -846,7 +846,8 @@ Response InspectorPageAgent::configureOverlay(Maybe<bool> suspended, |
| Response InspectorPageAgent::getLayoutMetrics( |
| std::unique_ptr<protocol::Page::LayoutViewport>* outLayoutViewport, |
| - std::unique_ptr<protocol::Page::VisualViewport>* outVisualViewport) { |
| + std::unique_ptr<protocol::Page::VisualViewport>* outVisualViewport, |
| + std::unique_ptr<protocol::DOM::Rect>* outContentSize) { |
| LocalFrame* mainFrame = m_inspectedFrames->root(); |
| VisualViewport& visualViewport = mainFrame->host()->visualViewport(); |
| @@ -868,6 +869,14 @@ Response InspectorPageAgent::getLayoutMetrics( |
| float scrollbarWidth = frameView->verticalScrollbarWidth() / scale; |
| float scrollbarHeight = frameView->horizontalScrollbarHeight() / scale; |
| + IntSize contentSize = frameView->getScrollableArea()->contentsSize(); |
| + *outContentSize = protocol::DOM::Rect::create() |
|
Eric Seckler
2017/03/13 10:41:28
FWIW, do we actually need this? Could we not get t
dgozman
2017/03/13 15:04:04
We could! But since we already have getLayoutMetri
|
| + .setX(0) |
| + .setY(0) |
| + .setWidth(contentSize.width()) |
| + .setHeight(contentSize.height()) |
| + .build(); |
| + |
| *outVisualViewport = |
| protocol::Page::VisualViewport::create() |
| .setOffsetX(adjustScrollForAbsoluteZoom(visibleRect.x(), pageZoom)) |