Closed Bug 1564738 Opened 5 years ago Closed 2 years ago

Missing window controls (minimize, maximize and close buttons) on a window opened as a popup and restored

Categories

(Firefox :: Session Restore, defect, P2)

defect

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox-esr68 --- wontfix
firefox-esr78 --- wontfix
firefox-esr91 --- wontfix
firefox70 --- wontfix
firefox76 --- wontfix
firefox77 --- wontfix
firefox78 --- wontfix
firefox79 --- wontfix
firefox90 --- wontfix
firefox91 --- wontfix
firefox96 --- wontfix
firefox97 --- wontfix
firefox98 --- fixed

People

(Reporter: yuki, Assigned: emk)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression)

Attachments

(3 files, 2 obsolete files)

Steps to reproduce

  1. Start Firefox.
  2. Go to about:config.
  3. Ensure that browser.link.open_newwindow.restriction is 2, not 0.
  4. Hit Ctrl-Shift-K to open the web console below the about:config page.
  5. Enter a script window.open('about:blank?1', '_blank', 'all=yes') and run it.
  6. A popup window is opened without regular UI.
  7. Close the popup window.
  8. Restore the last closed window with Ctrl-Shift-N.

Expected result

A window is restored with regular UI, or restored as a popup window.

Actual result

A window is restored without regular UI and it has no window controls.

Environment

  • Windows 10 Pro 1809
  • Firefox 68.0
  • Nightly 70.0a1, build ID 20190709153742
Attached file mozregression log
I've tried to find the regression window with mozregression, and I've realized that the problem didn't happen on a nightly build of mozilla-central at 2018-03-22 but happens on a build at 2018-03-23. However I couldn't narrow down the window more smaller, due to mozregression's error. The attachment is the log of the regression.

The priority flag is not set for this bug.
:mikedeboer, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(mdeboer)

It'd be great if someone could find the bug that regressed this!

Flags: needinfo?(mdeboer)
Severity: normal → S2
Priority: -- → P2

Regression window(from local cache):
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=5bc910c1f477d8095dcde2c96b7e8639211b9a84&tochange=15b7991887bc8021ba21108c3d31f461fab47a7f

Suspect: 9dd8a5bb9f13de8747538469c749d60b95b812fe Dão Gottwald — Bug 1448286 - Remove redundant gBrowser.tabContainer.updateVisibility call. r=florian

FYI,
After happen the issue, if you run gBrowser.tabContainer.updateVisibility() in Browser toolbox, then the control button reappears.

Regressed by: 1448286
Flags: needinfo?(dao+bmo)
Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Flags: needinfo?(dao+bmo)
See Also: → 1481634

Mike Is this bug still considered S2 and will the team have time to work on this for 79?

Flags: needinfo?(mdeboer)

(In reply to Kim Moir [:kmoir] ET from comment #5)

Mike Is this bug still considered S2 and will the team have time to work on this for 79?

Unclear if we'll have a fix ready for 79 but I'm looking into it.

Flags: needinfo?(mdeboer)

Hi,

I know this issue is old and hasn't been updated in a while but it seems to have been fixed so think we could close it.

Would you mind checking if it still occurs on your end?

Thanks!

Flags: needinfo?(yuki)

This still happens. Environment:

  • Nightly 87.0a1 build ID: 20210215162656
  • Windows 10
Flags: needinfo?(yuki)
  1. nsWindowWatcher::OpenWindow uses argv length to determine if the window being
    opened is a "dialog".

    We currently pass a single empty string argument for session restore, so
    session restored windows are treated as dialogs. This was added in bug 337375
    because "session restore disturbs secondary firefox window sizing", but
    Session Store now tracks and restores window sizes on its own, so this
    shouldn't be required anymore.

    https://searchfox.org/mozilla-central/rev/2aa97aea1085cf1363582725407c514833ad47e4/toolkit/components/windowwatcher/nsWindowWatcher.cpp#291

  2. When calculating chrome flags, if the dialog flag is set, and window features
    includes "all=yes" (which it does for session restore), then we'll set the
    flag to nsIWebBrowserChrome::CHROME_ALL.

    https://searchfox.org/mozilla-central/rev/2aa97aea1085cf1363582725407c514833ad47e4/toolkit/components/windowwatcher/nsWindowWatcher.cpp#1907-1909

  3. When setting up style data for the widget that we're creating, if CHROME_ALL
    is set on the mask, then we set the border style to eBorderStyle_all, instead
    of calculating specific border styles, as we do for windows opened via
    window.open().

    https://searchfox.org/mozilla-central/rev/2aa97aea1085cf1363582725407c514833ad47e4/xpfe/appshell/nsAppShellService.cpp#660-662

Assignee: dao+bmo → kmadan
Attachment #9234032 - Attachment description: WIP: Bug 1564738 - Stop passing argv to openWindow for restored windows, r?annyG → Bug 1564738 - Stop passing arguments to openWindow for restored windows, r?annyG

(In reply to YUKI "Piro" Hiroshi from comment #8)

This still happens. Environment:

  • Nightly 87.0a1 build ID: 20210215162656
  • Windows 10

Also happens on LInux Mint MATE 20.2 and macOS

The attached patch doesn't actually fix some cases (notably bug 1659844 IIRC). I think we'll need to track the original window.arguments and use that in the Services.ww.openWindow() call when opening a window for session restore. There was some chat about this in the #fission channel on Matrix.

Edit: per discussion, Session Restore may just need to track more window features here, and use those when opening the new window for restore.

Assignee: kmadan → nobody
Status: ASSIGNED → NEW
Attachment #9234032 - Attachment is obsolete: true
Blocks: 1516819

The regressing bug (bug 1448286) removed a redundant call to
gBrowser.tabContainer.updateVisibility. It appears that removed call was
necessary for restoring the tabbar of windows that were originally opened as
dialogs.

In D53692, we tried to avoid the extra cost of removing and readding the tab if
we were restoring a single-tabbed window, but it turns out that it's required to
get around the above.

Assignee: nobody → kmadan
Status: NEW → ASSIGNED
Attachment #9239184 - Attachment description: Bug 1564738 - Unconditionally call TabBarVisbility.update() when adding "multiple" tabs, r?Gijs → WIP: Bug 1564738 - Unconditionally call TabBarVisbility.update() when adding "multiple" tabs, r?Gijs
Assignee: kmadan → nobody
Status: ASSIGNED → NEW
Severity: S2 → S3
Has Regression Range: --- → yes
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
Attachment #9239184 - Attachment description: WIP: Bug 1564738 - Unconditionally call TabBarVisbility.update() when adding "multiple" tabs, r?Gijs → Bug 1564738 - Unconditionally call TabBarVisbility.update() when adding "multiple" tabs, r?Gijs
Depends on: 1752901
Pushed by VYV03354@nifty.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/78000a724660
Unconditionally call TabBarVisbility.update() when adding "multiple" tabs, r=Gijs
Backout by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/267258da3564
Backed out changeset 78000a724660 for tab related bc failures. CLOSED TREE
Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e00a268f35f3
Unconditionally call TabBarVisbility.update() when adding "multiple" tabs. r=Gijs CLOSED TREE

The failures in comment 21 may be caused by the changes in Bug 1750070 https://hg.mozilla.org/integration/autoland/rev/f341a77792975d571bc48ebaba38095e7b9ac967 so I relanded this to see if they still happen.

Flags: needinfo?(VYV03354)
Regressions: 1752954
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
Regressions: 1753106
No longer blocks: 1516819

Please backout e00a268f35f3 due to regression (bug 1753106).

I found yet another problem. Initially the maximize is disabled in uBO log window (or comment #0 test window), but it is enabled in the restored window.

Flags: needinfo?(csabou)

Backed out changeset e00a268f35f3 (Bug 1564738) for causing Bug 1753106 as requested by emk.

Backout link: https://hg.mozilla.org/integration/autoland/rev/d5803055f54132f6726d159fead9a926eb9607d3. This will be merged to central later on.

Status: RESOLVED → REOPENED
Flags: needinfo?(csabou)
Resolution: FIXED → ---
Target Milestone: 98 Branch → ---
Attachment #9239184 - Attachment is obsolete: true
Pushed by VYV03354@nifty.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/0b374a002803
Set correct features from the start instead of changing visibity after window creation. r=Gijs
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
Regressions: 1753608

I can still reproduce this in for addon popups in Nightly 98.0a1 as in this bug https://bugzilla.mozilla.org/show_bug.cgi?id=1659844
The window opened with window.open('about:blank?1', '_blank', 'all=yes') and restored with ctrl shift n opens correctly though.

Blocks: 1659844
See Also: 1481634
Blocks: 1728800
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: