Bug 155473
Summary: | Safari and Chrome for iOS fail to render jpg background images with background-size: cover; | ||
---|---|---|---|
Product: | WebKit | Reporter: | Gannon Curran <gannoncurran> |
Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED MOVED | ||
Severity: | Major | CC: | bfulgham, jonlee, sabouhallawa, simon.fraser, webkit-bug-importer, zalan |
Priority: | P2 | Keywords: | InRadar |
Version: | Other | ||
Hardware: | Other | ||
OS: | iOS 9.2 | ||
URL: | http://gannoncurran.com/covertest/ |
Gannon Curran
Following FAILS to render any background image at all on both Safari (v. 601.1) and Chrome (v. 49.0.2623.73) in iOS, for both iPhone and iPad
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Test</title>
<style>
.container {
width: 100px;
height: 100px;
background-image: url('./images/test_bg_01.jpg');
background-size: cover;
}
</style>
</head>
<body>
<div class="container">
<p>things</p>
</div>
</body>
</html>
But this works (image file type changed to .png):
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Test</title>
<style>
.container {
width: 100px;
height: 100px;
background-image: url('./images/test_bg_01.png');
background-size: cover;
}
</style>
</head>
<body>
<div class="container">
<p>things</p>
</div>
</body>
</html>
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Simon Fraser (smfr)
How big is the JPG? It would help if you could give a url to a live testcase or site.
Gannon Curran
Seems to be related to image dimensions.
Here's a test:
gannoncurran.com/covertest/
Both images are jpgs, top is 2880 X 2200 and the bottom is 2880 X 2201
The bottom image fails to render on iPad and iPhone.
Thanks for investigating!
Radar WebKit Bug Importer
<rdar://problem/25432846>
Simon Fraser (smfr)
Oddly only seems to fail on iPad, not iPhone, and when the image is 2880x2201.
Simon Fraser (smfr)
This is a bug in a component below WebKit.
Brent Fulgham
The fix for this issue was needed outside the WebKit project, therefore this is being resolved as 'Moved'.
This should now be fixed in shipping software.