domNode.style.backgroundImage refetched when set to same value

UNCONFIRMED
Unassigned

Status

()

Core
DOM: Core & HTML
P3
normal
UNCONFIRMED
a year ago
a year ago

People

(Reporter: olav, Unassigned, NeedInfo)

Tracking

51 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

a year ago
Created attachment 8800138 [details]
Selection_007.png

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.

Updated

a year ago
Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
Edgar, interested in taking a look at some point?
Flags: needinfo?(echen)
Priority: -- → P3
Yeah, I will take a look. (Keeping NI for tracking)
You need to log in before you can comment on or make changes to this bug.