Open Bug 1348447 Opened 3 years ago Updated Last year

Image blink on src change, even after image has been preloaded


(Core :: Layout: Images, Video, and HTML Frames, defect)

52 Branch
Not set




(Reporter: diz2html, Unassigned)


User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36

Steps to reproduce:

Resize image with javascript. (width, height, top, left)
Once animation is finished, create new image and preload it with javascript. (var img = new Image(); img.onload = function(){} ....)
Once image is preloaded, update image src in html.
See image lagging, blinking, and behaving inconsistent. (Though not always.)
I even implemented hack where i use cloned image, with previous loaded image src, and it helped, but don't work all the time

Please note in 51 version, the same code caused "image corrupt or truncated" error which i can see was fixed in 52, which is good, but still would be great to fix blinking bug, as many people are referencing it.

Also i'v noticed that it is almost impossible to reproduce the bug on OSX Firefox 52v 64 bit.

But it is well reproduced on Windows 52 v, 32 bit.

Other browsers like Chrome, Safari, IE are fine.

Actual results:

The actual process:

Working demo and steps to reproduce the bug:

Click on image in carousel, to enter fullscreen carousel mode.
Click on the "+" button in the right bottom corner
Click again and again. try to reproduce bug.
If bug is not reproduced, click "-" icon,  and again, if not reproduced.
It often happens on zoom out, even though the src of zoomed out image is not even updated, which is really strange.

Expected results:

The image shouldn't blink on zoom in when src is changed.
the image shouldn't blink on zoom out, when src is not changed.
Component: Untriaged → Layout: Images
Product: Firefox → Core
Ever confirmed: true
Product: Core → Core Graveyard
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.