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

Unified Diff: Source/core/inspector/InspectorDOMAgent.cpp

Issue 23201018: DevTools: add "Jump to Relayout Boundary" context menu item in Elements panel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: renamed output parameters, try run Created 7 years, 3 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 | « Source/core/inspector/InspectorDOMAgent.h ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorDOMAgent.cpp
diff --git a/Source/core/inspector/InspectorDOMAgent.cpp b/Source/core/inspector/InspectorDOMAgent.cpp
index 1270a5e92e0499fe3008d4d1ce8bce611398ffe6..c3993e4bc8528358a7480710155987e57e472651 100644
--- a/Source/core/inspector/InspectorDOMAgent.cpp
+++ b/Source/core/inspector/InspectorDOMAgent.cpp
@@ -1982,6 +1982,22 @@ void InspectorDOMAgent::pushNodeByBackendIdToFrontend(ErrorString* errorString,
}
}
+void InspectorDOMAgent::getRelayoutBoundary(ErrorString* errorString, int nodeId, int* relayoutBoundaryNodeId)
+{
+ Node* node = assertNode(errorString, nodeId);
+ if (!node)
+ return;
+ RenderObject* renderer = node->renderer();
+ if (!renderer) {
+ *errorString = "No renderer for node, perhaps orphan or hidden node";
+ return;
+ }
+ while (renderer && !renderer->isRoot() && !renderer->isRelayoutBoundaryForInspector())
+ renderer = renderer->container();
+ Node* resultNode = renderer ? renderer->generatingNode() : node->ownerDocument();
+ *relayoutBoundaryNodeId = pushNodePathToFrontend(resultNode);
+}
+
PassRefPtr<TypeBuilder::Runtime::RemoteObject> InspectorDOMAgent::resolveNode(Node* node, const String& objectGroup)
{
Document* document = node->isDocumentNode() ? &node->document() : node->ownerDocument();
« no previous file with comments | « Source/core/inspector/InspectorDOMAgent.h ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698