| 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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 }, | 631 }, |
| 632 | 632 |
| 633 /** | 633 /** |
| 634 * @param {!Element} anchor | 634 * @param {!Element} anchor |
| 635 * @param {!WebInspector.Popover} popover | 635 * @param {!WebInspector.Popover} popover |
| 636 */ | 636 */ |
| 637 _showPopover: function(anchor, popover) | 637 _showPopover: function(anchor, popover) |
| 638 { | 638 { |
| 639 var listItem = anchor.enclosingNodeOrSelfWithNodeName("li"); | 639 var listItem = anchor.enclosingNodeOrSelfWithNodeName("li"); |
| 640 var node = /** @type {!WebInspector.ElementsTreeElement} */ (listItem.tr
eeElement).node(); | 640 var node = /** @type {!WebInspector.ElementsTreeElement} */ (listItem.tr
eeElement).node(); |
| 641 this._loadDimensionsForNode(node, WebInspector.DOMPresentationUtils.buil
dImagePreviewContents.bind(WebInspector.DOMPresentationUtils, node.target(), anc
hor.href, true, showPopover)); | 641 var resourceTreeModel = WebInspector.ResourceTreeModel.fromTarget(node.t
arget()); |
| 642 if (!resourceTreeModel) |
| 643 return; |
| 644 this._loadDimensionsForNode(node, WebInspector.DOMPresentationUtils.buil
dImagePreviewContents.bind(WebInspector.DOMPresentationUtils, resourceTreeModel,
anchor.href, true, showPopover)); |
| 642 | 645 |
| 643 /** | 646 /** |
| 644 * @param {!Element=} contents | 647 * @param {!Element=} contents |
| 645 */ | 648 */ |
| 646 function showPopover(contents) | 649 function showPopover(contents) |
| 647 { | 650 { |
| 648 if (!contents) | 651 if (!contents) |
| 649 return; | 652 return; |
| 650 popover.setCanShrink(false); | 653 popover.setCanShrink(false); |
| 651 popover.showForAnchor(contents, anchor); | 654 popover.showForAnchor(contents, anchor); |
| (...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1782 if (node) { | 1785 if (node) { |
| 1783 this.treeOutline._selectedDOMNode = node; | 1786 this.treeOutline._selectedDOMNode = node; |
| 1784 this.treeOutline._selectedNodeChanged(); | 1787 this.treeOutline._selectedNodeChanged(); |
| 1785 } | 1788 } |
| 1786 } | 1789 } |
| 1787 return true; | 1790 return true; |
| 1788 }, | 1791 }, |
| 1789 | 1792 |
| 1790 __proto__: TreeElement.prototype | 1793 __proto__: TreeElement.prototype |
| 1791 } | 1794 } |
| OLD | NEW |