2010-04-01 James Robinson <jamesr@chromium.org>
authorjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Apr 2010 22:21:20 +0000 (22:21 +0000)
committerjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Apr 2010 22:21:20 +0000 (22:21 +0000)
        Reviewed by Simon Fraser.

        Keeps a transient optimistic offset to the root in RenderLayer::updateLayerPositions
        https://bugs.webkit.org/show_bug.cgi?id=33520

        RenderLayer::updateLayerPositions() makes a recursive walk through all RenderLayers and updates the repaint rectangles on each.
        These rectangles have to be calculated in the repaint container's coordinates using RenderObject::mapLocalToContainer to walk
        up to the repaint container.  This patch keeps track of the offset to the root and uses that offset instead of walking back up to
        the root every time.

        Tests: fast/layers/nested-layers-1.html
               fast/layers/nested-layers-2.html
               fast/layers/nested-layers-3.html
               fast/layers/nested-layers-4.html

        * page/FrameView.cpp:
        (WebCore::FrameView::layout):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::outlineBoundsForRepaint):
        * rendering/RenderBox.h:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::updateLayerPositions):
        * rendering/RenderLayer.h:
        * rendering/RenderObject.h:
        (WebCore::RenderObject::outlineBoundsForRepaint):
        * rendering/RenderSVGModelObject.cpp:
        (WebCore::RenderSVGModelObject::outlineBoundsForRepaint):
        * rendering/RenderSVGModelObject.h:
2010-04-01  James Robinson  <jamesr@chromium.org>

        Reviewed by Simon Fraser.

        Mapping from local to container coord space in updateLayerPositions is quadratic
        https://bugs.webkit.org/show_bug.cgi?id=33520

        These tests move layers around in various ways to test that the offset caching in
        updateLayerPositions() is correct.

        * fast/layers/nested-layers-1-expected.txt: Added.
        * fast/layers/nested-layers-1.html: Added.
        * fast/layers/nested-layers-2-expected.txt: Added.
        * fast/layers/nested-layers-2.html: Added.
        * fast/layers/nested-layers-3-expected.txt: Added.
        * fast/layers/nested-layers-3.html: Added.
        * fast/layers/nested-layers-4-expected.txt: Added.
        * fast/layers/nested-layers-4.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@56941 268f45cc-cd09-0410-ab3c-d52691b4dbfc


No differences found