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

Unified Diff: third_party/WebKit/public/web/WebDeviceEmulationParams.h

Issue 2096633002: Adds scroll position/scale emulation to DevTools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/public/web/WebDeviceEmulationParams.h
diff --git a/third_party/WebKit/public/web/WebDeviceEmulationParams.h b/third_party/WebKit/public/web/WebDeviceEmulationParams.h
index 85f9f7c466540104fcd230c409a7f8011188a696..e00189d759badda3fb8c179821c37c4a6f65b484 100644
--- a/third_party/WebKit/public/web/WebDeviceEmulationParams.h
+++ b/third_party/WebKit/public/web/WebDeviceEmulationParams.h
@@ -53,20 +53,39 @@ struct WebDeviceEmulationParams {
// Screen orientation angle, used together with screenOrientationType.
int screenOrientationAngle;
+ // Scroll position of outer viewport (frame).
+ WebPoint scrollPosition;
+
+ // Emulated visible view size. Empty size means default to |viewSize|.
+ WebSize visualViewportSize;
+
+ // Scroll position of inner (visual) viewport.
+ WebFloatPoint visualViewportPosition;
+
+ // Pinch-zoom scale of inner (visual) viewport.
+ double visualViewportScale;
+
+ // Whether browser window should also be resized to |width| and |height|.
+ bool resizeWindow;
+
WebDeviceEmulationParams()
: screenPosition(Desktop)
, deviceScaleFactor(0)
, fitToView(false)
, scale(1)
, screenOrientationType(WebScreenOrientationUndefined)
- , screenOrientationAngle(0) { }
+ , screenOrientationAngle(0)
+ , visualViewportScale(0)
+ , resizeWindow(false) { }
};
inline bool operator==(const WebDeviceEmulationParams& a, const WebDeviceEmulationParams& b)
{
return a.screenPosition == b.screenPosition && a.screenSize == b.screenSize && a.viewPosition == b.viewPosition && a.deviceScaleFactor == b.deviceScaleFactor
&& a.viewSize == b.viewSize && a.fitToView == b.fitToView && a.offset == b.offset && a.scale == b.scale
- && a.screenOrientationType == b.screenOrientationType && a.screenOrientationAngle == b.screenOrientationAngle;
+ && a.screenOrientationType == b.screenOrientationType && a.screenOrientationAngle == b.screenOrientationAngle && a.scrollPosition == b.scrollPosition
+ && a.visualViewportSize == b.visualViewportSize && a.visualViewportPosition == b.visualViewportPosition && a.visualViewportScale == b.visualViewportScale
+ && a.resizeWindow == b.resizeWindow;
}
inline bool operator!=(const WebDeviceEmulationParams& a, const WebDeviceEmulationParams& b)

Powered by Google App Engine
This is Rietveld 408576698