OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). | 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.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 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
536 if (WebInspector.inspectorView.currentPanel() && WebInspector.inspectorV iew.currentPanel()["handleCopyEvent"]) | 536 if (WebInspector.inspectorView.currentPanel() && WebInspector.inspectorV iew.currentPanel()["handleCopyEvent"]) |
537 event.preventDefault(); | 537 event.preventDefault(); |
538 }, | 538 }, |
539 | 539 |
540 _documentCopy: function(event) | 540 _documentCopy: function(event) |
541 { | 541 { |
542 if (WebInspector.inspectorView.currentPanel() && WebInspector.inspectorV iew.currentPanel()["handleCopyEvent"]) | 542 if (WebInspector.inspectorView.currentPanel() && WebInspector.inspectorV iew.currentPanel()["handleCopyEvent"]) |
543 WebInspector.inspectorView.currentPanel()["handleCopyEvent"](event); | 543 WebInspector.inspectorView.currentPanel()["handleCopyEvent"](event); |
544 }, | 544 }, |
545 | 545 |
546 _documentCut: function(event) | |
547 { | |
548 if (WebInspector.inspectorView.currentPanel() && WebInspector.inspectorV iew.currentPanel()["handleCutEvent"]) | |
aandrey
2014/07/18 05:30:05
extract WebInspector.inspectorView.currentPanel()
apavlov
2014/07/18 09:02:07
Done.
| |
549 WebInspector.inspectorView.currentPanel()["handleCutEvent"](event); | |
550 }, | |
551 | |
552 _documentPaste: function(event) | |
553 { | |
554 if (WebInspector.inspectorView.currentPanel() && WebInspector.inspectorV iew.currentPanel()["handlePasteEvent"]) | |
aandrey
2014/07/18 05:30:05
ditto
apavlov
2014/07/18 09:02:07
Done.
| |
555 WebInspector.inspectorView.currentPanel()["handlePasteEvent"](event) ; | |
556 }, | |
557 | |
546 _contextMenuEventFired: function(event) | 558 _contextMenuEventFired: function(event) |
547 { | 559 { |
548 if (event.handled || event.target.classList.contains("popup-glasspane")) | 560 if (event.handled || event.target.classList.contains("popup-glasspane")) |
549 event.preventDefault(); | 561 event.preventDefault(); |
550 }, | 562 }, |
551 | 563 |
552 _addMainEventListeners: function(doc) | 564 _addMainEventListeners: function(doc) |
553 { | 565 { |
554 doc.addEventListener("keydown", this._postDocumentKeyDown.bind(this), fa lse); | 566 doc.addEventListener("keydown", this._postDocumentKeyDown.bind(this), fa lse); |
555 doc.addEventListener("beforecopy", this._documentCanCopy.bind(this), tru e); | 567 doc.addEventListener("beforecopy", this._documentCanCopy.bind(this), tru e); |
556 doc.addEventListener("copy", this._documentCopy.bind(this), false); | 568 doc.addEventListener("copy", this._documentCopy.bind(this), false); |
569 doc.addEventListener("cut", this._documentCut.bind(this), false); | |
570 doc.addEventListener("paste", this._documentPaste.bind(this), false); | |
557 doc.addEventListener("contextmenu", this._contextMenuEventFired.bind(thi s), true); | 571 doc.addEventListener("contextmenu", this._contextMenuEventFired.bind(thi s), true); |
558 doc.addEventListener("click", this._documentClick.bind(this), false); | 572 doc.addEventListener("click", this._documentClick.bind(this), false); |
559 }, | 573 }, |
560 | 574 |
561 /** | 575 /** |
562 * @override | 576 * @override |
563 * @param {!RuntimeAgent.RemoteObject} payload | 577 * @param {!RuntimeAgent.RemoteObject} payload |
564 * @param {!Object=} hints | 578 * @param {!Object=} hints |
565 */ | 579 */ |
566 inspect: function(payload, hints) | 580 inspect: function(payload, hints) |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
944 }, | 958 }, |
945 | 959 |
946 /** | 960 /** |
947 * @param {!WebInspector.Event} event | 961 * @param {!WebInspector.Event} event |
948 */ | 962 */ |
949 _inspectNode: function(event) | 963 _inspectNode: function(event) |
950 { | 964 { |
951 WebInspector.Revealer.reveal(/** @type {!WebInspector.DOMNode} */ (event .data)); | 965 WebInspector.Revealer.reveal(/** @type {!WebInspector.DOMNode} */ (event .data)); |
952 } | 966 } |
953 } | 967 } |
OLD | NEW |