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 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 | 737 |
738 InspectorTest.dumpInspectorHighlight = function(node, callback) | 738 InspectorTest.dumpInspectorHighlight = function(node, callback) |
739 { | 739 { |
740 node.boxModel(function(boxModel) { | 740 node.boxModel(function(boxModel) { |
741 var rectNames = ["margin", "border", "padding", "content"]; | 741 var rectNames = ["margin", "border", "padding", "content"]; |
742 for (var i = 0; i < rectNames.length; i++) { | 742 for (var i = 0; i < rectNames.length; i++) { |
743 var rect = boxModel[rectNames[i]]; | 743 var rect = boxModel[rectNames[i]]; |
744 InspectorTest.addResult(rectNames[i] + " rect is " + (rect[4] - rect
[0]) + " x " + (rect[5] - rect[1]) + " at (" + rect[0] + ", " + rect[1] + ")"); | 744 InspectorTest.addResult(rectNames[i] + " rect is " + (rect[4] - rect
[0]) + " x " + (rect[5] - rect[1]) + " at (" + rect[0] + ", " + rect[1] + ")"); |
745 } | 745 } |
746 callback(); | 746 callback(); |
| 747 }); |
| 748 } |
| 749 |
| 750 InspectorTest.dumpInspectorHighlightShape = function(node, callback) |
| 751 { |
| 752 node.boxModel(function(shapes) { |
| 753 InspectorTest.addResult(JSON.stringify(shapes.shapeOutside.shape)); |
| 754 callback(); |
747 }); | 755 }); |
748 } | 756 } |
749 | 757 |
750 }; | 758 }; |
OLD | NEW |