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

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

Issue 2237433004: Adds DevTools commands for forced viewport override. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync. Created 4 years, 4 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 5344fadbc65e9799d4f3a989d887b7f7e8d49f2c..53a451a005b0615b99b1f0e287b71d06dc2011ac 100644
--- a/third_party/WebKit/Source/core/inspector/browser_protocol.json
+++ b/third_party/WebKit/Source/core/inspector/browser_protocol.json
@@ -726,8 +726,8 @@
{ "name": "mobile", "type": "boolean", "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more." },
{ "name": "fitWindow", "type": "boolean", "description": "Whether a view that exceeds the available browser window area should be scaled down to fit." },
{ "name": "scale", "type": "number", "optional": true, "experimental": true, "description": "Scale to apply to resulting view image. Ignored in |fitWindow| mode." },
- { "name": "offsetX", "type": "number", "optional": true, "experimental": true, "description": "X offset to shift resulting view image by. Ignored in |fitWindow| mode." },
- { "name": "offsetY", "type": "number", "optional": true, "experimental": true, "description": "Y offset to shift resulting view image by. Ignored in |fitWindow| mode." },
+ { "name": "offsetX", "type": "number", "optional": true, "deprecated": true, "experimental": true, "description": "Not used." },
+ { "name": "offsetY", "type": "number", "optional": true, "deprecated": true, "experimental": true, "description": "Not used." },
{ "name": "screenWidth", "type": "integer", "optional": true, "experimental": true, "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
{ "name": "screenHeight", "type": "integer", "optional": true, "experimental": true, "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
{ "name": "positionX", "type": "integer", "optional": true, "experimental": true, "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
@@ -742,6 +742,21 @@
"handlers": ["browser"]
},
{
+ "name": "forceViewport",
+ "description": "Overrides the visible area of the page. The change is hidden from the page, i.e. the observable scroll position and page scale does not change. In effect, the command moves the specified area of the page into the top-left corner of the frame.",
+ "experimental": true,
+ "parameters": [
+ { "name": "x", "type": "number", "description": "X coordinate of top-left corner of the area (CSS pixels)." },
+ { "name": "y", "type": "number", "description": "Y coordinate of top-left corner of the area (CSS pixels)." },
+ { "name": "scale", "type": "number", "optional": true, "description": "Scale to apply to the area (relative to a page scale of 1.0). Defaults to 1.0." }
dgozman 2016/08/29 20:45:36 Do we need it to be optional? I think clients will
Eric Seckler 2016/09/12 13:58:00 Sure, we can make it required. Done.
+ ]
+ },
+ {
+ "name": "resetViewport",
+ "description": "Resets the visible area of the page to the original viewport, undoing any effects of the forceViewport command.",
dgozman 2016/08/29 20:45:36 nit: <code>forceViewport</code>
Eric Seckler 2016/09/12 13:58:00 Done.
+ "experimental": true
+ },
+ {
"name": "resetPageScaleFactor",
"experimental": true,
"description": "Requests that page scale factor is reset to initial values."

Powered by Google App Engine
This is Rietveld 408576698