Closed Bug 344514 Opened 19 years ago Closed 19 years ago

Simplify handling of the eSelectNoAmount case in nsFrame::PeekOffset

Categories

(Core :: DOM: Selection, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: uriber, Assigned: uriber)

Details

Attachments

(1 file)

While working on bug 343763, I noticed that the eSelectNoAmount case in nsFrame::PeekOffset appears to be using mDesiredX, and calling GetContentOffsetsFromPoint. This seemed bogus,as mDesiredX is not even set to any meaningful value in this case. Tracing through the code path confirmed that after doing all kinds of geometrical calculations, eventually what happened was a simple call to GetRangeForFrame. I suggest replacing the call GetContentOffsetsFromPoint with a direct call to GetRangeForFrame. Patch coming immediately.
Attached patch patchSplinter Review
Attachment #229078 - Flags: review?(roc)
Status: NEW → ASSIGNED
Checking in layout/generic/nsFrame.cpp; /cvsroot/mozilla/layout/generic/nsFrame.cpp,v <-- nsFrame.cpp new revision: 3.660; previous revision: 3.659 done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9alpha
Depends on: 345616
No longer depends on: 345616
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: