[gtk2] paste into html compose window doesn't work

RESOLVED FIXED in mozilla1.6beta

Status

()

Core
XUL
--
major
RESOLVED FIXED
14 years ago
14 years ago

People

(Reporter: Darin Fisher, Assigned: Darin Fisher)

Tracking

({regression})

Trunk
mozilla1.6beta
x86
Linux
regression
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

1.15 KB, patch
Brian Ryner (not reading)
: review+
Brian Ryner (not reading)
: superreview+
brendan
: approval1.6b+
Details | Diff | Splinter Review
(Assignee)

Description

14 years ago
paste into mail compose window doesn't work.  this might be specific to the
GTK2+XFT build.  i've noticed this problem in both seamonkey and thunderbird. 
there aren't any messages in the javascript console.  i'll provide more info
once i have a debug build that i can test.
(Assignee)

Updated

14 years ago
Keywords: regression
(Assignee)

Comment 1

14 years ago
i meant to add that paste works into other fields, such as the mail message
compose summary field or the address fields.  i think this is specific to the
mail message compose window.  i haven't tried regular composer.

Comment 2

14 years ago
Menu command, keyboard shortcut, context menu, have you tried them all?  (I
assume they all exist on Linux?)

What does it do - just nothing?  Menu command greyed out or not?
(Assignee)

Comment 3

14 years ago
i think this may have been caused by bug 214583.  it looks like this is a bug in
the nsClipboard.cpp code inside widget/src/gtk2.  wait_for_contents returns with
a non-null selectionData, but the contents of selectionData are bogus:

(gdb) p *selectionData
$8 = {selection = 0x1, target = 0x74, type = 0x0, format = 0, data = 0x0, length
= -1, display = 0x8081508}

-> bryner
Assignee: sspitzer → bryner
Component: Composition → XP Toolkit/Widgets
Product: MailNews → Browser
(Assignee)

Updated

14 years ago
Summary: paste into mail compose window doesn't work → GTK2: paste into mail compose window doesn't work
(Assignee)

Updated

14 years ago
Summary: GTK2: paste into mail compose window doesn't work → [gtk2] paste into mail compose window doesn't work
This also seems to be specific to HTML compose.  Plain text compose doesn't show
the problem for me.
(Assignee)

Comment 5

14 years ago
Created attachment 136076 [details] [diff] [review]
v1 patch

bryner and i came up with this today.  turns out GTK+-2.2.2 does this in its
code. we should do the same.  the patch causes selectionData to be null when we
return from wait_for_contents.	as a result, we will request the selection
flavor.
(Assignee)

Updated

14 years ago
Attachment #136076 - Flags: review?(bryner)
Comment on attachment 136076 [details] [diff] [review]
v1 patch

r/sr=bryner
Attachment #136076 - Flags: superreview+
Attachment #136076 - Flags: review?(bryner)
Attachment #136076 - Flags: review+
(Assignee)

Comment 7

14 years ago
here's the GTK+-2.2.2 code:

static void
clipboard_received_func (GtkClipboard     *clipboard,
             GtkSelectionData *selection_data,
             gpointer          data)
{
  WaitResults *results = data;
                                                                               
                                                                         
  if (selection_data->length >= 0)
    results->data = gtk_selection_data_copy (selection_data);
                                                                               
                                                                         
  g_main_loop_quit (results->loop);
}

here's our current version of this function:

static void
clipboard_contents_received(GtkClipboard     *clipboard,
                            GtkSelectionData *selection_data,
                            gpointer          data)
{
    GtkSelectionData **sel_copy = NS_STATIC_CAST(GtkSelectionData **, data);
    *sel_copy = gtk_selection_data_copy(selection_data);
}

the patch makes our code behave like the code from GTK+-2.2.2 :)
(Assignee)

Comment 8

14 years ago
-> me for checkin
Assignee: bryner → darin
(Assignee)

Comment 9

14 years ago
Comment on attachment 136076 [details] [diff] [review]
v1 patch

this would be a good patch to get in for beta.
Attachment #136076 - Flags: approval1.6b?
(Assignee)

Updated

14 years ago
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.6beta
Comment on attachment 136076 [details] [diff] [review]
v1 patch

a=brendan@mozilla.org and drivers for 1.6b.

/be
Attachment #136076 - Flags: approval1.6b? → approval1.6b+
(Assignee)

Comment 11

14 years ago
fixed on trunk for 1.6 beta
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
Summary: [gtk2] paste into mail compose window doesn't work → [gtk2] paste into html compose window doesn't work

Comment 12

14 years ago
This checkin is causing long UI pauses in my gtk2/xft build (bug 226267).
The value of selection_data->length always seems to be -1 in my limited
testing.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 13

14 years ago
marking FIXED again now that bryner has a patch in bug 226267.
Status: REOPENED → RESOLVED
Last Resolved: 14 years ago14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.