Closed Bug 826479 Opened 12 years ago Closed 12 years ago

Assertion failure: mInitialized trying to Ctrl+Middle-click paste

Categories

(Core :: Widget, defect)

All
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: neil, Assigned: neil)

References

Details

Attachments

(1 file)

Steps to reproduce problem:
1. If necessary, enable middlemouse.paste
2. Make a selection
3. Hold down Ctrl and middle-click a textarea
Attached patch Proposed patchSplinter Review
> [no attachments can be made obsolete]

(Just testing!)
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #697720 - Flags: review?(ehsan)
Comment on attachment 697720 [details] [diff] [review]
Proposed patch

Review of attachment 697720 [details] [diff] [review]:
-----------------------------------------------------------------

::: editor/libeditor/text/nsPlaintextEditor.cpp
@@ +1355,5 @@
>  #ifdef DEBUG_clipboard
>      printf("Got flavor [%s]\n", flav);
>  #endif
> +    if (0 == nsCRT::strcmp(flav, kUnicodeMime) ||
> +        0 == nsCRT::strcmp(flav, kMozTextInternal))

Why is this hunk necessary?
(In reply to Ehsan Akhgari from comment #2)
> (From update of attachment 697720 [details] [diff] [review])
> > +    if (0 == nsCRT::strcmp(flav, kUnicodeMime) ||
> > +        0 == nsCRT::strcmp(flav, kMozTextInternal))
> Why is this hunk necessary?
Rather than reinvent the wheel I copied nsPlaintextEditor::Paste (which for some reason lives in nsPlaintextDataTransfer.cpp) which uses PrepareTransferable which assumes the caller is interested in both flavours.
Attachment #697720 - Flags: review?(ehsan) → review+
https://hg.mozilla.org/mozilla-central/rev/ac810061a175
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: