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 a88f4d115fdb2a70fdaf014da78fa7c45c2d4951..e9088ab9a4ffaeddff8801c6ba58988624b67683 100644 |
| --- a/third_party/WebKit/Source/core/inspector/browser_protocol.json |
| +++ b/third_party/WebKit/Source/core/inspector/browser_protocol.json |
| @@ -2999,11 +2999,11 @@ |
| "id": "LayoutTreeNode", |
| "type": "object", |
| "properties": [ |
| - { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The id of the related DOM node matching one from DOM.GetDocument." }, |
| + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The id of the related DOM node in the domNodes array returned by getDocumentSnapshot." }, |
|
pfeldman
2017/05/31 17:56:37
It can't be of type NodeId - NodeId is a node hand
|
| { "name": "boundingBox", "$ref": "DOM.Rect", "description": "The absolute position bounding box." }, |
| { "name": "layoutText", "type": "string", "optional": true, "description": "Contents of the LayoutText if any" }, |
| { "name": "inlineTextNodes", "type": "array", "optional": true, "items": { "$ref": "InlineTextBox" }, "description": "The post layout inline text nodes, if any." }, |
| - { "name": "styleIndex", "type": "integer", "optional": true, "description": "Index into the computedStyles array returned by getLayoutTreeAndStyles." } |
| + { "name": "styleIndex", "type": "integer", "optional": true, "description": "Index into the computedStyles array returned by getDocumentSnapshot." } |
| ], |
| "description": "Details of an element in the DOM tree with a LayoutObject.", |
| "experimental": true |
| @@ -3211,15 +3211,18 @@ |
| "experimental": true |
| }, |
| { |
| - "name": "getLayoutTreeAndStyles", |
| + "name": "getDocumentSnapshot", |
| "parameters": [ |
| - { "name": "computedStyleWhitelist", "type": "array", "items": { "type": "string" }, "description": "Whitelist of computed styles to return." } |
| + { "name": "computedStyleWhitelist", "type": "array", "items": { "type": "string" }, "description": "Whitelist of computed styles to return." }, |
| + { "name": "domDepth", "type": "integer", "optional": true, "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0." }, |
|
pfeldman
2017/05/31 17:56:37
it is called depth everywhere else.
|
| + { "name": "pierce", "type": "boolean", "optional": true, "description": "Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false)." } |
| ], |
| "returns": [ |
| - { "name": "layoutTreeNodes", "type": "array", "items": { "$ref": "LayoutTreeNode" } }, |
| - { "name": "computedStyles", "type": "array", "items": { "$ref": "ComputedStyle" } } |
| + { "name": "domNodes", "type": "array", "items": { "$ref": "DOM.Node" }, "description": "The nodes in the DOM tree. These nodes will also be considered as known to the DOM domain client in the future." }, |
|
pfeldman
2017/05/31 17:56:37
I don't think it makes much sense - we should not
|
| + { "name": "layoutTreeNodes", "type": "array", "items": { "$ref": "LayoutTreeNode" }, "description": "The nodes in the layout tree." }, |
| + { "name": "computedStyles", "type": "array", "items": { "$ref": "ComputedStyle" }, "description": "Whitelisted ComputedStyle properties for each node in the layout tree." } |
| ], |
| - "description": "For the main document and any content documents, return the LayoutTreeNodes and a whitelisted subset of the computed style. It only returns pushed nodes, on way to pull all nodes is to call DOM.getDocument with a depth of -1.", |
| + "description": "Returns a document snapshot, including the DOM tree of the root node up to the given depth in a flattened array, as well as layout and white-listed computed style information for the nodes. Requires that the DOM domain is enabled.", |
| "experimental": true |
| }, |
| { |