Simplify handling of the eSelectNoAmount case in nsFrame::PeekOffset

RESOLVED FIXED in mozilla1.9alpha1

Status

()

RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: uriber, Assigned: uriber)

Tracking

Trunk
mozilla1.9alpha1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

12 years ago
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.
(Assignee)

Comment 1

12 years ago
Created attachment 229078 [details] [diff] [review]
patch
Attachment #229078 - Flags: review?(roc)
(Assignee)

Updated

12 years ago
Status: NEW → ASSIGNED
Attachment #229078 - Flags: superreview+
Attachment #229078 - Flags: review?(roc)
Attachment #229078 - Flags: review+
(Assignee)

Comment 2

12 years ago
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
Last Resolved: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9alpha
Depends on: 345616
(Assignee)

Updated

12 years ago
No longer depends on: 345616
You need to log in before you can comment on or make changes to this bug.