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)
commit34c5e0eafe208f0489916618f3b41dda15f45e58
treeaefaf44b5988f81fbea10fc63525fcd913893383
parent92bb86f891e7d25901c06f362ad296b5f9e376ae
2010-04-01  James Robinson  <jamesr@chromium.org>

        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
18 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/layers/nested-layers-1-expected.txt [new file with mode: 0644]
LayoutTests/fast/layers/nested-layers-1.html [new file with mode: 0644]
LayoutTests/fast/layers/nested-layers-2-expected.txt [new file with mode: 0644]
LayoutTests/fast/layers/nested-layers-2.html [new file with mode: 0644]
LayoutTests/fast/layers/nested-layers-3-expected.txt [new file with mode: 0644]
LayoutTests/fast/layers/nested-layers-3.html [new file with mode: 0644]
LayoutTests/fast/layers/nested-layers-4-expected.txt [new file with mode: 0644]
LayoutTests/fast/layers/nested-layers-4.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/page/FrameView.cpp
WebCore/rendering/RenderBox.cpp
WebCore/rendering/RenderBox.h
WebCore/rendering/RenderLayer.cpp
WebCore/rendering/RenderLayer.h
WebCore/rendering/RenderObject.h
WebCore/rendering/RenderSVGModelObject.cpp
WebCore/rendering/RenderSVGModelObject.h