Title: [135072] branches/safari-536.28-branch
Revision
135072
Author
simon.fra...@apple.com
Date
2012-11-18 10:07:03 -0800 (Sun, 18 Nov 2012)

Log Message

<rdar://problem/12725998> Simplify bounds computation for the RenderView's layer (102597)
Merge r135059

Source/WebCore:

    2012-11-17  Simon Fraser  <simon.fra...@apple.com>

    Simplify bounds computation for the RenderView's layer
    https://bugs.webkit.org/show_bug.cgi?id=102597

    Reviewed by Anders Carlsson.

    Computing the bounds of the main layer (that of the RenderView) used to do
    a full RenderLayer walk, taking the union of the bounds of all the sublayers,
    which is very expensive on large pages.

    For the RenderView we can avoid that entirely and just use the RenderView's
    document rect. Since page scaling happens as a transform on this layer,
    we want the unscaled document rect.

    * rendering/RenderLayer.cpp:
    (WebCore::RenderLayer::calculateLayerBounds):

LayoutTests:

    2012-11-17  Simon Fraser  <simon.fra...@apple.com>

    Simplify bounds computation for the RenderView's layer
    https://bugs.webkit.org/show_bug.cgi?id=102597

    Reviewed by Anders Carlsson.

    Progressions as a result of this change:

    * compositing/layer-creation/fixed-position-out-of-view-expected.txt: The height
    is now the page height, since the page is scrollable.
    * compositing/tiling/tile-cache-zoomed-expected.txt: The main layer now is not
    affected by the page scale transform.
    * platform/mac/compositing/tiling/tile-cache-zoomed-expected.txt: Ditto.

Modified Paths

Diff

Modified: branches/safari-536.28-branch/LayoutTests/ChangeLog (135071 => 135072)


--- branches/safari-536.28-branch/LayoutTests/ChangeLog	2012-11-18 18:06:58 UTC (rev 135071)
+++ branches/safari-536.28-branch/LayoutTests/ChangeLog	2012-11-18 18:07:03 UTC (rev 135072)
@@ -1,3 +1,23 @@
+2012-11-18  Simon Fraser  <simon.fra...@apple.com>
+
+        <rdar://problem/12725998> Simplify bounds computation for the RenderView's layer (102597)
+        Merge r135059
+
+    2012-11-17  Simon Fraser  <simon.fra...@apple.com>
+    
+            Simplify bounds computation for the RenderView's layer
+            https://bugs.webkit.org/show_bug.cgi?id=102597
+    
+            Reviewed by Anders Carlsson.
+    
+            Progressions as a result of this change:
+    
+            * compositing/layer-creation/fixed-position-out-of-view-expected.txt: The height
+            is now the page height, since the page is scrollable.
+            * compositing/tiling/tile-cache-zoomed-expected.txt: The main layer now is not
+            affected by the page scale transform.
+            * platform/mac/compositing/tiling/tile-cache-zoomed-expected.txt: Ditto.
+
 2012-11-16  Andy Estes  <aes...@apple.com>
 
         Merge r130102.

Modified: branches/safari-536.28-branch/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-expected.txt (135071 => 135072)


--- branches/safari-536.28-branch/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-expected.txt	2012-11-18 18:06:58 UTC (rev 135071)
+++ branches/safari-536.28-branch/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-expected.txt	2012-11-18 18:07:03 UTC (rev 135072)
@@ -2,7 +2,7 @@
   (bounds 785.00 1021.00)
   (children 1
     (GraphicsLayer
-      (bounds 785.00 600.00)
+      (bounds 785.00 1021.00)
       (children 1
         (GraphicsLayer
           (bounds 785.00 1021.00)

Modified: branches/safari-536.28-branch/Source/WebCore/ChangeLog (135071 => 135072)


--- branches/safari-536.28-branch/Source/WebCore/ChangeLog	2012-11-18 18:06:58 UTC (rev 135071)
+++ branches/safari-536.28-branch/Source/WebCore/ChangeLog	2012-11-18 18:07:03 UTC (rev 135072)
@@ -1,5 +1,28 @@
 2012-11-18  Simon Fraser  <simon.fra...@apple.com>
 
+        <rdar://problem/12725998> Simplify bounds computation for the RenderView's layer (102597)
+        Merge r135059
+
+    2012-11-17  Simon Fraser  <simon.fra...@apple.com>
+    
+            Simplify bounds computation for the RenderView's layer
+            https://bugs.webkit.org/show_bug.cgi?id=102597
+    
+            Reviewed by Anders Carlsson.
+    
+            Computing the bounds of the main layer (that of the RenderView) used to do
+            a full RenderLayer walk, taking the union of the bounds of all the sublayers,
+            which is very expensive on large pages.
+            
+            For the RenderView we can avoid that entirely and just use the RenderView's
+            document rect. Since page scaling happens as a transform on this layer,
+            we want the unscaled document rect.
+    
+            * rendering/RenderLayer.cpp:
+            (WebCore::RenderLayer::calculateLayerBounds):
+
+2012-11-18  Simon Fraser  <simon.fra...@apple.com>
+
         <rdar://problem/12725980> Fix overlay scrollbar painting in compositing layers (102442)
         Merge r135029
 

Modified: branches/safari-536.28-branch/Source/WebCore/rendering/RenderLayer.cpp (135071 => 135072)


--- branches/safari-536.28-branch/Source/WebCore/rendering/RenderLayer.cpp	2012-11-18 18:06:58 UTC (rev 135071)
+++ branches/safari-536.28-branch/Source/WebCore/rendering/RenderLayer.cpp	2012-11-18 18:07:03 UTC (rev 135072)
@@ -4147,6 +4147,12 @@
 
     RenderBoxModelObject* renderer = this->renderer();
     LayoutRect boundingBoxRect = localBoundingBox();
+
+    if (isRootLayer()) {
+        // The root layer is always just the size of the document.
+        return renderer->view()->unscaledDocumentRect();
+    }
+
     if (renderer->isBox())
         toRenderBox(renderer)->flipForWritingMode(boundingBoxRect);
     else
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to