| 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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 { | 480 { |
| 481 if (!this._showInElementsPanelEnabled) | 481 if (!this._showInElementsPanelEnabled) |
| 482 return; | 482 return; |
| 483 | 483 |
| 484 var treeElement = this._treeElementFromEvent(event); | 484 var treeElement = this._treeElementFromEvent(event); |
| 485 if (!treeElement) | 485 if (!treeElement) |
| 486 return; | 486 return; |
| 487 | 487 |
| 488 function focusElement() | 488 function focusElement() |
| 489 { | 489 { |
| 490 // Force elements module load. |
| 491 WebInspector.showPanel("elements"); |
| 490 WebInspector.domAgent.inspectElement(treeElement.representedObject.i
d); | 492 WebInspector.domAgent.inspectElement(treeElement.representedObject.i
d); |
| 491 } | 493 } |
| 492 var contextMenu = new WebInspector.ContextMenu(event); | 494 var contextMenu = new WebInspector.ContextMenu(event); |
| 493 contextMenu.appendItem(WebInspector.UIString("Reveal in Elements Panel")
, focusElement.bind(this)); | 495 contextMenu.appendItem(WebInspector.UIString("Reveal in Elements Panel")
, focusElement.bind(this)); |
| 494 contextMenu.show(); | 496 contextMenu.show(); |
| 495 }, | 497 }, |
| 496 | 498 |
| 497 populateContextMenu: function(contextMenu, event) | 499 populateContextMenu: function(contextMenu, event) |
| 498 { | 500 { |
| 499 var treeElement = this._treeElementFromEvent(event); | 501 var treeElement = this._treeElementFromEvent(event); |
| (...skipping 1673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2173 * @constructor | 2175 * @constructor |
| 2174 * @param {boolean} isUpdated | 2176 * @param {boolean} isUpdated |
| 2175 * @param {WebInspector.DOMNode=} parent | 2177 * @param {WebInspector.DOMNode=} parent |
| 2176 */ | 2178 */ |
| 2177 WebInspector.ElementsTreeUpdater.UpdateEntry = function(isUpdated, parent) | 2179 WebInspector.ElementsTreeUpdater.UpdateEntry = function(isUpdated, parent) |
| 2178 { | 2180 { |
| 2179 this.isUpdated = isUpdated; | 2181 this.isUpdated = isUpdated; |
| 2180 if (parent) | 2182 if (parent) |
| 2181 this.parent = parent; | 2183 this.parent = parent; |
| 2182 } | 2184 } |
| OLD | NEW |