OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 | 454 |
455 /** | 455 /** |
456 * @param {?Event} event | 456 * @param {?Event} event |
457 */ | 457 */ |
458 _onContextMenu: function(event) | 458 _onContextMenu: function(event) |
459 { | 459 { |
460 var layer = this._layerFromEventPoint(event); | 460 var layer = this._layerFromEventPoint(event); |
461 var nodeId = layer && layer.nodeIdForSelfOrAncestor(); | 461 var nodeId = layer && layer.nodeIdForSelfOrAncestor(); |
462 if (!nodeId) | 462 if (!nodeId) |
463 return; | 463 return; |
464 var domNode = WebInspector.domAgent.nodeForId(nodeId); | 464 var domNode = WebInspector.domModel.nodeForId(nodeId); |
465 if (!domNode) | 465 if (!domNode) |
466 return; | 466 return; |
467 var contextMenu = new WebInspector.ContextMenu(event); | 467 var contextMenu = new WebInspector.ContextMenu(event); |
468 contextMenu.appendApplicableItems(domNode); | 468 contextMenu.appendApplicableItems(domNode); |
469 contextMenu.show(); | 469 contextMenu.show(); |
470 }, | 470 }, |
471 | 471 |
472 /** | 472 /** |
473 * @param {?Event} event | 473 * @param {?Event} event |
474 */ | 474 */ |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 | 517 |
518 WebInspector.LayerDetails.prototype = { | 518 WebInspector.LayerDetails.prototype = { |
519 /** | 519 /** |
520 * @return {boolean} | 520 * @return {boolean} |
521 */ | 521 */ |
522 isAboveContentRoot: function() | 522 isAboveContentRoot: function() |
523 { | 523 { |
524 return this.depth === undefined; | 524 return this.depth === undefined; |
525 } | 525 } |
526 } | 526 } |
OLD | NEW |