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

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: Corrected wrong if statement condition 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..b5aeb6e95b4b65dd765fd33c52b86cab0adbeb3b 100644
--- a/LayoutTests/http/tests/inspector/elements-test.js
+++ b/LayoutTests/http/tests/inspector/elements-test.js
@@ -748,3 +748,42 @@ function dumpInspectorHighlightRects()
output(rectName + " rect is " + rect.width + " x " + rect.height + " at (" + rect.left + ", " + rect.top + ")");
}
}
+
+function dumpInspectorHighlightCSSShape()
+{
+ var shapes = window.internals.inspectorHighlightCSSShapes(node);
+ var commands = shapes.shape;
+ for(var commandsIndex = 0; commandsIndex < commands.length; commandsIndex++) {
+ if (commands[commandsIndex] == 'M') {
+ command = "moveTo";
+ point1 = commands[commandsIndex+1];
+ point2 = commands[commandsIndex+2];
+ commandsIndex += 2;
+ output("command: moveTo, shapes point are: "+ point1 + " " + point2);
Bear Travis 2014/04/17 20:26:45 Is this long form more useful than just the SVG-st
Habib Virji 2014/04/23 16:28:33 Done.
+ } else if (commands[commandsIndex] == 'L') {
+ command = "lineTo";
+ point1 = commands[commandsIndex+1];
+ point2 = commands[commandsIndex+2];
+ commandsIndex += 2;
+ output("command: lineTo, shapes point are: "+ point1 + " " + point2);
+ } else if (commands[commandsIndex] == 'C') {
+ command = "bezierCurveTo";
+ point1 = commands[commandsIndex+1];
+ point2 = commands[commandsIndex+2];
+ point3 = commands[commandsIndex+3];
+ point4 = commands[commandsIndex+4];
+ point5 = commands[commandsIndex+5];
+ point6 = commands[commandsIndex+6];
+ commandsIndex += 6;
+ output("command: bezierCurveTo, shapes point are: "+ point1 + " " + point2 + " " + point3 + " " + point4+ " " + point5+ " "+ point6);
+ } else if (commands[commandsIndex] == 'Q') {
+ command = "quadraticTo";
+ point1 = commands[commandsIndex+1];
+ point2 = commands[commandsIndex+2];
+ point3 = commands[commandsIndex+3];
+ point4 = commands[commandsIndex+4];
+ commandsIndex += 4;
+ output("command: quadraticTo, shapes point are "+ point1 + " " + point2 + " " + point3 + " " + point4);
+ }
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698