Bug 50967

Summary: Reflection does not render properly when -webkit-transform is removed and re-added
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: CSSAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: simon.fraser
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Testcase
none
Patch cmarrin: review+

Description Simon Fraser (smfr) 2010-12-13 13:48:21 PST
Created attachment 76431 [details]
Testcase

Steps to reproduce:
1. Load reflection.html (attached) in Safari
2. Click on "Toggle Reflection" to show reflection
3. Click again to hide
4. Click again to show

Results:
The reflection has an incorrect offset of 100px (see attached screenshot) in Desktop Sarfari Version 5.0.3 (6533.19.4).
Comment 1 Simon Fraser (smfr) 2010-12-13 13:48:58 PST
<rdar://problem/8729148>
Comment 2 Simon Fraser (smfr) 2010-12-13 13:52:47 PST
I filed bug 50968 to remove layer clones when we can (which would be another way to fix this bug). That's not completely trivial, though.
Comment 3 Simon Fraser (smfr) 2010-12-13 13:52:58 PST
Created attachment 76432 [details]
Patch
Comment 4 Eric Seidel (no email) 2010-12-14 01:05:45 PST
Comment on attachment 76432 [details]
Patch

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

> LayoutTests/compositing/reflections/remove-add-reflection.html:38
> +        window.setTimeout(function() {

timeouts often make for flaky tests :(

> LayoutTests/compositing/reflections/remove-add-reflection.html:59
>  \ No newline at end of file

EOF newlines are always nice. :)
Comment 5 Simon Fraser (smfr) 2010-12-14 11:37:56 PST
(In reply to comment #4)
> (From update of attachment 76432 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=76432&action=review
> 
> > LayoutTests/compositing/reflections/remove-add-reflection.html:38
> > +        window.setTimeout(function() {
> 
> timeouts often make for flaky tests :(

Unfortunately we have to use them for things that requires compositing layer pixel tests, because CA has built-in delays.

A future solution would be to build in some DRT callbacks.

> > LayoutTests/compositing/reflections/remove-add-reflection.html:59
> >  \ No newline at end of file
> 
> EOF newlines are always nice. :)

That's fixable :)
Comment 6 Simon Fraser (smfr) 2010-12-15 15:51:20 PST
http://trac.webkit.org/changeset/74155