| 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 element = element.enclosingNodeOrSelfWithClass("layer-container"); | 373 element = element.enclosingNodeOrSelfWithClass("layer-container"); |
| 374 return element && element.__layerDetails && element.__layerDetails.layer
; | 374 return element && element.__layerDetails && element.__layerDetails.layer
; |
| 375 }, | 375 }, |
| 376 | 376 |
| 377 /** | 377 /** |
| 378 * @param {?Event} event | 378 * @param {?Event} event |
| 379 */ | 379 */ |
| 380 _onContextMenu: function(event) | 380 _onContextMenu: function(event) |
| 381 { | 381 { |
| 382 var layer = this._layerFromEventPoint(event); | 382 var layer = this._layerFromEventPoint(event); |
| 383 var nodeId = layer && layer.nodeId(); | 383 var nodeId = layer && layer.nodeIdForSelfOrAncestor(); |
| 384 if (!nodeId) | 384 if (!nodeId) |
| 385 return; | 385 return; |
| 386 var domNode = WebInspector.domAgent.nodeForId(nodeId); | 386 var domNode = WebInspector.domAgent.nodeForId(nodeId); |
| 387 if (!domNode) | 387 if (!domNode) |
| 388 return; | 388 return; |
| 389 var contextMenu = new WebInspector.ContextMenu(event); | 389 var contextMenu = new WebInspector.ContextMenu(event); |
| 390 contextMenu.appendApplicableItems(domNode); | 390 contextMenu.appendApplicableItems(domNode); |
| 391 contextMenu.show(); | 391 contextMenu.show(); |
| 392 }, | 392 }, |
| 393 | 393 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 * @param {!WebInspector.Layer} layer | 428 * @param {!WebInspector.Layer} layer |
| 429 * @param {!Element} paintRectElement | 429 * @param {!Element} paintRectElement |
| 430 */ | 430 */ |
| 431 WebInspector.LayerDetails = function(layer, paintRectElement) | 431 WebInspector.LayerDetails = function(layer, paintRectElement) |
| 432 { | 432 { |
| 433 this.layer = layer; | 433 this.layer = layer; |
| 434 this.depth = 0; | 434 this.depth = 0; |
| 435 this.paintRectElement = paintRectElement; | 435 this.paintRectElement = paintRectElement; |
| 436 this.paintCount = 0; | 436 this.paintCount = 0; |
| 437 } | 437 } |
| OLD | NEW |