Closed Bug 230339 Opened 21 years ago Closed 21 years ago

incorrect code in nsPresShell::HandleEvent

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dbaron, Assigned: dbaron)

Details

Attachments

(1 file)

In revision 3.627 of nsPresShell.cpp, there was a change in nsPresShell::HandleEvent that looks incorrect to me. I just made some comments in nsPresShell in my patch for bug 230270 about the InZombieDocument check perhaps being bogus -- but in fact the error I pointed out was introduced later (revision 3.627). The change I don't like was (from "cvs diff -b -r3.626 -r3.627 nsPresShell.cpp"): +#endif /* defined(MOZ_X11) */ if (!mCurrentEventContent) { - // fallback, call existing codes mDocument->GetRootContent(&mCurrentEventContent); } -#else /* defined(MOZ_X11) */ - mDocument->GetRootContent(&mCurrentEventContent); -#endif /* defined(MOZ_X11) */ I think this code was already incorrect for the MOZ_X11 case, but this meant that mCurrentEventContent was not assigned to at all in most cases. This seems wrong to me.
Actually, my comment wasn't entirely incorrect, since the old assignment was still within an |if (!mCurrentEventFrame)| test.
OK, I take that back again. The |PushCurrentEventInfo| makes things OK. So I should really just back out part of the changes I just made.
Attachment #138567 - Flags: review+
ok, changes backed out.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
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.

Attachment

General

Created:
Updated:
Size: