Title: [147535] trunk/Source/WebCore
- Revision
- 147535
- Author
- [email protected]
- Date
- 2013-04-03 03:24:58 -0700 (Wed, 03 Apr 2013)
Log Message
Web Inspector: [REGRESSION(r147117)][Elements] Copy/paste keyboard shortcuts broken in "Edit as HTML"
https://bugs.webkit.org/show_bug.cgi?id=113798
Reviewed by Yury Semikhatsky.
Stop propagation of "copy" event from the multiline editor's
CodeMirror host element so that it is not handled by
WebInspector.documentCopy().
* inspector/front-end/UIUtils.js:
(.consumeCopy):
(.cleanUpAfterEditing):
* inspector/front-end/inspector.js:
(WebInspector.addMainEventListeners):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (147534 => 147535)
--- trunk/Source/WebCore/ChangeLog 2013-04-03 09:49:14 UTC (rev 147534)
+++ trunk/Source/WebCore/ChangeLog 2013-04-03 10:24:58 UTC (rev 147535)
@@ -1,3 +1,20 @@
+2013-04-03 Alexander Pavlov <[email protected]>
+
+ Web Inspector: [REGRESSION(r147117)][Elements] Copy/paste keyboard shortcuts broken in "Edit as HTML"
+ https://bugs.webkit.org/show_bug.cgi?id=113798
+
+ Reviewed by Yury Semikhatsky.
+
+ Stop propagation of "copy" event from the multiline editor's
+ CodeMirror host element so that it is not handled by
+ WebInspector.documentCopy().
+
+ * inspector/front-end/UIUtils.js:
+ (.consumeCopy):
+ (.cleanUpAfterEditing):
+ * inspector/front-end/inspector.js:
+ (WebInspector.addMainEventListeners):
+
2013-04-03 Takashi Sakamoto <[email protected]>
With borders of differing alpha, the corners become squared off
Modified: trunk/Source/WebCore/inspector/front-end/UIUtils.js (147534 => 147535)
--- trunk/Source/WebCore/inspector/front-end/UIUtils.js 2013-04-03 09:49:14 UTC (rev 147534)
+++ trunk/Source/WebCore/inspector/front-end/UIUtils.js 2013-04-03 10:24:58 UTC (rev 147535)
@@ -447,11 +447,17 @@
var codeMirror;
var cssLoadView;
+ function consumeCopy(e)
+ {
+ e.consume();
+ }
+
if (isMultiline) {
loadScript("CodeMirrorTextEditor.js");
cssLoadView = new WebInspector.CodeMirrorCSSLoadView();
cssLoadView.show(element);
WebInspector.setCurrentFocusElement(element);
+ element.addEventListener("copy", consumeCopy, true);
codeMirror = window.CodeMirror(element, {
mode: config.mode,
lineWrapping: config.lineWrapping,
@@ -500,6 +506,7 @@
WebInspector.restoreFocusFromElement(element);
if (isMultiline) {
+ element.removeEventListener("copy", consumeCopy, true);
cssLoadView.detach();
return;
}
Modified: trunk/Source/WebCore/inspector/front-end/inspector.js (147534 => 147535)
--- trunk/Source/WebCore/inspector/front-end/inspector.js 2013-04-03 09:49:14 UTC (rev 147534)
+++ trunk/Source/WebCore/inspector/front-end/inspector.js 2013-04-03 10:24:58 UTC (rev 147535)
@@ -1016,7 +1016,7 @@
doc.addEventListener("keydown", this.documentKeyDown.bind(this), true);
doc.addEventListener("keydown", this.postDocumentKeyDown.bind(this), false);
doc.addEventListener("beforecopy", this.documentCanCopy.bind(this), true);
- doc.addEventListener("copy", this.documentCopy.bind(this), true);
+ doc.addEventListener("copy", this.documentCopy.bind(this), false);
doc.addEventListener("contextmenu", this.contextMenuEventFired.bind(this), true);
doc.addEventListener("click", this.documentClick.bind(this), true);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes