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

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: Adress Dmitry's comments + sync. Created 4 years, 3 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 38dfebab2f98000ca18674e969f57d1d97034647..173fc9e3ddf87fdd22f1df280d3418a20420d6ef 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", "description": "Scale to apply to the area (relative to a page scale of 1.0)." }
+ ]
+ },
+ {
+ "name": "resetViewport",
+ "description": "Resets the visible area of the page to the original viewport, undoing any effects of the <code>forceViewport</code> command.",
+ "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