Treat background-image: url("") as background-image: none; in CSS proposal.

TLDR: I'd like background-image: url("") to have the same behavior as
background-image: none; in CSS.

I am working on Chrome Developer Tools and we have a long standing bug
crbug.com/84605.
In short, when CSS stylesheet has background-image: url("") one can not
edit style rules in Developer Tools.

Our problem is that Blink memory cache stores resources (CachedResource)
mapped by url.
When a stylesheet contains background-image: url(""), UA tries to load an
image from the URL where stylesheet comes from and evicts stylesheet
resource from the memory cache.
At this point we no longer can get stylesheet contents hence the original
problem.

While it's possible to fix the implementation (though I am afraid this
patch would not be landed as it would be too invasive for such a small
problem),
I would suggest always treating background-image: url(""); as
background-image: none; instead.

Arguments:

1. Loading image from the same url where stylesheet comes does not make
much (if any) sense.
2. Web developers using background-image: url(""); mean background-image:
none; as can be seen from the bug comments (see webk.it/69211 also)
3. This was already made for <image src=""> (http://html5.org/r/4834,
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-December/024357.html
)

What do you think?

Thank you,
Vsevolod Vlasov

Received on Friday, 21 June 2013 06:40:24 UTC