| 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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 }, | 514 }, |
| 515 | 515 |
| 516 /** | 516 /** |
| 517 * @param {!Element} anchor | 517 * @param {!Element} anchor |
| 518 * @param {!WebInspector.Popover} popover | 518 * @param {!WebInspector.Popover} popover |
| 519 */ | 519 */ |
| 520 _showPopover: function(anchor, popover) | 520 _showPopover: function(anchor, popover) |
| 521 { | 521 { |
| 522 var listItem = anchor.enclosingNodeOrSelfWithNodeName("li"); | 522 var listItem = anchor.enclosingNodeOrSelfWithNodeName("li"); |
| 523 // We get here for CSS properties, too. | 523 // We get here for CSS properties, too. |
| 524 if (listItem && listItem.treeElement && listItem.treeElement.treeOutline
instanceof WebInspector.ElementsTreeOutline) { | 524 if (listItem && listItem.treeElement && listItem.treeElement instanceof
WebInspector.ElementsTreeElement) { |
| 525 var node = /** @type {!WebInspector.DOMNode} */ (listItem.treeElemen
t.representedObject); | 525 var elementsTreeElement = /** @type {!WebInspector.ElementsTreeEleme
nt} */ (listItem.treeElement); |
| 526 var node = elementsTreeElement.node(); |
| 526 this._loadDimensionsForNode(node, WebInspector.DOMPresentationUtils.
buildImagePreviewContents.bind(WebInspector.DOMPresentationUtils, node.target(),
anchor.href, true, showPopover)); | 527 this._loadDimensionsForNode(node, WebInspector.DOMPresentationUtils.
buildImagePreviewContents.bind(WebInspector.DOMPresentationUtils, node.target(),
anchor.href, true, showPopover)); |
| 527 } else { | 528 } else { |
| 528 var node = this.selectedDOMNode(); | 529 var node = this.selectedDOMNode(); |
| 529 if (node) | 530 if (node) |
| 530 WebInspector.DOMPresentationUtils.buildImagePreviewContents(node
.target(), anchor.href, true, showPopover); | 531 WebInspector.DOMPresentationUtils.buildImagePreviewContents(node
.target(), anchor.href, true, showPopover); |
| 531 } | 532 } |
| 532 | 533 |
| 533 /** | 534 /** |
| 534 * @param {!Element=} contents | 535 * @param {!Element=} contents |
| 535 */ | 536 */ |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1099 | 1100 |
| 1100 WebInspector.ElementsPanelFactory.prototype = { | 1101 WebInspector.ElementsPanelFactory.prototype = { |
| 1101 /** | 1102 /** |
| 1102 * @return {!WebInspector.Panel} | 1103 * @return {!WebInspector.Panel} |
| 1103 */ | 1104 */ |
| 1104 createPanel: function() | 1105 createPanel: function() |
| 1105 { | 1106 { |
| 1106 return WebInspector.ElementsPanel.instance(); | 1107 return WebInspector.ElementsPanel.instance(); |
| 1107 } | 1108 } |
| 1108 } | 1109 } |
| OLD | NEW |