WebPlatformForEmbedded / WPEWebKit

WPE WebKit port (downstream)
211 stars 135 forks source link

Body background image is not rendered #1249

Closed filipe-norte-red closed 4 months ago

filipe-norte-red commented 8 months ago

Under some circumstances, a background image set for the body element does not render on screen. The attached tests.zip contains the example page "test.image.html" that reproduces the issue as follows:

In a working case, screen background is set to blue (image) with a green rectangle on bottom right corner and a small video window in the top left corner: ok

In the non-working case, the background remains black: nok

The difference between the working case and non-working case is the z-index of the "videoDiv" div element that is set to 1 for the working case (see comments inside the html file for reference).

This issue is observed with wpe.2.38 and and 2.28. Observed on Amlogic and Realtek platforms.

Additional observations:

tests.zip

filipe-norte-red commented 8 months ago

Additional note: Currently, background color is being set as follows for the webview on startup:

WebKitColor transparent = { 0.0f, 0.0f, 0.0f, 0.0f };                                                                                                                                                                                                                                                               
webkit_web_view_set_background_color(m_view, &transparent); 

If this configuration / call is not done, test.color.html renders correctly

modeveci commented 8 months ago

@magomez , I know you are working on this. As further details, we need a solution for 2.28 as well, because it is a blocker for HBBTV certification. FYI

magomez commented 8 months ago

This is a bug that affects all ports upstream. I've opened https://bugs.webkit.org/show_bug.cgi?id=266478 to handle it.

filipe-norte-red commented 8 months ago

Thanks, @magomez , for the help with this issue (an others)! Is it possible to raise the priority on the upstream ticket as this affects hbbtv cert? Thanks

CC: @emutavchi

magomez commented 7 months ago

Wow this is is tricky issue. Not only it reproduces in all the versions, but also the problem is not exactly the same in each of them, as the code has been changing a lot. This needs to be properly fixed upstream, but I think I've been able to create a patch to workaround the problem for 2.38. @filipe-norte-red can you give this patch a test? It fixes the test cases you attached on my side.

1249.patch.txt

magomez commented 7 months ago

The patch is for 2.38 BTW. If it works I'll check how to do something similar for 2.28.

filipe-norte-red commented 7 months ago

Thank you, @magomez for the investigation and patch! I tried it with the original use cases and it solved the issue. Did a bit more testing on some apps and running some other test cases and did not notice any obvious regressions with these changes. Would it be viable to merge the patch to 2.38 branch from your end?

magomez commented 7 months ago

@filipe-norte-red I've just commited and pushed the patch to the wpe-2.38 and wpe-2.28 branches. I wasn't able to reproduce the issue on 2.28 on the rpi even with the patch, but I hope it will fix the problem on your side anyway. I've also ported this to 2.42 and pushed it as well, so it doesn't bother us when upgrading to the new release.

Please verify that everything is ok and close this if that's the case. Thanks!

magomez commented 6 months ago

Do we have any feedback about this? Is the problem solved and the issue can be closed?

filipe-norte-red commented 6 months ago

Apologies for the late reply, @magomez . Yes, I confirm it is solved on 2.38. I was not able to confirm it on 2.28 yet. Will try to confirm it in the next days.

modeveci commented 4 months ago

@filipe-norte-red As it is solved and confirmed on 2.38, and no update for 2.28. I am closing this ticket for now. Feel free to re-open if it is needed. Regards