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

Unified Diff: LayoutTests/http/tests/inspector/elements-test.js

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: LayoutTests/http/tests/inspector/elements-test.js
diff --git a/LayoutTests/http/tests/inspector/elements-test.js b/LayoutTests/http/tests/inspector/elements-test.js
index b969a49de0767e9b5c8020b108b176cd7e495b48..33ddf3ccf2a50b4004b8fcb8ff10fa84f25af230 100644
--- a/LayoutTests/http/tests/inspector/elements-test.js
+++ b/LayoutTests/http/tests/inspector/elements-test.js
@@ -748,3 +748,22 @@ function dumpInspectorHighlightRects()
output(rectName + " rect is " + rect.width + " x " + rect.height + " at (" + rect.left + ", " + rect.top + ")");
}
}
+
+function dumpInspectorHighlightShape()
+{
+ var shapes = window.internals.inspectorHighlightShape(document);
+ var parse = JSON.parse(shapes);
+ var commands = parse.shape;
+ var text = "";
+ for(var commandsIndex = 0; commandsIndex < commands.length;) {
Bear Travis 2014/04/23 20:46:06 Is this different than just doing text = parse.sha
Habib Virji 2014/04/24 09:53:21 Done.
+ var index = commandsIndex;
+ text += commands[commandsIndex++] + " ";
+ if (commands[index] != 'Z')
+ text += commands[commandsIndex++] + " " + commands[commandsIndex++] + " ";
+ if (commands[index] == 'C')
+ text += commands[commandsIndex++] + " " + commands[commandsIndex++] + " " + commands[commandsIndex++] + " " + commands[commandsIndex++] + " ";
+ else if (commands[index] == 'Q')
+ text += commands[commandsIndex++] + " " + commands[commandsIndex++] + " ";
+ }
+ output(text);
+}

Powered by Google App Engine
This is Rietveld 408576698