net: Don't load the placeholder image for background images, only for

image fragments.

This also changes the way the placeholder is handled in the image cache
task to decode it up front instead of each time an image fails to load,
both because it was more convenient to implement that way and because
it saves CPU cycles to do so.

This matches the behavior of Gecko and WebKit. It improves the look of
our cached copy of Wikipedia.
This commit is contained in:
Patrick Walton 2015-04-03 14:24:22 -07:00
parent e52197d126
commit 7e7675c1dc
11 changed files with 135 additions and 38 deletions

View file

@ -205,6 +205,7 @@ flaky_cpu == linebreak_simple_a.html linebreak_simple_b.html
== negative_margin_uncle_a.html negative_margin_uncle_b.html
== negative_margins_a.html negative_margins_b.html
== no-image.html no-image-ref.html
== no_image_background_a.html no_image_background_ref.html
== noscript.html noscript_ref.html
!= noteq_attr_exists_selector.html attr_exists_selector_ref.html
== nth_child_pseudo_a.html nth_child_pseudo_b.html

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<style>
body {
background: peachpuff;
}
section {
display: block;
width: 256px;
height: 256px;
border: solid black 1px;
background: url(bogusybogusbogus.jpg);
}
</style>
</head>
<body>
<section></section>
</body>
</html>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<style>
body {
background: peachpuff;
}
section {
display: block;
width: 256px;
height: 256px;
border: solid black 1px;
}
</style>
</head>
<body>
<section></section>
</body>
</html>