Chromium Code Reviews| 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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 647 }, | 647 }, |
| 648 | 648 |
| 649 /** | 649 /** |
| 650 * @param {!Element} anchor | 650 * @param {!Element} anchor |
| 651 * @param {!WebInspector.Popover} popover | 651 * @param {!WebInspector.Popover} popover |
| 652 */ | 652 */ |
| 653 _showPopover: function(anchor, popover) | 653 _showPopover: function(anchor, popover) |
| 654 { | 654 { |
| 655 var listItem = anchor.enclosingNodeOrSelfWithNodeName("li"); | 655 var listItem = anchor.enclosingNodeOrSelfWithNodeName("li"); |
| 656 var node = /** @type {!WebInspector.ElementsTreeElement} */ (listItem.tr eeElement).node(); | 656 var node = /** @type {!WebInspector.ElementsTreeElement} */ (listItem.tr eeElement).node(); |
| 657 this._loadDimensionsForNode(node, WebInspector.DOMPresentationUtils.buil dImagePreviewContents.bind(WebInspector.DOMPresentationUtils, node.target(), anc hor.href, true, showPopover)); | 657 var resourceTreeModel = WebInspector.ResourceTreeModel.fromTarget(node.t arget()); |
|
pfeldman
2016/07/13 23:55:57
ditto
eostroukhov-old
2016/07/20 23:46:15
Reverted.
| |
| 658 if (!resourceTreeModel) | |
| 659 return; | |
| 660 this._loadDimensionsForNode(node, WebInspector.DOMPresentationUtils.buil dImagePreviewContents.bind(WebInspector.DOMPresentationUtils, resourceTreeModel, anchor.href, true, showPopover)); | |
| 658 | 661 |
| 659 /** | 662 /** |
| 660 * @param {!Element=} contents | 663 * @param {!Element=} contents |
| 661 */ | 664 */ |
| 662 function showPopover(contents) | 665 function showPopover(contents) |
| 663 { | 666 { |
| 664 if (!contents) | 667 if (!contents) |
| 665 return; | 668 return; |
| 666 popover.setCanShrink(false); | 669 popover.setCanShrink(false); |
| 667 popover.showForAnchor(contents, anchor); | 670 popover.showForAnchor(contents, anchor); |
| (...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1793 if (node) { | 1796 if (node) { |
| 1794 this.treeOutline._selectedDOMNode = node; | 1797 this.treeOutline._selectedDOMNode = node; |
| 1795 this.treeOutline._selectedNodeChanged(); | 1798 this.treeOutline._selectedNodeChanged(); |
| 1796 } | 1799 } |
| 1797 } | 1800 } |
| 1798 return true; | 1801 return true; |
| 1799 }, | 1802 }, |
| 1800 | 1803 |
| 1801 __proto__: TreeElement.prototype | 1804 __proto__: TreeElement.prototype |
| 1802 } | 1805 } |
| OLD | NEW |