Bug 19453
| Summary: | CSS background-image property will make a request even if the selector is overriden | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Daniel Ruspini <druspini> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | ap, rik, sethrasmussen, simon.fraser, webdev |
| Priority: | P2 | ||
| Version: | 525.x (Safari 3.1) | ||
| Hardware: | Mac | ||
| OS: | OS X 10.5 | ||
Daniel Ruspini
Using Fiddler I've found that when a CSS background-image property is overriden with another selector, the previously declared selector still initiates a request.
This does not happen in FF or IE, and became apparent when using a third-party JS library that included CSS and background images we did not want to use and thus targeted for overriding. The 404's kept coming in though for Safari.
Example:
<html>
<body>
<style>
.something {
background: red url("images/foo.gif");
width: 50px;
height: 50px;
}
.something {
background-image: none;
}
</style>
<div class="something">
</div>
</body>
</html>
Fiddler says:
404 HTTP .... images/foo.gif
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Dave Hyatt
Yes, this is a known annoyance that i intend to fix (hopefully soon). It applies to all image properties and not just to background-image.
Seth Thomas Rasmussen
I would say this bug is a bit more severe than "Normal". Any sort of plan for when a fix for this might come in?
Alexey Proskuryakov
Does this still occur with WebKit nightlies?
Simon Fraser (smfr)
Fixed via bug 24223.