Color flickering when changing the wave color at https://wavier.art/
Categories
(Core :: Layout: Images, Video, and HTML Frames, defect)
Tracking
()
People
(Reporter: itiel_yn8, Unassigned)
References
Details
Attachments
(4 files)
Tested on latest Nightly on Windows 10, STR:
- Open https://wavier.art/
- Click the "Set Wave color" color picker button
- Drag the mouse around the color pallete
AR:
The color flickers
ER:
No flickering
Note that this doesn't happen on Chrome.
Comment 1•4 years ago
|
||
I believe this is because we're decoding the svg asynchronously.
Comment 2•4 years ago
•
|
||
Here's a reduced testcase.
STR:
- Load this testcase. (If you've previously loaded it, be sure to
shift-reloadto be sure you aren't benefiting from any image caching, which can hide this bug.) - Click the button in the testcase.
- Click it again, if you want.
ACTUAL RESULTS:
Each time I click the button, the lime square briefly flashes red -- i.e. the change to background-image makes the image briefly disappear.
EXPECTED RESULTS:
Given that we don't have to hit the network to get the updated background-image, it seems like the update should be handled synchronously/atomically (or at least, that should be the user perception).
Updated•4 years ago
|
Comment 3•4 years ago
|
||
I thought something like this could make it, but that's not even enough,
because data: loads are still async per spec.
So I believe Firefox is right here, ultimately, and this is a website
bug, sorta.
Comment 4•4 years ago
|
||
data: uri loads are still async per spec, so unless we special-case them to be synchronous (only for images perhaps?) which we probably don't want to do, I think the expectation is incorrect.
Fixing the page should be sorta straight-forward (by ensuring that the image loads before updating the background-image).
Alternatively, we could try to do something like we do on nsImageFrame to avoid flickering (drawing the "old" background image while the new one is loading). Not sure how easy would that be to do since the old style is basically gone, and there are arbitrarily many background images... Maybe with retained display lists it's not super-hard?
Description
•