Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F39: wxWebView draws text with the background color -> "invisible" page #24496

Open
JoergHW opened this issue Apr 21, 2024 · 8 comments
Open
Labels

Comments

@JoergHW
Copy link

JoergHW commented Apr 21, 2024

Description

Bug description:

The rendering of wxWebView per default has either ForegroundColour = BackgroundColour set or does not respect color.
Additionally I tried to convince the renderer to use a colour, but failed.
Using

  m_browser->SetPage
              (
               "<html><title>New Page</title>"
               "<body><h1 style=\"color:skyblue\">Page header</h1><p style=\"color:red;\">Created </p>using <tt>SetPage()</tt> method.</body></html>",  
               wxString()
              );

or

    m_browser->SetPage
               (
                "<html><title>New Page</title>"
                "<body><font color=\"red\">Created </font>using <tt>SetPage()</tt> method.</body></html>",
                wxString()
               );

instead of the original plain text, it did not make anything visible either. Just black on black.

Expected vs observed behaviour:

Expected: Text from a "web page" is visible.
Observed: Text is there (check with copy & paste), but the foreground and background are identical, so it is invisible.

Stack trace:

not relevant

Patch or snippet allowing to reproduce the problem:

samples/webview

To Reproduce:

  1. start samples/webview/webview
  2. Click on 'menu -> Set Page'
  3. Observe

Platform and version information

  • wxWidgets version: 3.2.4
  • wxWidgets port: wxGTK
  • OS and its version: Fedora 39
    • GTK version: 3.24.41
    • Which GDK backend is used: X11
    • Desktop environment: Gnome
    • Current theme: Default + Dark
@JoergHW JoergHW changed the title F39: wxWebView draws text with the background color -> "invisble" page F39: wxWebView draws text with the background color -> "invisible" page Apr 21, 2024
@JoergHW
Copy link
Author

JoergHW commented Apr 21, 2024

Downloaded wxWidgets-3.2.4 and build locally:
../configure --with-gtk --disable-tests --enable-webview --enable-webviewwebkit --disable-webviewedge --disable-webviewie --without-nanosvg --enable-debug_gdb --enable-debug

@vadz
Copy link
Contributor

vadz commented Apr 22, 2024

I don't see the problem running GTK_THEME=Adwaita:dark ./webview in master: the page is visible, but it also still uses the light mode, i.e. black on white text:

image

This might be due to WebViewGtk version difference, I wonder which one does Fedora 39 use?

@JoergHW
Copy link
Author

JoergHW commented Apr 22, 2024

@vadz Tried it your way, did not change anything. The details about the render backend are slightly covered, sorry. I have installed:
webkit2gtk4.1-2.44.0-2.fc39.x86_64.rpm
webkit2gtk4.1-devel-2.44.0-2.fc39.x86_64.rpm
webkitgtk6.0-2.44.0-2.fc39.x86_64.rpm

image

@vadz
Copy link
Contributor

vadz commented Apr 22, 2024

It could be that WebKitGtk 2.44 has implemented support for dark mode missing in my 2.42 and this breaks this somehow... Sorry, I really don't have time to debug this now.

@vadz vadz added GTK dark mode MSW dark mode implementation labels Apr 22, 2024
@JoergHW
Copy link
Author

JoergHW commented Apr 22, 2024

light mode does not work better:
image

Take your time ...

@vadz
Copy link
Contributor

vadz commented Apr 22, 2024

This is really unexpected, it really looks like 2.44 broke compatibility in some way.

We probably need to start by looking at their changelog.

@vadz vadz removed the dark mode MSW dark mode implementation label Apr 22, 2024
@paulcor
Copy link
Contributor

paulcor commented Apr 24, 2024

It works fine for me on Fedora 39 with the exact same webkit2gtk4.1-2.44.0-2.fc39.x86_64. Maybe something to do with that "unable to construct a complete frambuffer" message.

@JoergHW
Copy link
Author

JoergHW commented May 5, 2024

Needed to upgrade to F40 for some reason. Tried the compiled example WITHOUT modification and it works now.
18:30:55: Backend: wxWebViewWebKit Version: webkit2 2.44.1
18:30:55: User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15
The package names between F39 and F40 do not show a difference in version numbering:
webkit2gtk4.1-2.44.1-1.fc40.x86_64.rpm
webkit2gtk4.1-2.44.1-1.fc39.x86_64.rpm
Could it be some kind of "global" configuration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants