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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 388 }, | 388 }, |
| 389 | 389 |
| 390 switchToAndFocus: function(node) | 390 switchToAndFocus: function(node) |
| 391 { | 391 { |
| 392 // Reset search restore. | 392 // Reset search restore. |
| 393 WebInspector.searchController.cancelSearch(); | 393 WebInspector.searchController.cancelSearch(); |
| 394 WebInspector.inspectorView.setCurrentPanel(this); | 394 WebInspector.inspectorView.setCurrentPanel(this); |
| 395 this.selectDOMNode(node, true); | 395 this.selectDOMNode(node, true); |
| 396 }, | 396 }, |
| 397 | 397 |
| 398 /** | |
| 399 * @param {WebInspector.ContextMenu} contextMenu | |
| 400 * @param {WebInspector.DOMNode} node | |
| 401 */ | |
| 398 _populateContextMenu: function(contextMenu, node) | 402 _populateContextMenu: function(contextMenu, node) |
| 399 { | 403 { |
| 400 // Add debbuging-related actions | 404 // Add debbuging-related actions |
| 401 contextMenu.appendSeparator(); | 405 contextMenu.appendSeparator(); |
| 402 var pane = WebInspector.domBreakpointsSidebarPane; | 406 var pane = WebInspector.domBreakpointsSidebarPane; |
| 403 pane.populateNodeContextMenu(node, contextMenu); | 407 pane.populateNodeContextMenu(node, contextMenu); |
| 408 contextMenu.appendSeparator(); | |
| 409 contextMenu.appendItem(WebInspector.UIString("Jump to Relayout Boundary" ), this._jumpToRelayoutBoundary.bind(this, node)); | |
|
pfeldman
2013/09/06 13:35:51
I don't think it makes sense putting it here. Lets
| |
| 410 | |
| 411 }, | |
| 412 | |
| 413 /** | |
| 414 * @param {WebInspector.DOMNode} node | |
| 415 */ | |
| 416 _jumpToRelayoutBoundary: function(node) | |
| 417 { | |
| 418 /** | |
| 419 * @param {?Protocol.Error} error | |
| 420 * @param {DOMAgent.NodeId=} nodeId | |
| 421 */ | |
| 422 function callback(error, nodeId) | |
| 423 { | |
| 424 if (error || !nodeId) | |
| 425 return; | |
| 426 this.revealAndSelectNode(nodeId); | |
| 427 } | |
| 428 node.findRelayoutBoundary(callback.bind(this)); | |
| 404 }, | 429 }, |
| 405 | 430 |
| 406 _getPopoverAnchor: function(element) | 431 _getPopoverAnchor: function(element) |
| 407 { | 432 { |
| 408 var anchor = element.enclosingNodeOrSelfWithClass("webkit-html-resource- link"); | 433 var anchor = element.enclosingNodeOrSelfWithClass("webkit-html-resource- link"); |
| 409 if (anchor) { | 434 if (anchor) { |
| 410 if (!anchor.href) | 435 if (!anchor.href) |
| 411 return null; | 436 return null; |
| 412 | 437 |
| 413 var resource = WebInspector.resourceTreeModel.resourceForURL(anchor. href); | 438 var resource = WebInspector.resourceTreeModel.resourceForURL(anchor. href); |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1189 * @param {WebInspector.SidebarPane} pane | 1214 * @param {WebInspector.SidebarPane} pane |
| 1190 */ | 1215 */ |
| 1191 addExtensionSidebarPane: function(id, pane) | 1216 addExtensionSidebarPane: function(id, pane) |
| 1192 { | 1217 { |
| 1193 this.sidebarPanes[id] = pane; | 1218 this.sidebarPanes[id] = pane; |
| 1194 this.sidebarPaneView.addPane(pane); | 1219 this.sidebarPaneView.addPane(pane); |
| 1195 }, | 1220 }, |
| 1196 | 1221 |
| 1197 __proto__: WebInspector.Panel.prototype | 1222 __proto__: WebInspector.Panel.prototype |
| 1198 } | 1223 } |
| OLD | NEW |