Title: [100214] trunk/Source/WebCore
Revision
100214
Author
[email protected]
Date
2011-11-14 16:34:35 -0800 (Mon, 14 Nov 2011)

Log Message

div with webkit-transform + webkit-box-reflect disappears when switching tabs
https://bugs.webkit.org/show_bug.cgi?id=53355

Reviewed by Dean Jackson.

Tickle Core Animation into updating the layer's content property when
switching back to a tab which has composited reflections. This hack is
needed becuase reflections involve sharing layer contents between layers.

* platform/graphics/mac/WebLayer.mm:
(-[WebLayer actionForKey:]):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (100213 => 100214)


--- trunk/Source/WebCore/ChangeLog	2011-11-15 00:24:33 UTC (rev 100213)
+++ trunk/Source/WebCore/ChangeLog	2011-11-15 00:34:35 UTC (rev 100214)
@@ -1,3 +1,17 @@
+2011-11-14  Simon Fraser  <[email protected]>
+
+        div with webkit-transform + webkit-box-reflect disappears when switching tabs
+        https://bugs.webkit.org/show_bug.cgi?id=53355
+
+        Reviewed by Dean Jackson.
+
+        Tickle Core Animation into updating the layer's content property when
+        switching back to a tab which has composited reflections. This hack is
+        needed becuase reflections involve sharing layer contents between layers.
+
+        * platform/graphics/mac/WebLayer.mm:
+        (-[WebLayer actionForKey:]):
+
 2011-11-14  Adam Barth  <[email protected]>
 
         Unique origins shouldn't remember their scheme, host, or port

Modified: trunk/Source/WebCore/platform/graphics/mac/WebLayer.mm (100213 => 100214)


--- trunk/Source/WebCore/platform/graphics/mac/WebLayer.mm	2011-11-15 00:24:33 UTC (rev 100213)
+++ trunk/Source/WebCore/platform/graphics/mac/WebLayer.mm	2011-11-15 00:34:35 UTC (rev 100214)
@@ -36,6 +36,10 @@
 #import <QuartzCore/QuartzCore.h>
 #import <wtf/UnusedParam.h>
 
+@interface CALayer(WebCoreCALayerPrivate)
+- (void)reloadValueForKeyPath:(NSString *)keyPath;
+@end
+
 using namespace WebCore;
 
 @implementation WebLayer
@@ -146,10 +150,12 @@
     }
 }
 
-// Disable default animations
 - (id<CAAction>)actionForKey:(NSString *)key
 {
-    UNUSED_PARAM(key);
+    // Fix for <rdar://problem/9015675>: Force the layer content to be updated when the tree is reparented.
+    if ([key isEqualToString:@"onOrderIn"])
+        [self reloadValueForKeyPath:@"contents"];
+
     return nil;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to