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

Unified Diff: third_party/WebKit/Source/core/inspector/browser_protocol.json

Issue 2096633002: Adds scroll position/scale emulation to DevTools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync, patch in 2169483002 (+ regression test), add DevTools tests. Created 4 years, 5 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/browser_protocol.json
diff --git a/third_party/WebKit/Source/core/inspector/browser_protocol.json b/third_party/WebKit/Source/core/inspector/browser_protocol.json
index 2361dfa252f87ab2e921a67e68b2ebf9b5b30388..dc1e16900907c52cc8981eed224e845c2b9684e9 100644
--- a/third_party/WebKit/Source/core/inspector/browser_protocol.json
+++ b/third_party/WebKit/Source/core/inspector/browser_protocol.json
@@ -722,7 +722,7 @@
"commands": [
{
"name": "setDeviceMetricsOverride",
- "description": "Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media query results).",
+ "description": "Overrides the values of device, screen, and viewport dimensions and positions (including window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media query results).",
"parameters": [
{ "name": "width", "type": "integer", "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override." },
{ "name": "height", "type": "integer", "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override." },
@@ -736,7 +736,9 @@
{ "name": "screenHeight", "type": "integer", "optional": true, "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
{ "name": "positionX", "type": "integer", "optional": true, "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
{ "name": "positionY", "type": "integer", "optional": true, "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
- { "name": "screenOrientation", "$ref": "ScreenOrientation", "optional": true, "description": "Screen orientation override." }
+ { "name": "screenOrientation", "$ref": "ScreenOrientation", "optional": true, "description": "Screen orientation override." },
+ { "name": "visualViewportWidth", "type": "integer", "optional": true, "description": "Override height of visual viewport (pixels, minimum 0, maximum 10000000). Optional, defaults to |width|." },
+ { "name": "visualViewportHeight", "type": "integer", "optional": true, "description": "Override height of visual viewport (pixels, minimum 0, maximum 10000000). Optional, defaults to |height|." }
],
"handlers": ["browser"]
},
@@ -746,6 +748,21 @@
"handlers": ["browser"]
},
{
+ "name": "setScrollAndScaleOverride",
+ "description": "Overrides the scroll position of layout and visual viewport and the visual viewport scale.",
+ "parameters": [
+ { "name": "scrollPositionX", "type": "integer", "optional": true, "description": "Fix horizontal scroll position of layout viewport to an override value (device-independent pixel)." },
+ { "name": "scrollPositionY", "type": "integer", "optional": true, "description": "Fix vertical scroll position of layout viewport to an override value (device-independent pixel)." },
+ { "name": "visualViewportPositionX", "type": "number", "optional": true, "description": "Fix horizontal scroll position of visual viewport to an override value (partial device-independent pixels, relative to |scrollPositionX|)." },
+ { "name": "visualViewportPositionY", "type": "number", "optional": true, "description": "Fix vertical scroll position of visual viewport to an override value (partial device-independent pixels, relative to |scrollPositionY|)." },
+ { "name": "visualViewportScale", "type": "number", "optional": true, "description": "Fix pinch-zoom scale of the visual viewport to an override value (0 < value <= 10.0, 1.0 is default-scale)." }
+ ]
+ },
+ {
+ "name": "clearScrollAndScaleOverride",
+ "description": "Clears any active scroll and scale override."
+ },
+ {
"name": "resetPageScaleFactor",
"description": "Requests that page scale factor is reset to initial values."
},

Powered by Google App Engine
This is Rietveld 408576698