Closed Bug 159410 Opened 23 years ago Closed 22 years ago

Popup windows do an ugly resize flash when shown, and can have unnecessary scrollbars

Categories

(Camino Graveyard :: General, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
Camino0.9

People

(Reporter: sfraser_bugs, Assigned: sfraser_bugs)

References

Details

Attachments

(3 files)

when requested to show popup windows (with a window.open()), Chimera does an ugly show-then-resize, and makes the window the wrong size (so that scroll bars are shown when they should not be).
Attached image Test image for testcase
Status: NEW → ASSIGNED
Target Milestone: --- → Chimera0.5
this is caused by our good friend -runModalSession: which calls makeKeyAndOrderFront: on the window so we end up showing it before we're really ready for it. the only way i can see to get around this is to have BrowserWindow override makeKeyAndOrderFront: and pick out the case with some member flags where we're calling it from that. that won't be easy, though.
Keywords: helpwanted
Target Milestone: Chimera0.5 → Chimera0.6
*** Bug 164102 has been marked as a duplicate of this bug. ***
ok, this is kicking my butt. i tried doing a lot of work to get around the fact that the modal loop is showing the window, pushing it offscreen and bringing it back on later, but that broke other things. i also tried to suppress the show during the modal loop but that didn't work either. i'm stumped, short of coming up with a way to actually get rid of this modal loop. we may have to burn an incident with apple. aaarrrrgh! :(
Target Milestone: Chimera0.6 → Chimera0.9
There's a really simple way to force the window nib loading to be synchronous: BrowserWindowController* browser = [[BrowserWindowController alloc] initWithWindowNibName: @"BrowserWindow"]; + [browser window]; // force sync window loading then we can ditch all that skanky modal session stuff.
Taking.
Assignee: pinkerton → sfraser
Status: ASSIGNED → NEW
This patch eliminates the modal session stuff, which we don't need if we force synchronous window creation after allocating the window controller with a call to [winController window]. Now that we don't have enterModalSession to show the window for us, we have to rely on gecko calling CHBrowserListener::SetVisibility() (which is will, after resizing the window). CHBrowserListener::SetVisibility() in turn needed fixing so that windows loaded in the background don't pop to the front when gecko focusses their contents. I use a flag on the browser window to determine whether SetVisibility() should order the window to the front or not. Note that you'll want the patch in bug 178010 to prevent pages that focus a form element (e.g. google.com) from bringing background windows to the front on load.
Status: NEW → ASSIGNED
Keywords: helpwanted
I think we also want this change in GetVisibility(): /* attribute boolean visibility; */ NS_IMETHODIMP CHBrowserListener::GetVisibility(PRBool *aVisibility) { NS_ENSURE_ARG_POINTER(aVisibility); if (!mView) { return NS_ERROR_FAILURE; } NSWindow* window = [mView window]; if (!window) { return NS_ERROR_FAILURE; } - *aVisibility = [window isMiniaturized]; + *aVisibility = [window isVisible]; return NS_OK; }
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
*** Bug 178587 has been marked as a duplicate of this bug. ***
*** Bug 168486 has been marked as a duplicate of this bug. ***
QA Contact: winnie → sairuh
vrfy'd fixed, mostly: no longer get the nasty flashing resize, but small popups still have scrollbars. filed bug 180406 for that. tested on 10.2.2 with 2002.11.15.04.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: