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

Side by Side 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 unified diff | Download patch
OLDNEW
1 var initialize_ElementTest = function() { 1 var initialize_ElementTest = function() {
2 2
3 InspectorTest.findNode = function(matchFunction, callback) 3 InspectorTest.findNode = function(matchFunction, callback)
4 { 4 {
5 callback = InspectorTest.safeWrap(callback); 5 callback = InspectorTest.safeWrap(callback);
6 var result = null; 6 var result = null;
7 var pendingRequests = 0; 7 var pendingRequests = 0;
8 function processChildren(node) 8 function processChildren(node)
9 { 9 {
10 try { 10 try {
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 { 741 {
742 var rectNames = ["margin", "border", "padding", "content"]; 742 var rectNames = ["margin", "border", "padding", "content"];
743 var rects = window.internals.inspectorHighlightRects(document); 743 var rects = window.internals.inspectorHighlightRects(document);
744 for (var i = 0; i < rects.length; i++) 744 for (var i = 0; i < rects.length; i++)
745 { 745 {
746 var rectName = (i < rectNames.length ? rectNames[i] : "untitled"); 746 var rectName = (i < rectNames.length ? rectNames[i] : "untitled");
747 var rect = rects.item(i); 747 var rect = rects.item(i);
748 output(rectName + " rect is " + rect.width + " x " + rect.height + " at (" + rect.left + ", " + rect.top + ")"); 748 output(rectName + " rect is " + rect.width + " x " + rect.height + " at (" + rect.left + ", " + rect.top + ")");
749 } 749 }
750 } 750 }
751
752 function dumpInspectorHighlightCSSShape()
753 {
754 var shapes = window.internals.inspectorHighlightCSSShapes(node);
755 var commands = shapes.shape;
756 for(var commandsIndex = 0; commandsIndex < commands.length; commandsIndex++) {
757 if (commands[commandsIndex] == 'M') {
758 command = "moveTo";
759 point1 = commands[commandsIndex+1];
760 point2 = commands[commandsIndex+2];
761 commandsIndex += 2;
762 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.
763 } else if (commands[commandsIndex] == 'L') {
764 command = "lineTo";
765 point1 = commands[commandsIndex+1];
766 point2 = commands[commandsIndex+2];
767 commandsIndex += 2;
768 output("command: lineTo, shapes point are: "+ point1 + " " + point2 );
769 } else if (commands[commandsIndex] == 'C') {
770 command = "bezierCurveTo";
771 point1 = commands[commandsIndex+1];
772 point2 = commands[commandsIndex+2];
773 point3 = commands[commandsIndex+3];
774 point4 = commands[commandsIndex+4];
775 point5 = commands[commandsIndex+5];
776 point6 = commands[commandsIndex+6];
777 commandsIndex += 6;
778 output("command: bezierCurveTo, shapes point are: "+ point1 + " " + point2 + " " + point3 + " " + point4+ " " + point5+ " "+ point6);
779 } else if (commands[commandsIndex] == 'Q') {
780 command = "quadraticTo";
781 point1 = commands[commandsIndex+1];
782 point2 = commands[commandsIndex+2];
783 point3 = commands[commandsIndex+3];
784 point4 = commands[commandsIndex+4];
785 commandsIndex += 4;
786 output("command: quadraticTo, shapes point are "+ point1 + " " + po int2 + " " + point3 + " " + point4);
787 }
788 }
789 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698