Closed
Bug 201983
Opened 23 years ago
Closed 17 years ago
nsImageFrame::TranslateEventCoords assumes aResult is initialized
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: dbradley, Unassigned)
References
Details
(Whiteboard: [good first bug])
When it's called from nsImageFrame::GetContextForEvent and other places, the
point passed in isn't initialized. nsBoxFrame seems to suffer the same problem.
The default constructor of nsPoint doesn't initialize it's members.
| Reporter | ||
Comment 1•23 years ago
|
||
Slight correction, it's aPoint, not aResult that isn't initialized.
Comment 2•23 years ago
|
||
->Misc Code
Assignee: other → misc
Component: Layout → Layout: Misc Code
QA Contact: ian → nobody
| Reporter | ||
Comment 4•23 years ago
|
||
It's hard to say, since I don't have a lot of history to go on here. But it's
possible that the original author(s) may have done this on purpose for nsPoint.
In the case of events, I'm not sure the point member is always valid. Thus
default initializing it to zero for events that don't have coordinates is a
small waste of time. I have no idea if the time involved to initialize it would
impact anything noticeably. I could imagine that constructing an array of points
in other places, it might be noticeable.
Comment 5•17 years ago
|
||
This seems to be wfm now: all callers pass in a reasonable aPoint.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
Updated•7 years ago
|
Product: Core → Core Graveyard
Updated•7 years ago
|
Component: Layout: Misc Code → Layout
Product: Core Graveyard → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•