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.
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+
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)
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
Last Resolved: 15 years ago
Resolution: --- → FIXED
Component: Embedding: GTK Widget → Embedding: GTK Widget
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.