[Webkit-unassigned] [Bug 226221] Img rendering skips multiple frames resulting white flash

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 26 11:12:11 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=226221

--- Comment #3 from Roland Soos <roland at nextendweb.com> ---
Said Abou-Hallawa: That example was only just a theory. Yes, I can do the following:
image.decode().then(function(){
  requestAnimationFrame(function(){
    showNextImage();
    setTimeout(hideLastImage, 500);
  });
});

Poetical question: What is the right timeout to hide the last image to avoid white area? -> The image.decode() promise should indicate when an image can be rendered and when fulfilled we want that image to show in the next frame, right? Or else I can accept if that promise get fulfilled later when the image ready to render. It is not acceptable to get an empty area for a few frame when the promise fulfilled. This is how the specs describe it: https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element:dom-animationframeprovider-requestanimationframe


That loading="lazy" attribute gets changed by JavaScript to "eager". Also I can see on my testcase in the network tab that the next image loaded, also the image.decode() promise is fulfilled and still there is a white flash which shouldn't.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210526/6e0ee805/attachment-0001.htm>


More information about the webkit-unassigned mailing list