Closed
Bug 1309482
Opened 8 years ago
Closed 3 years ago
domNode.style.backgroundImage refetched when set to same value
Categories
(Core :: DOM: CSS Object Model, defect, P3)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: olav, Unassigned)
Details
Attachments
(1 file)
63.24 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0 Build ID: 20161011191705 Steps to reproduce: JSBin: https://jsbin.com/kahobanufe/2/edit?js,output Set domNode.style.backgroundImage to a 404 in a loop, and Firefox refetches the image every time the property is reassigned, even though it is the exact same value. I first used single quotes, as in url('image.png') and Firefox transforms that into url("image.png") and the strings are no longer the same. But even when making sure domNode.style.background === imgUrl, Firefox detects a change anyway. Actual results: Image is refetched, even though the string assigned to backgroundImage is identical to previous iteration. Expected results: Firefox should detect that the value did not actually change, and not try to update the background image. This is what Chrome does. See attached screenshots from developer tools in Chrome and Firefox.
Comment 1•8 years ago
|
||
Edgar, interested in taking a look at some point?
Flags: needinfo?(echen)
Priority: -- → P3
Comment 2•8 years ago
|
||
Yeah, I will take a look. (Keeping NI for tracking)
Updated•3 years ago
|
Component: DOM: Core & HTML → DOM: CSS Object Model
Comment 3•3 years ago
|
||
I could not reproduce this anymore, I guess this is fixed at some point. Close as WORKSFORME.
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Flags: needinfo?(echen)
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•