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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorDOMAgent.h

Issue 2633343003: Adds DOM.getFlatDocument which returns an array of nodes (Closed)
Patch Set: Fix headless browser test Created 3 years, 11 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/InspectorDOMAgent.h
diff --git a/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.h b/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.h
index fe54d8c8b6631e3a21c3d9b75b7734f4dfc53d99..0d9d1874e93251a2a158627dc543933dab17be23 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.h
@@ -118,6 +118,10 @@ class CORE_EXPORT InspectorDOMAgent final
Response getDocument(Maybe<int> depth,
Maybe<bool> traverseFrames,
std::unique_ptr<protocol::DOM::Node>* root) override;
+ Response getFlattenedDocument(
+ Maybe<int> depth,
+ Maybe<bool> pierce,
+ std::unique_ptr<protocol::Array<protocol::DOM::Node>>* nodes) override;
Response collectClassNamesFromSubtree(
int nodeId,
std::unique_ptr<protocol::Array<String>>* classNames) override;
@@ -291,17 +295,21 @@ class CORE_EXPORT InspectorDOMAgent final
void invalidateFrameOwnerElement(LocalFrame*);
- std::unique_ptr<protocol::DOM::Node> buildObjectForNode(Node*,
- int depth,
- bool traverseFrames,
- NodeToIdMap*);
+ std::unique_ptr<protocol::DOM::Node> buildObjectForNode(
+ Node*,
+ int depth,
+ bool traverseFrames,
+ NodeToIdMap*,
+ protocol::Array<protocol::DOM::Node>* flattenResult = nullptr);
std::unique_ptr<protocol::Array<String>> buildArrayForElementAttributes(
Element*);
std::unique_ptr<protocol::Array<protocol::DOM::Node>>
- buildArrayForContainerChildren(Node* container,
- int depth,
- bool traverseFrames,
- NodeToIdMap* nodesMap);
+ buildArrayForContainerChildren(
+ Node* container,
+ int depth,
+ bool traverseFrames,
+ NodeToIdMap* nodesMap,
+ protocol::Array<protocol::DOM::Node>* flattenResult);
std::unique_ptr<protocol::Array<protocol::DOM::Node>>
buildArrayForPseudoElements(Element*, NodeToIdMap* nodesMap);
std::unique_ptr<protocol::Array<protocol::DOM::BackendNode>>

Powered by Google App Engine
This is Rietveld 408576698