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

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

Issue 2438023003: devtools: Adds Page.getLayoutMetrics. (Closed)
Patch Set: refactor commands to Page.getLayoutMetrics. Created 4 years, 2 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 0e8e4d9ee34430b6f0f4c75fc9e66956f691d284..1ea8ab4ea7f889cf75eaf2d1bb29ca84d49cbd56 100644
--- a/third_party/WebKit/Source/core/inspector/browser_protocol.json
+++ b/third_party/WebKit/Source/core/inspector/browser_protocol.json
@@ -183,6 +183,33 @@
"type": "string",
"enum": ["Proceed", "Cancel", "CancelAndIgnore"],
"experimental": true
+ },
+ {
+ "id": "LayoutViewport",
+ "type": "object",
+ "description": "Layout viewport position and dimensions.",
+ "experimental": true,
+ "properties": [
+ { "name": "pageX", "type": "integer", "description": "Horizontal offset relative to the document (CSS pixels)." },
+ { "name": "pageY", "type": "integer", "description": "Vertical offset relative to the document (CSS pixels)." },
+ { "name": "clientWidth", "type": "integer", "description": "Width (CSS pixels), excludes scrollbar if present." },
+ { "name": "clientHeight", "type": "integer", "description": "Height (CSS pixels), excludes scrollbar if present." }
+ ]
+ },
+ {
+ "id": "VisualViewport",
+ "type": "object",
+ "description": "Visual viewport position, dimensions, and scale.",
+ "experimental": true,
+ "properties": [
+ { "name": "offsetX", "type": "number", "description": "Horizontal offset relative to the layout viewport (CSS pixels)." },
+ { "name": "offsetY", "type": "number", "description": "Vertical offset relative to the layout viewport (CSS pixels)." },
+ { "name": "pageX", "type": "number", "description": "Horizontal offset relative to the document (CSS pixels)." },
+ { "name": "pageY", "type": "number", "description": "Vertical offset relative to the document (CSS pixels)." },
+ { "name": "clientWidth", "type": "number", "description": "Width (CSS pixels), excludes scrollbar if present." },
+ { "name": "clientHeight", "type": "number", "description": "Height (CSS pixels), excludes scrollbar if present." },
+ { "name": "scale", "type": "number", "description": "Scale (as used in viewport <meta> tag)." }
dgozman 2016/10/25 18:14:55 This one is not necessarily from <meta> tag: user'
Eric Seckler 2016/10/26 12:30:45 Hehe, okay, that's not what I meant :) I was think
+ ]
}
],
"commands": [
@@ -509,6 +536,15 @@
"description": "Should be sent in response to a navigationRequested or a redirectRequested event, telling the browser how to handle the navigation.",
"experimental": true,
"handlers": ["browser"]
+ },
+ {
+ "name": "getLayoutMetrics",
+ "description": "Returns metrics relating to the layouting of the page, such as viewport bounds/scale.",
+ "experimental": true,
+ "returns": [
+ { "name": "layoutViewport", "$ref": "LayoutViewport", "description": "Metrics relating to the layout viewport." },
+ { "name": "visualViewport", "$ref": "VisualViewport", "description": "Metrics relating to the visual viewport." }
+ ]
}
],
"events": [

Powered by Google App Engine
This is Rietveld 408576698