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

Unified Diff: Source/core/testing/Internals.cpp

Issue 662603002: [DevTools] Adjust svg elements highlight to the root FrameView origin. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed review comments Created 6 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 | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index be4d82ff0d3d3cd3d7727e812ae1c701088ec303..8994ce183d28c75f2528f28d51520aef925ba392 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -1487,6 +1487,17 @@ void Internals::setInspectorResourcesDataSizeLimits(int maximumResourcesContentS
page->inspectorController().setResourcesDataSizeLimitsFromInternals(maximumResourcesContentSize, maximumSingleResourceContentSize);
}
+String Internals::inspectorHighlightJSON(Node* node, ExceptionState& exceptionState)
+{
+ Page* page = contextDocument()->frame()->page();
+ if (!page) {
+ exceptionState.throwDOMException(InvalidAccessError, "No page can be obtained from the current context document.");
+ return String();
+ }
+ RefPtr<JSONObject> json(page->inspectorController().highlightJSONForNode(node));
+ return json->toPrettyJSONString();
+}
+
bool Internals::hasGrammarMarker(Document* document, int from, int length)
{
ASSERT(document);
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698