| 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 f75a8df4027e28791a8e2ae110383ea6f2912055..61002f2d5695c140144cb16fc3902241fc09c96d 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()
|
| + .setX(0)
|
| + .setY(0)
|
| + .setWidth(contentSize.width())
|
| + .setHeight(contentSize.height())
|
| + .build();
|
| +
|
| *outVisualViewport =
|
| protocol::Page::VisualViewport::create()
|
| .setOffsetX(adjustScrollForAbsoluteZoom(visibleRect.x(), pageZoom))
|
|
|