| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> | 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> |
| 4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 if (!resource || resource.type !== WebInspector.resourceTypes.Image) | 486 if (!resource || resource.type !== WebInspector.resourceTypes.Image) |
| 487 return null; | 487 return null; |
| 488 anchor.removeAttribute("title"); | 488 anchor.removeAttribute("title"); |
| 489 return anchor; | 489 return anchor; |
| 490 } | 490 } |
| 491 return null; | 491 return null; |
| 492 }, | 492 }, |
| 493 | 493 |
| 494 /** | 494 /** |
| 495 * @param {!WebInspector.DOMNode} node | 495 * @param {!WebInspector.DOMNode} node |
| 496 * @param {function()} callback |
| 496 */ | 497 */ |
| 497 _loadDimensionsForNode: function(node, callback) | 498 _loadDimensionsForNode: function(node, callback) |
| 498 { | 499 { |
| 499 if (!node.nodeName() || node.nodeName().toLowerCase() !== "img") { | 500 if (!node.nodeName() || node.nodeName().toLowerCase() !== "img") { |
| 500 callback(); | 501 callback(); |
| 501 return; | 502 return; |
| 502 } | 503 } |
| 503 | 504 |
| 504 node.resolveToObject("", resolvedNode); | 505 node.resolveToObject("", resolvedNode); |
| 505 | 506 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 { | 639 { |
| 639 for (var i = 0; i < this._treeOutlines.length; ++i) { | 640 for (var i = 0; i < this._treeOutlines.length; ++i) { |
| 640 var treeOutline = this._treeOutlines[i]; | 641 var treeOutline = this._treeOutlines[i]; |
| 641 if (treeOutline.selectedDOMNode()) | 642 if (treeOutline.selectedDOMNode()) |
| 642 return treeOutline.selectedDOMNode(); | 643 return treeOutline.selectedDOMNode(); |
| 643 } | 644 } |
| 644 return null; | 645 return null; |
| 645 }, | 646 }, |
| 646 | 647 |
| 647 /** | 648 /** |
| 649 * @param {!WebInspector.DOMNode} node |
| 648 * @param {boolean=} focus | 650 * @param {boolean=} focus |
| 649 */ | 651 */ |
| 650 selectDOMNode: function(node, focus) | 652 selectDOMNode: function(node, focus) |
| 651 { | 653 { |
| 652 for (var i = 0; i < this._treeOutlines.length; ++i) { | 654 for (var i = 0; i < this._treeOutlines.length; ++i) { |
| 653 var treeOutline = this._treeOutlines[i]; | 655 var treeOutline = this._treeOutlines[i]; |
| 654 if (treeOutline.target() === node.target()) | 656 if (treeOutline.target() === node.target()) |
| 655 treeOutline.selectDOMNode(node, focus); | 657 treeOutline.selectDOMNode(node, focus); |
| 656 else | 658 else |
| 657 treeOutline.selectDOMNode(null); | 659 treeOutline.selectDOMNode(null); |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1203 */ | 1205 */ |
| 1204 revealAndSelectNode: function(node) | 1206 revealAndSelectNode: function(node) |
| 1205 { | 1207 { |
| 1206 WebInspector.inspectorView.setCurrentPanel(this); | 1208 WebInspector.inspectorView.setCurrentPanel(this); |
| 1207 node = WebInspector.settings.showUAShadowDOM.get() ? node : this._leaveU
serAgentShadowDOM(node); | 1209 node = WebInspector.settings.showUAShadowDOM.get() ? node : this._leaveU
serAgentShadowDOM(node); |
| 1208 node.highlightForTwoSeconds(); | 1210 node.highlightForTwoSeconds(); |
| 1209 this.selectDOMNode(node, true); | 1211 this.selectDOMNode(node, true); |
| 1210 }, | 1212 }, |
| 1211 | 1213 |
| 1212 /** | 1214 /** |
| 1215 * @param {!Event} event |
| 1213 * @param {!WebInspector.ContextMenu} contextMenu | 1216 * @param {!WebInspector.ContextMenu} contextMenu |
| 1214 * @param {!Object} object | 1217 * @param {!Object} object |
| 1215 */ | 1218 */ |
| 1216 appendApplicableItems: function(event, contextMenu, object) | 1219 appendApplicableItems: function(event, contextMenu, object) |
| 1217 { | 1220 { |
| 1218 var commandCallback; | 1221 var commandCallback; |
| 1219 if (object instanceof WebInspector.RemoteObject) { | 1222 if (object instanceof WebInspector.RemoteObject) { |
| 1220 var remoteObject = /** @type {!WebInspector.RemoteObject} */ (object
); | 1223 var remoteObject = /** @type {!WebInspector.RemoteObject} */ (object
); |
| 1221 if (remoteObject.isNode()) | 1224 if (remoteObject.isNode()) |
| 1222 commandCallback = remoteObject.reveal.bind(remoteObject); | 1225 commandCallback = remoteObject.reveal.bind(remoteObject); |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1468 /** | 1471 /** |
| 1469 * @suppressReceiverCheck | 1472 * @suppressReceiverCheck |
| 1470 * @this {Element} | 1473 * @this {Element} |
| 1471 */ | 1474 */ |
| 1472 function parentElement() | 1475 function parentElement() |
| 1473 { | 1476 { |
| 1474 return this.parentElement; | 1477 return this.parentElement; |
| 1475 } | 1478 } |
| 1476 } | 1479 } |
| 1477 } | 1480 } |
| OLD | NEW |