Bug 118951 - REGRESSION(r152227) Images with layer backing don't show up unless the containing window is resized.
Summary: REGRESSION(r152227) Images with layer backing don't show up unless the contai...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.8
: P2 Normal
Assignee: zalan
URL: http://www.studio-1a.nl/prive/under%2...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-07-21 01:35 PDT by Nightwatch
Modified: 2013-09-17 16:07 PDT (History)
12 users (show)

See Also:


Attachments
Patch (3.59 KB, patch)
2013-07-22 03:45 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (4.18 KB, patch)
2013-07-22 06:11 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (4.17 KB, patch)
2013-07-22 11:45 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nightwatch 2013-07-21 01:35:05 PDT
BG Image doesn't show up initially. Only after resizing the browser window, the BG image shows


source code:

<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	
	<title>Persoonlijke website van Huub, Monique en Nick</title>
	
	<style>
		
		img.bg {
			/* Set rules to fill background */
			min-height: 100%;
			min-width: 1024px;
			
			/* Set up proportionate scaling */
			width: 100%;
			height: auto;
			
			/* Set up positioning */
			position: fixed;
			top: 0;
			left: 0;
		}
		
		@media screen and (max-width: 1024px){
			img.bg {
				left: 50%;
				margin-left: -512px; }
		}
		
		#page-wrap { position: relative; width: 400px; margin: 100px auto; padding: 40px; background: white; -moz-box-shadow: 0 0 20px black; -webkit-box-shadow: 0 0 20px black; box-shadow: 0 0 20px black; }
		p { font: 15px/2 Arial, Sans-serif; margin: 20 20 20 20; text-indent: 0px; ALIGN="center"; }
	</style>
</head>

<body>

	<img src="intro.jpg" class="bg">
	
	<div id="page-wrap">
	
		<p ALIGN="center"><b>Persoonlijke website van Huub, Monique en Nick<b></p> 
		<p ALIGN="center"><img src="under-construction.jpg" border="1px"</p>
	</div>
	
</body>

</html>
Comment 1 zalan 2013-07-22 03:08:02 PDT
patch is coming up.
Comment 2 zalan 2013-07-22 03:45:39 PDT
Created attachment 207237 [details]
Patch
Comment 3 zalan 2013-07-22 06:11:26 PDT
Created attachment 207242 [details]
Patch
Comment 4 Simon Fraser (smfr) 2013-07-22 10:38:10 PDT
Comment on attachment 207242 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=207242&action=review

> Source/WebCore/ChangeLog:13
> +        Ensure that the content rect is initialized when the image is set on the graphics layer.
> +
> +        RenderLayerBacking::updateGraphicsLayerGeometry() only updates the contents rect when
> +        the associated graphics layer has a content layer. Since the positioned image
> +        gets committed on the graphics layer after the update calls, the contents rect
> +        is left uninitialized.

There should be regression information here.

> LayoutTests/compositing/images/positioned-image-content-rect.html:5
> +    <img style="position: fixed; top:0px; left:0px;" width="214px" height="232px" src="../resources/apple.jpg">

A better way to get a composited image is to use -webkit-transfrom: translateZ(0). Not all platforms will enable compositing for fixed.
Comment 5 zalan 2013-07-22 11:45:45 PDT
Created attachment 207258 [details]
Patch
Comment 6 WebKit Commit Bot 2013-07-22 12:36:48 PDT
Comment on attachment 207258 [details]
Patch

Clearing flags on attachment: 207258

Committed r152986: <http://trac.webkit.org/changeset/152986>
Comment 7 WebKit Commit Bot 2013-07-22 12:36:51 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2013-07-23 10:13:05 PDT
<rdar://problem/14522607>
Comment 9 Alexey Proskuryakov 2013-09-17 16:07:41 PDT
This test is failing on some bots, filed bug 121526.