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

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

Issue 237313003: CSS shapes support in Web Inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code review and updated to latest master Created 6 years, 8 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: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index d00a9f1ba3b55d0baefd64061a830747ac46493c..31515dab7f6f9f29af4ecc64a5575c135df38a81 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -793,6 +793,17 @@ PassRefPtrWillBeRawPtr<ClientRectList> Internals::inspectorHighlightRects(Docume
return ClientRectList::create(highlight.quads);
}
+String Internals::inspectorHighlightShape(Document *document, ExceptionState& exceptionState)
+{
+ if (!document || !document->page()) {
+ exceptionState.throwDOMException(InvalidAccessError, document ? "The document's Page cannot be retrieved." : "No context document can be obtained.");
+ return String();
+ }
+
+ RefPtr<JSONObject> object = document->page()->inspectorController().buildObjectForShapeOutside();
+ return object ? object->toJSONString(): String();
+}
+
unsigned Internals::markerCountForNode(Node* node, const String& markerType, ExceptionState& exceptionState)
{
if (!node) {

Powered by Google App Engine
This is Rietveld 408576698