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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 461 }, | 461 }, |
| 462 | 462 |
| 463 _populateContextMenu: function(contextMenu, node) | 463 _populateContextMenu: function(contextMenu, node) |
| 464 { | 464 { |
| 465 // Add debbuging-related actions | 465 // Add debbuging-related actions |
| 466 contextMenu.appendSeparator(); | 466 contextMenu.appendSeparator(); |
| 467 var pane = WebInspector.domBreakpointsSidebarPane; | 467 var pane = WebInspector.domBreakpointsSidebarPane; |
| 468 pane.populateNodeContextMenu(node, contextMenu); | 468 pane.populateNodeContextMenu(node, contextMenu); |
| 469 }, | 469 }, |
| 470 | 470 |
| 471 _getPopoverAnchor: function(element) | 471 _getPopoverAnchor: function(element) |
|
vsevik
2014/06/26 13:55:35
Please annotate this method.
eustas
2014/06/26 14:15:58
Done.
| |
| 472 { | 472 { |
| 473 var anchor = element.enclosingNodeOrSelfWithClass("webkit-html-resource- link"); | 473 var anchor = element.enclosingNodeOrSelfWithClass("webkit-html-resource- link"); |
| 474 if (!anchor || !anchor.href) | 474 if (!anchor || !anchor.href) |
| 475 return null; | 475 return; |
| 476 | 476 |
| 477 var treeOutlineElement = anchor.enclosingNodeOrSelfWithClass("elements-t ree-outline"); | 477 var treeOutlineElement = anchor.enclosingNodeOrSelfWithClass("elements-t ree-outline"); |
| 478 if (!treeOutlineElement) | 478 if (!treeOutlineElement) |
| 479 return null; | 479 return; |
| 480 | 480 |
| 481 for (var i = 0; i < this._treeOutlines.length; ++i) { | 481 for (var i = 0; i < this._treeOutlines.length; ++i) { |
| 482 if (this._treeOutlines[i].element !== treeOutlineElement) | 482 if (this._treeOutlines[i].element !== treeOutlineElement) |
| 483 continue; | 483 continue; |
| 484 | 484 |
| 485 var resource = this._treeOutlines[i].target().resourceTreeModel.reso urceForURL(anchor.href); | 485 var resource = this._treeOutlines[i].target().resourceTreeModel.reso urceForURL(anchor.href); |
| 486 if (!resource || resource.type !== WebInspector.resourceTypes.Image) | 486 if (!resource || resource.type !== WebInspector.resourceTypes.Image) |
| 487 return null; | 487 return; |
| 488 anchor.removeAttribute("title"); | 488 anchor.removeAttribute("title"); |
| 489 return anchor; | 489 return anchor; |
| 490 } | 490 } |
| 491 return null; | |
| 492 }, | 491 }, |
| 493 | 492 |
| 494 /** | 493 /** |
| 495 * @param {!WebInspector.DOMNode} node | 494 * @param {!WebInspector.DOMNode} node |
| 496 * @param {function()} callback | 495 * @param {function()} callback |
| 497 */ | 496 */ |
| 498 _loadDimensionsForNode: function(node, callback) | 497 _loadDimensionsForNode: function(node, callback) |
| 499 { | 498 { |
| 500 if (!node.nodeName() || node.nodeName().toLowerCase() !== "img") { | 499 if (!node.nodeName() || node.nodeName().toLowerCase() !== "img") { |
| 501 callback(); | 500 callback(); |
| (...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1471 /** | 1470 /** |
| 1472 * @suppressReceiverCheck | 1471 * @suppressReceiverCheck |
| 1473 * @this {Element} | 1472 * @this {Element} |
| 1474 */ | 1473 */ |
| 1475 function parentElement() | 1474 function parentElement() |
| 1476 { | 1475 { |
| 1477 return this.parentElement; | 1476 return this.parentElement; |
| 1478 } | 1477 } |
| 1479 } | 1478 } |
| 1480 } | 1479 } |
| OLD | NEW |