Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp

Issue 2702113006: [DevTools] Full-size screenshots in device mode. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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))

Powered by Google App Engine
This is Rietveld 408576698