Title: [183089] trunk/Source/WebCore
Revision
183089
Author
mmaxfi...@apple.com
Date
2015-04-21 17:51:07 -0700 (Tue, 21 Apr 2015)

Log Message

[iOS] When computing visible rects for tiling, stop searching at UIWindows
https://bugs.webkit.org/show_bug.cgi?id=144022
<rdar://problem/18327227>

Reviewed by Simon Fraser.

[WAKWindow _visibleRectRespectingMasksToBounds:] computes a visible rect which we use
to determine which tiles to create. We do this by finding the frame of the _hostLayer,
and then walking up the CALayer hierarchy converting each rect into its parent's
coordinate system (all the while clipping to bounds if necessary). This walk up the
layer hierarchy should stop at a layer associated with a UIWindow.

* platform/ios/wak/WAKWindow.mm:
(-[WAKWindow _visibleRectRespectingMasksToBounds:]):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (183088 => 183089)


--- trunk/Source/WebCore/ChangeLog	2015-04-22 00:38:04 UTC (rev 183088)
+++ trunk/Source/WebCore/ChangeLog	2015-04-22 00:51:07 UTC (rev 183089)
@@ -1,3 +1,20 @@
+2015-04-21  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        [iOS] When computing visible rects for tiling, stop searching at UIWindows
+        https://bugs.webkit.org/show_bug.cgi?id=144022
+        <rdar://problem/18327227>
+
+        Reviewed by Simon Fraser.
+
+        [WAKWindow _visibleRectRespectingMasksToBounds:] computes a visible rect which we use
+        to determine which tiles to create. We do this by finding the frame of the _hostLayer,
+        and then walking up the CALayer hierarchy converting each rect into its parent's
+        coordinate system (all the while clipping to bounds if necessary). This walk up the
+        layer hierarchy should stop at a layer associated with a UIWindow.
+
+        * platform/ios/wak/WAKWindow.mm:
+        (-[WAKWindow _visibleRectRespectingMasksToBounds:]):
+
 2015-04-21  Jinwoo Song  <jinwoo7.s...@samsung.com>
 
         [Cairo] Implement Path::addPath

Modified: trunk/Source/WebCore/platform/ios/wak/WAKWindow.mm (183088 => 183089)


--- trunk/Source/WebCore/platform/ios/wak/WAKWindow.mm	2015-04-22 00:38:04 UTC (rev 183088)
+++ trunk/Source/WebCore/platform/ios/wak/WAKWindow.mm	2015-04-22 00:51:07 UTC (rev 183089)
@@ -440,7 +440,9 @@
     CGRect rect = bounds;
     CALayer* superlayer = [layer superlayer];
 
-    while (superlayer && layer != _rootLayer) {
+    static Class windowClass = NSClassFromString(@"UIWindow");
+
+    while (superlayer && layer != _rootLayer && (!layer.delegate || ![layer.delegate isKindOfClass:windowClass])) {
         CGRect rectInSuper = [superlayer convertRect:rect fromLayer:layer];
         if ([superlayer masksToBounds] || !respectsMasksToBounds)
             rect = CGRectIntersection([superlayer bounds], rectInSuper);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to