Chromium Code Reviews| 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 dumpInspectorHighlightShape() | |
| 753 { | |
| 754 var shapes = window.internals.inspectorHighlightShape(document); | |
| 755 var parse = JSON.parse(shapes); | |
| 756 var commands = parse.shape; | |
| 757 var text = ""; | |
| 758 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.
| |
| 759 var index = commandsIndex; | |
| 760 text += commands[commandsIndex++] + " "; | |
| 761 if (commands[index] != 'Z') | |
| 762 text += commands[commandsIndex++] + " " + commands[commandsIndex++] + " "; | |
| 763 if (commands[index] == 'C') | |
| 764 text += commands[commandsIndex++] + " " + commands[commandsIndex++] + " " + commands[commandsIndex++] + " " + commands[commandsIndex++] + " "; | |
| 765 else if (commands[index] == 'Q') | |
| 766 text += commands[commandsIndex++] + " " + commands[commandsIndex++] + " "; | |
| 767 } | |
| 768 output(text); | |
| 769 } | |
| OLD | NEW |