WebPlatformForEmbedded / WPEWebKit

WPE WebKit port (downstream)
213 stars 136 forks source link

[WPE 2.38] Black blink before background image is loading in oneplus app #1207

Closed jakub-gocol-red closed 7 months ago

jakub-gocol-red commented 11 months ago

Reproduction steps

  1. Open oneplus app (https://stv.oneplus.ch/home/hero/1649428)
  2. If you receive 403, switch user agent to Mozilla/5.0 (Linux armv7l) AppleWebKit/602.1.28+ (KHTML, like Gecko) Version/9.1 Safari/601.5.17 HZN/5.07 (MN=VIP7002W-DEV;PC=APPSTB;FV=VIP7002W-wpe-dbg-06.02-000-aa-AL-20230831210000-un000;)
  3. Scroll thumbnails left/right and observe background image

Expected behaviour

Background is switched immediately, without black screen, as on wpe2.22

Actual behaviour

There's black background when switching from old to new image

Notes

Video with comparison of wpe 2.22 and 2.38

https://github.com/WebPlatformForEmbedded/WPEWebKit/assets/93707234/de634b45-6924-4e3b-8028-af3c506b98a6

App doesn't require credentials for reproduction.

magomez commented 9 months ago

I haven't looked into it, but the black frame is probably coming from the async decoding of large images, which paints a transparent placeholder while the image is being decoded, and paints the images when they are available.

magomez commented 7 months ago

@jakub-gocol-red can you give this patch a test? It disables async decoding of large images, which removes the problem for me on the rpi. This is disabled in 2.22 and that's probably because the black blink doesn't happen there.

disable-async-decoding-for-large-images.patch.txt

janani-balasubramanian-infosys commented 7 months ago

@magomez The black blink issue is not seen after making the changes from the patch file attached. The images are loading without black screen pop-up.

magomez commented 7 months ago

I've just pushed the fix to the wpe-2.38 branch. Please verify that the problem is fixed and close this. Thanks!

magomez commented 7 months ago

I've just pushed the fix to the wpe-2.38 branch. Please verify that the problem is fixed and close this. Thanks!

On second thought, the change is the same that was already verified, so I'll close this myself. Please reopen if for some reason the problem persists.