Chromium Code Reviews| 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": [ |