Support eWindowType_child type properly
Categories
(Core :: Widget: Gtk, defect, P2)
Tracking
()
People
(Reporter: darktrojan, Assigned: stransky)
References
(Regression)
Details
(Keywords: correctness, regression)
Attachments
(2 files)
To reproduce, run this code in the devtools:
Services.ww.openWindow(null, "about:mozilla", "_blank", "popup,width=800,height=600", Services.ww)
With https://hg.mozilla.org/mozilla-central/rev/0805c499107891ed6bc2037260636e0d5f490406, the window contents aren't drawn, just the drop shadow where the window should be. Without it, the window's drawn as expected.
I have mesa 21.0.3.
Comment hidden (obsolete) |
Updated•3 years ago
|
Updated•3 years ago
|
Comment 2•3 years ago
•
|
||
Debian Testing, Gnome Xwayland, Intel, Mesa 21.2.1 from unstable
Firefox STR:
- Open Main menu > More Tools > Browser console (devtools.chrome.enabled:true is needed to be able to run commands).
- Paste and press Enter:
Services.ww.openWindow(null, "about:mozilla", "_blank", "popup,width=800,height=600", Services.ww)
- a) With GLX, about:mozilla appears in the top left corner of my desktop without UI or window borders.
mozregression --launch 2021-09-15 --pref devtools.chrome.enabled:true gfx.webrender.all:true gfx.x11-egl.force-disabled:true
b) With EGL, nothing happens.
MOZ_X11_EGL=1 mozregression --launch 2021-09-15 --pref devtools.chrome.enabled:true gfx.webrender.all:true
The problem did not occur right after initial EGL support (bug 1640048):
Main menu > Web Developer > Browser console:
Services.ww.openWindow(null, "about:mozilla", "_blank", "popup,width=800,height=600", Services.ww)
MOZ_DISABLE_CONTENT_SANDBOX=1 MOZ_X11_EGL=1 mozregression --launch 2020-07-02 --pref devtools.chrome.enabled:true gfx.webrender.all:true
MOZ_DISABLE_CONTENT_SANDBOX=1 MOZ_X11_EGL=1 mozregression --good 2020-07-02 --bad 2021-09-15 --pref devtools.chrome.enabled:true gfx.webrender.all:true
8:38.66 INFO: Last good revision: de1a1b350e9e0fb606cc7f5b709df544af8dd313
8:38.66 INFO: First bad revision: 52299c7cbec44f2fe75273acdf2aed8e2496931c
8:38.66 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=de1a1b350e9e0fb606cc7f5b709df544af8dd313&tochange=52299c7cbec44f2fe75273acdf2aed8e2496931c
52299c7cbec44f2fe75273acdf2aed8e2496931c stransky — Bug 1684194 [Linux] Use RenderCompositorEGL on X11/EGL, r=sotaro
Comment 3•3 years ago
|
||
I wonder if there are tests that could have catched this - unfortunately we're currently flying blindly on EGL until the CI images get updated (also good for Wayland). OTOH, I hope there won't be that many bugs that only happen on EGL and not GLX - and are not covered by Android tests already.
Comment 4•3 years ago
|
||
RenderCompositorEGL
But the problem does not occur with Wayland:
MOZ_ENABLE_WAYLAND=1 mozregression --launch 2021-09-15 --pref devtools.chrome.enabled:true gfx.webrender.all:true
Comment 5•3 years ago
|
||
The problem does not occur with WebRender (Software OpenGL)
:
MOZ_X11_EGL=1 mozregression --launch 2021-09-15 --pref devtools.chrome.enabled:true gfx.webrender.all:true gfx.webrender.software:true gfx.webrender.software.opengl:true
This one enforces software 60 Hz, disables bug 1635451, bug 1697053, but it does not help:
MOZ_X11_EGL=1 mozregression --launch 2021-09-15 --pref devtools.chrome.enabled:true gfx.webrender.all:true layout.frame_rate:60 widget.dmabuf-webgl.enabled:false dom.ipc.avoid-gtk:false widget.non-native-theme.enabled:false widget.content.allow-gtk-dark-theme:false
Comment 6•3 years ago
|
||
(In reply to Darkspirit from comment #5)
The problem does not occur with
WebRender (Software OpenGL)
:
MOZ_X11_EGL=1 mozregression --launch 2021-09-15 --pref devtools.chrome.enabled:true gfx.webrender.all:true gfx.webrender.software:true gfx.webrender.software.opengl:true
Right after executing Services.ww.openWindow(null, "about:mozilla", "_blank", "popup,width=800,height=600", Services.ww)
the browser console says:
OpenGL compositor Initialized Succesfully.
Version: 4.6 (Compatibility Profile) Mesa 21.2.1
Vendor: Intel
Renderer: Mesa Intel(R) Iris(R) Graphics 6100 (BDW GT3)
FBO Texture Target: TEXTURE_2D
It does not when trying regular WebRender.
Comment 7•3 years ago
•
|
||
WebRender (Software OpenGL)
is not affected by this bug because it apparently does not use RenderCompositorEGL
yet.
Yes, SW WR OpenGL is affected by bug 1635186 on EGL/Xwayland while regular WR is not anymore.
MOZ_X11_EGL=1 mozregression --launch 2021-09-15 --pref devtools.chrome.enabled:true gfx.webrender.all:true gfx.webrender.software:true gfx.webrender.software.opengl:true -a https://www.vsynctester.com/ -a https://www.vsynctester.com/
Comment 8•3 years ago
•
|
||
Main menu and toolbar panels seem to have the same problem if gfx.webrender.unaccelerated-widget.force is true. (bug 1719898)
Do they really run into the same problem?
Comment hidden (typo) |
Comment hidden (typo) |
Comment hidden (typo) |
Comment 13•3 years ago
|
||
I'm just a voluntary tester, my Phabricator account is still banned since my BMO account was temporarily auto-banned due to a mail server problem.
Workaround: You could use a dialog, it has been fixed in bug 1695822:
Services.ww.openWindow(null, "about:mozilla", "_blank", "dialog,width=800,height=600", Services.ww)
Reporter | ||
Comment 14•3 years ago
|
||
I didn't realise you were a volunteer. It's hard to tell who is and who isn't. Thanks for your help.
:aosmond, any help? I was in the middle of developing something using a pop-up window (specifically because it has no titlebar or controls), and now I'm stuck. :-(
Comment 15•3 years ago
|
||
(In reply to Geoff Lankow (:darktrojan) from comment #14)
:aosmond, any help? I was in the middle of developing something using a pop-up window (specifically because it has no titlebar or controls), and now I'm stuck. :-(
Doesn't gfx.x11-egl.force-disabled:true
work around the issue?
Reporter | ||
Comment 16•3 years ago
|
||
It does, but that doesn't help when it comes to deploying the window to all of our users. I'm assuming I'm not the only one with this problem.
Comment 17•3 years ago
|
||
(In reply to Geoff Lankow (:darktrojan) from comment #16)
It does, but that doesn't help when it comes to deploying the window to all of our users. I'm assuming I'm not the only one with this problem.
Sure - but it won't stop you from working on it :)
Anyhow, will look into it today - it's one of the only known mesa regressions with EGL (if not the only one).
Comment 18•3 years ago
|
||
So the issue is that the the content of the popup is not remote content (HasRemoteContent() => false
) - thus bug 1719898 is indeed related / likely has the same root problem. A workaround would be trivial, but I'm now digging into it.
Comment 19•3 years ago
|
||
Gnome Xwayland, Debian Testing, Intel
STR
- Alt+Shift+J
- paste
Services.ww.openWindow(null, "about:mozilla", "_blank", "popup,width=800,height=600", Services.ww)
mozregression --launch 2021-09-29 --pref devtools.chrome.enabled:true
ChromeWindow about:blank
= invisible/transparent window, it prevents me from clicking/hovering things underneath it
try build from bug 1677314 comment 5:
mozregression --repo try --launch 5d2f2e7daeb2cddb8d7ccbb0f68d6f8f984087b1 --pref devtools.chrome.enabled:true
NS_ERROR_XPC_BAD_CONVERT_NATIVE: Could not convert Native argument arg 0 [nsIDocShell.domWindow] browsing-context.js:1775
null
= no window at all and this error
Comment 20•3 years ago
|
||
Currently child windows do not show up in this configuration and it's
not clear yet what the root cause of the issue is.
As we want to ship X11/EGL by default in 94, work around the issue
for now.
Updated•3 years ago
|
Comment 21•3 years ago
|
||
Assignee | ||
Comment 22•3 years ago
|
||
I don't believe this is a correct fix. eWindowType_child is used for nested windows (like plugins) and are not used (or should not be used). When such window appears on Linux it looks like bug. I'm going to remove such window types from Gtk toolkit code in Firefox 95.
For proper fix I'd need widget log, so please run Firefox with MOZ_LOG="Widget:5", reproduce the issue and attach the log here.
Thanks.
Assignee | ||
Comment 23•3 years ago
|
||
Robert, we can always uplift important patches to beta, especially in early beta stages so please do not land patches without review especially at end of development cycle.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 24•3 years ago
|
||
Darkspirit,
can you please run Firefox with:
MOZ_LOG="Widget:5, WidgetPopup:5"
and attach the log here?
Thanks.
Comment 25•3 years ago
|
||
- Pressed Ctrl+Shift+J
- Pasted
Services.ww.openWindow(null, "about:mozilla", "_blank", "popup,width=800,height=600", Services.ww)
- Waited a moment, pressed enter
- Ctrl+C
MOZ_LOG="Widget:5, WidgetPopup:5" mozregression --launch 2021-09-29 --pref gfx.webrender.all:true gfx.x11-egl.force-enabled:true devtools.chrome.enabled:true -P stdout > bug1730822widget.txt
Comment 26•3 years ago
|
||
Robert, we can always uplift important patches to beta, especially in early beta stages so please do not land patches without review especially at end of development cycle.
Right, sorry :/
I'm going to remove such window types from Gtk toolkit code in Firefox 95.
That's good to hear, it appears to be very buggy in many regards.
eWindowType_child is used for nested windows (like plugins) and are not used (or should not be used).
Ah I see. In that case it's not really a EGL bug IIUC, but something deeper that just happened to work on GLX. With the patch I just wanted to avoid regressions because of EGL for now - I suppose if you remove eWindowType_child
in 95, then you'll have to properly fix this case anyway.
Assignee | ||
Comment 27•3 years ago
|
||
With the tescase I'm getting:
(firefox:17980): Gtk-CRITICAL **: 16:18:31.540: gtk_widget_get_window: assertion 'GTK_IS_WIDGET (widget)' failed
and backtrace is:
#1 0x00007ff5aa367903 in g_log () at /lib64/libglib-2.0.so.0
#2 0x00007ff5ab1d7db9 in gtk_widget_get_window (widget=0x0) at /usr/src/debug/gtk3-3.24.30-1.1.fc34.x86_64/gtk/gtkwidget.c:16027
#3 0x00007ff5a5ccfb00 in nsWindow::Create(nsIWidget*, void*, mozilla::gfx::IntRectTyped<mozilla::LayoutDevicePixel> const&, nsWidgetInitData*) ()
at /home/komat/Programy/firefox-nightly/libxul.so
#4 0x00007ff5a2bb5a00 in nsBaseWidget::CreateChild(mozilla::gfx::IntRectTyped<mozilla::LayoutDevicePixel> const&, nsWidgetInitData*, bool) ()
at /home/komat/Programy/firefox-nightly/libxul.so
#5 0x00007ff5a5c99cd8 in nsView::CreateWidgetForParent(nsIWidget*, nsWidgetInitData*, bool, bool) () at /home/komat/Programy/firefox-nightly/libxul.so
#6 0x00007ff5a5d5de34 in nsDocumentViewer::MakeWindow(nsSize const&, nsView*) () at /home/komat/Programy/firefox-nightly/libxul.so
#7 0x00007ff5a5d5d3e8 in nsDocumentViewer::InitInternal(nsIWidget*, nsISupports*, mozilla::dom::WindowGlobalChild*, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, bool, bool, bool) () at /home/komat/Programy/firefox-nightly/libxul.so
#8 0x00007ff5a5d5d1db in nsDocumentViewer::Init(nsIWidget*, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, mozilla::dom::WindowGlobalChild*) ()
We're clearly creating a window which is wrongly configured. I'll look at it today.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 29•3 years ago
|
||
btw. This is not related to EGL, happens as well as with GLX.
Assignee | ||
Updated•3 years ago
|
Comment 30•3 years ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #29)
btw. This is not related to EGL, happens as well as with GLX.
Can't confirm.
I still can't reproduce the problem with GLX/Xwayland. The red about:mozilla page shows up in the top-left corner of my desktop.
good: mozregression --launch 2021-09-29 --pref gfx.webrender.all:true gfx.x11-egl.force-disabled:true devtools.chrome.enabled:true -P stdout
I can reproduce this only with EGL/Xwayland. (bug 1695933 made it possible to ship WR on Xwayland (bug 1730671) because it doesn't run into bug 1635186 comment 49.)
bad: mozregression --launch 2021-09-29 --pref gfx.webrender.all:true gfx.x11-egl.force-enabled:true devtools.chrome.enabled:true -P stdout
Assignee | ||
Comment 31•3 years ago
|
||
(In reply to Darkspirit from comment #30)
(In reply to Martin Stránský [:stransky] (ni? me) from comment #29)
I still can't reproduce the problem with GLX/Xwayland. The red about:mozilla page shows up in the top-left corner of my desktop.
good: mozregression --launch 2021-09-29 --pref gfx.webrender.all:true gfx.x11-egl.force-disabled:true devtools.chrome.enabled:true -P stdoutI can reproduce this only with EGL/Xwayland. (bug 1695933 made it possible to ship WR on Xwayland (bug 1730671) because it doesn't run into bug 1635186 comment 49.)
bad: mozregression --launch 2021-09-29 --pref gfx.webrender.all:true gfx.x11-egl.force-enabled:true devtools.chrome.enabled:true -P stdout
Well, it may or may not work - the eWindowType_child setup is a bit random.
Assignee | ||
Updated•3 years ago
|
Comment 32•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 33•3 years ago
|
||
eWindowType_child needs bigger rework so let's wait to FF95 cycle. I'm not aware of any usage anyway. The testcase here is a bit special as parent window is not specified and we try to attach new popup to hidden window and link that by GdkWindow. We should create such window as toplevel but it needs more work as simple switch to eWindowType_toplevel type makes the window irresponsible.
Updated•3 years ago
|
Assignee | ||
Comment 34•3 years ago
|
||
This should work now.
Comment 35•3 years ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #34)
This should work now.
Can this bug be closed?
Comment 36•3 years ago
|
||
STR:
(Darkspirit from comment #25)
- Pressed Ctrl+Shift+J
- Pasted
Services.ww.openWindow(null, "about:mozilla", "_blank", "popup,width=800,height=600", Services.ww)
- Waited a moment, pressed enter
- comment 32 merged a workaround for 94 ("Disable HW-WR for child windows on X11/EGL").
- bug 1736377 comment 3 removed the workaround in 95. The bug was fixed.
mozregression --repo autoland --launch cd81b08e7ef2 --pref gfx.webrender.all:true gfx.x11-egl.force-enabled:true devtools.chrome.enabled:true -P stdout
Updated•3 years ago
|
Updated•3 years ago
|
Description
•