OLD | NEW |
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 Loading... |
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
); |
| 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 } |
OLD | NEW |