author | Ehsan Akhgari <ehsan@mozilla.com> |
Fri, 17 Dec 2010 14:47:11 -0800 | |
changeset 59463 | 4f03895d544b32b1919de8a0ab4a06402ec6bda7 |
parent 59462 | d52d8f50d2cfebf0b77cc976fab1d7525eaff2b1 |
child 59464 | 9bb6c33a5ad1adb502919c704808d9cfd6b643b7 |
push id | 17632 |
push user | eakhgari@mozilla.com |
push date | Sat, 18 Dec 2010 07:39:11 +0000 |
treeherder | mozilla-central@4f03895d544b [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | roc, blocking-final |
bugs | 527935 |
milestone | 2.0b9pre |
first release with | nightly linux32
4f03895d544b
/
4.0b9pre
/
20101218030347
/
files
nightly linux64
4f03895d544b
/
4.0b9pre
/
20101218030347
/
files
nightly mac
4f03895d544b
/
4.0b9pre
/
20101218030347
/
files
nightly win32
4f03895d544b
/
4.0b9pre
/
20101218030347
/
files
nightly win64
4f03895d544b
/
4.0b9pre
/
20101218044921
/
files
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
releases | nightly linux32
4.0b9pre
/
20101218030347
/
pushlog to previous
nightly linux64
4.0b9pre
/
20101218030347
/
pushlog to previous
nightly mac
4.0b9pre
/
20101218030347
/
pushlog to previous
nightly win32
4.0b9pre
/
20101218030347
/
pushlog to previous
nightly win64
4.0b9pre
/
20101218044921
/
pushlog to previous
|
editor/libeditor/text/nsPlaintextDataTransfer.cpp | file | annotate | diff | comparison | revisions | |
editor/libeditor/text/tests/test_bug596001.html | file | annotate | diff | comparison | revisions |
--- a/editor/libeditor/text/nsPlaintextDataTransfer.cpp +++ b/editor/libeditor/text/nsPlaintextDataTransfer.cpp @@ -425,19 +425,25 @@ NS_IMETHODIMP nsPlaintextEditor::Paste(P if (NS_SUCCEEDED(clipboard->GetData(trans, aSelectionType)) && IsModifiable()) { // handle transferable hooks nsCOMPtr<nsIDOMDocument> domdoc; GetDocument(getter_AddRefs(domdoc)); if (!nsEditorHookUtils::DoInsertionHook(domdoc, nsnull, trans)) return NS_OK; + // Make sure to issue an input event for paste operations + NS_ASSERTION(mLastKeypressEventWasTrusted == eTriUnset, "How come our status is not clear?"); + mLastKeypressEventWasTrusted = eTriTrue; + // Beware! This may flush notifications via synchronous // ScrollSelectionIntoView. rv = InsertTextFromTransferable(trans, nsnull, nsnull, PR_TRUE); + + mLastKeypressEventWasTrusted = eTriUnset; } } return rv; } NS_IMETHODIMP nsPlaintextEditor::PasteTransferable(nsITransferable *aTransferable) {
--- a/editor/libeditor/text/tests/test_bug596001.html +++ b/editor/libeditor/text/tests/test_bug596001.html @@ -29,17 +29,20 @@ function testTab(prefix, callback) { src.focus(); src.select(); SimpleTest.waitForClipboard("a\tb", function() { synthesizeKey("c", {accelKey: true}); }, function() { dst.focus(); + var inputReceived = false; + dst.addEventListener("input", function() inputReceived = true, false); synthesizeKey("v", {accelKey: true}); + ok(inputReceived, "An input event should be raised"); is(dst.value, prefix + src.value, "The value should be pasted verbatim"); callback(); }, callback ); } testTab("", function() {