Closed Bug 396983 Opened 17 years ago Closed 17 years ago

nsXULPopupManager::ShowPopup (or callers) should flush frames

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Gavin, Assigned: enndeakin)

References

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

See bug 395314: trying to unhide and then open a popup doesn't currently work without forcing frame construction or using a setTimeout hack. nsXULPopupManager::ShowPopup should probably FlushPendingNotifications().
Summary: nsXULPopupManager::ShowPopup callers should flush frames → nsXULPopupManager::ShowPopup (or callers) should flush frames
Or nsPopuBoxObject::ShowPopup should if the other caller of nsXULPopupManager::ShowPopup can't deal.
Blocks: 279703
Flags: blocking1.9?
Keywords: regression
Sounds like nsXULPopupManager::GetFrameOfTypeForContent could just take a shouldFlush argument which flushes before retrieving the frame.
Assignee: nobody → enndeakin
Status: NEW → ASSIGNED
Attachment #283469 - Flags: superreview?(bzbarsky)
Attachment #283469 - Flags: review?(bzbarsky)
Flags: blocking1.9? → blocking1.9-
Whiteboard: [wanted-1.9]
Comment on attachment 283469 [details] [diff] [review] flush the frames before showing a popup A flush can run arbitrary script. In particular, the presshell can be dead here after the flush... I assume all consumers are OK with random script running here, right?
Attachment #283469 - Flags: superreview?(bzbarsky)
Attachment #283469 - Flags: superreview-
Attachment #283469 - Flags: review?(bzbarsky)
Attachment #283469 - Flags: review-
(In reply to comment #4) > (From update of attachment 283469 [details] [diff] [review]) > A flush can run arbitrary script. In particular, the presshell can be dead > here after the flush... Ah, yes. So it should be ok to keep a strong reference to the presshell right? > I assume all consumers are OK with random script running here, right? Yes, the callers are expecting synchronous event handling so scripts will already be exected to run.
> Ah, yes. So it should be ok to keep a strong reference to the presshell right? Yeah, I think that should be enough.
Attachment #283469 - Attachment is obsolete: true
Attachment #283761 - Flags: superreview?(bzbarsky)
Attachment #283761 - Flags: review?(bzbarsky)
Comment on attachment 283761 [details] [diff] [review] keep a strong reference to the presshell r+sr=bzbarsky
Attachment #283761 - Flags: superreview?(bzbarsky)
Attachment #283761 - Flags: superreview+
Attachment #283761 - Flags: review?(bzbarsky)
Attachment #283761 - Flags: review+
Attachment #283761 - Flags: approval1.9?
Comment on attachment 283761 [details] [diff] [review] keep a strong reference to the presshell a1.9=dbaron
Attachment #283761 - Flags: approval1.9? → approval1.9+
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Flags: wanted1.9+
Whiteboard: [wanted-1.9]
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: