Closed Bug 224035 Opened 21 years ago Closed 21 years ago

[gtk2] Paste from Evolution to Composer will have garbage character

Categories

(Core Graveyard :: Embedding: GTK Widget, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jerry.tan, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20031021 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20031021 When paste from Evolution (using gtkhtml widget) to the composer of Mozilla, it will have some garbage character after the paste content. It is caused by the following code in nsClipboard.cpp: length = selectionData->length * selectionData->format / 8; When mozilla compute the length of the data from Clipboard, it uses "selectionData"->format. Evolution set this value to 16, this will double the actual length of data. According to http://www.gtk.org/tutorial/sec-retrievingtheselection.html, "format gives the length of the units (for instance characters) in bits. Usually, you don't care about this when receiving data. data is a pointer to the returned data, and length gives the length of the returned data, in bytes." If so, the bug should be mozilla's guilt - Mozilla shouldn't have used "selectionData->format" to compute the datalength and should use "selectionData->length" directly because it's already in bytes. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Component: GFX → Embedding: GTK Widget
Attached patch patchSplinter Review
Attachment #134382 - Flags: review?(blizzard)
Summary: Paste from Evolution to Composer will have garbage character → [gtk2] Paste from Evolution to Composer will have garbage character
Attachment #134382 - Flags: review?(blizzard) → review+
Attachment #134382 - Flags: superreview?(bolian.yin)
Attachment #134382 - Flags: superreview?(bolian.yin)
Attachment #134382 - Flags: review?(bolian.yin)
Attachment #134382 - Flags: review+
Comment on attachment 134382 [details] [diff] [review] patch blizzard, can you remove your review to superview? so I can check in this patch. Thanks very much.
Attachment #134382 - Flags: superreview?(blizzard)
Attachment #134382 - Flags: superreview?(blizzard) → superreview+
Attachment #134382 - Flags: review?(yinbolian) → review?(robin.lu)
Attachment #134382 - Flags: review?(robin.lu) → review+
Comment on attachment 134382 [details] [diff] [review] patch The bug is important for gtk2 build since it influences Copy&Paste action to evolution.
Attachment #134382 - Flags: approval1.7?
Comment on attachment 134382 [details] [diff] [review] patch a=asa (on behalf of drivers) for checkin to 1.7
Attachment #134382 - Flags: approval1.7? → approval1.7+
thanks. Patch checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: