Closed Bug 1880323 Opened 9 months ago Closed 9 months ago

Moving the last tab of a window to another window hides its contents

Categories

(Core :: Widget: Gtk, defect, P2)

Firefox 124
Desktop
Linux
defect

Tracking

()

VERIFIED FIXED
125 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox122 --- unaffected
firefox123 --- unaffected
firefox124 --- verified
firefox125 --- verified

People

(Reporter: tgnff242, Assigned: stransky)

References

(Regression)

Details

(Keywords: nightly-community, regression)

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:124.0) Gecko/20100101 Firefox/124.0

Steps to reproduce:

  1. Open a URL, eg. https://bugzilla.mozilla.org, in a new window. It should be the only tab of the window.
  2. Move its tab to another, pre-existing window.

KDE, X11.

Actual results:

The contents of the tab are not displayed any more.

Expected results:

This was introduced in Bug 1875369.

https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=0efc1d8b9bd6dc8d8e6947435a0540b229062c57&tochange=039d034ac81d93d29151bc8bf573999eca8d9200

Has STR: --- → yes
OS: Unspecified → Linux
Regressed by: 1875369
Hardware: Unspecified → Desktop

:stransky, since you are the author of the regressor, bug 1875369, could you take a look?

For more information, please visit BugBot documentation.

Flags: needinfo?(stransky)
Status: UNCONFIRMED → NEW
Ever confirmed: true

An error in Browser Console when drop the tab:

InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable AboutNewTabParent.sys.mjs:28
    handleEvent resource:///actors/AboutNewTabParent.sys.mjs:28
    swapDocShells chrome://global/content/elements/browser-custom-element.js:1577
    _swapBrowserDocShells chrome://browser/content/tabbrowser.js:4749
    swapBrowsersAndCloseOther chrome://browser/content/tabbrowser.js:4634
    adoptTab chrome://browser/content/tabbrowser.js:5163
    on_drop chrome://browser/content/tabbrowser-tabs.js:808
    handleEvent chrome://browser/content/tabbrowser-tabs.js:1853

I do see that on Wayland too, Thanks.

Assignee: nobody → stransky
Flags: needinfo?(stransky)
Priority: -- → P2

It's a regression from https://phabricator.services.mozilla.com/D199085 will look at it.

Flags: needinfo?(stransky)

It's caused by window->DisableRendering(); line at moz_container_unmap(). May we share compositor widget here?

See Also: → 1880650

Looks like caused by early mCompositorSession->Shutdown(); call on the windows which is going to be closed. If the tab is just copied we don't see such error. I wonder if we shutdown something related to puppet window or IPC channel so the reparented content page rendering is broken.

It doesn't affect in-process rendered pages line about:support and so.

Duplicate of this bug: 1880650
See Also: → 1880781

Right now we destroy layer managed when nsWindow becomes hidden.
It makes sure that window rendering queue is suspended and invalid wl_surface is not used any more.
But it's also expensive operation and we need to create layer manager again if the window becomes visible again.
It also introduces a regression it tab is reparented and remairing nsWindow is closed.
In such case rendering pipeline is deleted and reparented tab is empty as associated rendering resources are already freed.

In this patch we don't delete layer manager on window hide but rather keep that operation to nsWindow::Destroy() as we do before.
Instead force GL backend to create small fallback EGLSurface for hidden nsWindow and keep potential async rendering running
until the window is deleted.

Flags: needinfo?(stransky)

Set release status flags based on info from the regressing bug 1875369

Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/fdcedb217978 [Linux] Don't destroy layer manager at DisableRendering() r=emilio
See Also: → 1881208
Regressions: 1881476

Backout for causing failures in nsWindow.cpp.

Flags: needinfo?(stransky)
  • Implement nsWindow::SetTitlebarRect() and update titlebar area when nsWindow is resized.
  • Make GetTitlebarRect() to only return value calculated at SetTitlebarRect().
  • Protect both by mutex to make it thread safe.

Depends on D202179

Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/0e6c8078c017 [Linux] Don't destroy layer manager at DisableRendering() r=emilio https://hg.mozilla.org/integration/autoland/rev/7346a5d91e93 [Linux] Make nsWindow::GetTitlebarRect() thread safe r=emilio

Should be covered now.

Flags: needinfo?(stransky)
See Also: → 1849662
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
Status: RESOLVED → VERIFIED
Duplicate of this bug: 1881476

The work in Bug 1875369 had fixed Bug 1730819 which has regressed again after the fix in this (1880323) bug. Was either of those intentional?

Flags: needinfo?(stransky)

(In reply to tgn-ff from comment #17)

The work in Bug 1875369 had fixed Bug 1730819 which has regressed again after the fix in this (1880323) bug. Was either of those intentional?

Bug 1730819 is regressed by this one, right? Yes, that's expected.
I can create a specific patch to release compositor for popups only but we need something general to go with beta now.

Flags: needinfo?(stransky)

Comment on attachment 9380902 [details]
Bug 1880323 [Linux] Don't destroy layer manager at DisableRendering() r?emilio

Beta/Release Uplift Approval Request

  • User impact if declined: Missing page content if tab is moved between browsers.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: 1) Open a URL, eg. https://bugzilla.mozilla.org, in a new window. It should be the only tab of the window.
  1. Move its tab to another, pre-existing window.
  2. Moved tab should have content and should not be blank.
  • List of other uplifts needed: None
  • Risk to taking this patch: Medium
  • Why is the change risky/not risky? (and alternatives if risky): Changes window rendering shutdown sequence and leaves compositor opened until window destroy. It partially backouts Bug 1875369.
  • String changes made/needed:
  • Is Android affected?: No
Attachment #9380902 - Flags: approval-mozilla-beta?
Attachment #9382269 - Flags: approval-mozilla-beta?

Comment on attachment 9380902 [details]
Bug 1880323 [Linux] Don't destroy layer manager at DisableRendering() r?emilio

Approved for 124.0b5

Attachment #9380902 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9382269 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

Reproduced the issue with Firefox 124.0a1 (2024-02-14) on Ubuntu 23.10 with Wayland using steps from comment 20. The moved tab has blank content.
The issue is verified fixed with Firefox 125.0a1 (2024-02-27) and 124.0b5 treeherder build from comment 22 on Ubuntu 23.10 (Wayland and X11) and Ubuntu 22.04 (Wayland). The moved tab is correctly displayed after following steps from comment 20.

QA Whiteboard: [qa-triaged]
Flags: qe-verify+
Regressions: 1882580
Regressions: 1883729
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: