Closed Bug 289857 Opened 20 years ago Closed 20 years ago

discarded characters cause that the selected text shift

Categories

(Core :: Layout: Text and Fonts, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: hsaito54, Unassigned)

References

Details

Attachments

(1 file, 2 obsolete files)

Discarded characters (like soft hyphen (­)) cause that the selected text
shifts. I think that it is the cause that the mapping between the content and
the transformed buffer counts the discarded characters.

testcase: https://bugzilla.mozilla.org/attachment.cgi?id=39944

If 'ous' of the third table on testcase is selected and pasted and copied, other
texts will be copied.
Attached patch test patch (obsolete) — Splinter Review
rbs, I propose changing the patch (attachment 179848 [details] [diff] [review]) of Bug 96423.
Please refer to the changes to nsTextFrame.cpp on attachment 177109 [details] [diff] [review] of Bug
166127. I think that this problem has same cause.
> I think that this problem has same cause.

Because a '\n' between CJ characters is discarded.
You don't have to introduce |mDiscarded|. |*aWasTransformed| should catch your
case because we should get (*aWordLenResult != *aContentLenResult). 

Try another patch without introducing |mDiscarded|.
Attached patch patch (obsolete) — Splinter Review
To be sure, |mDiscarded| is unnecessary. I removed it.
Attachment #180345 - Attachment is obsolete: true
You also don't need to move the #ifdef around, that will keep your patch small
and friendlier...
Oops... I just noted you indeed need to move it from the .cpp to the .h since
you use the IS_DISCARDED() macro elsewhere...
Attachment #181229 - Flags: review?(rbs)
Comment on attachment 181229 [details] [diff] [review]
patch

I am having trouble applying your patch to my tree. Parts of the patch are
rejected. Care to update your tree to be in sync with the CVS trunk and
resubmit another patch.
Attachment #181229 - Flags: review?(rbs)
Attached patch patchSplinter Review
I am sorry to trouble you. I posted this patch using source of 20-Apr-2005 on
latest trunk.
Attachment #181229 - Attachment is obsolete: true
Attachment #181382 - Flags: review?(rbs)
Comment on attachment 181382 [details] [diff] [review]
patch

r=rbs
Attachment #181382 - Flags: review?(rbs) → review+
Attachment #181382 - Flags: superreview?(rbs)
Comment on attachment 181382 [details] [diff] [review]
patch

r+sr=rbs
Attachment #181382 - Flags: superreview?(rbs) → superreview+
Comment on attachment 181382 [details] [diff] [review]
patch

I think that this patch is low-risk although it influences the fix of Bug
96423, and it solves Bug 166127.
Attachment #181382 - Flags: approval1.8b2?
Comment on attachment 181382 [details] [diff] [review]
patch

a=chofmann for 1.8a
Attachment #181382 - Flags: approval1.8b2? → approval1.8b2+
rbs, this patch was approved for 1.8b2. Could you check in to the trunk?
Checked-in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
*** Bug 245478 has been marked as a duplicate of this bug. ***
*** Bug 241486 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: