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

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

Issue 2438023003: devtools: Adds Page.getLayoutMetrics. (Closed)
Patch Set: address comments. 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
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..92ee6a51673186c56b83992498355ebbe56aec76 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 relative to the ideal viewport (size at width=device-width)." }
+ ]
}
],
"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": [
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698