2011-05-20 Leo Yang <leo.yang@torchmobile.com.cn>
authorleo.yang@torchmobile.com.cn <leo.yang@torchmobile.com.cn@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 May 2011 07:56:57 +0000 (07:56 +0000)
committerleo.yang@torchmobile.com.cn <leo.yang@torchmobile.com.cn@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 May 2011 07:56:57 +0000 (07:56 +0000)
commitdb144420918c213a972af048dfa0330b61242d74
tree5f5530d33325bf082dd0dce18acde33624a179df
parente170cedd039cc4f05b80700a62a1cd5f4799f2bc
2011-05-20  Leo Yang  <leo.yang@torchmobile.com.cn>

        Reviewed by Nikolas Zimmermann.

        SVGRootInlineBox triggers calculateBoundaries twice in layout
        https://bugs.webkit.org/show_bug.cgi?id=60979

        SVGRootInlineBox was calculating boundaries for children twice
        in computePerCharacterLayoutInformation(). The first time of
        calculation was in layoutChildBoxes() which is called by
        computePerCharacterLayoutInformation(), and the second time of
        calculation was in layoutRootBox() following layoutChildBoxes().

        This patch calculates rectangle of children in layoutChildBoxes()
        and then uses the rectange in layoutRootBox() to reduce a pass
        of calculating child boundaries.

        No functionality change, no new tests.

        * rendering/svg/SVGRootInlineBox.cpp:
        (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
        (WebCore::SVGRootInlineBox::layoutChildBoxes):
        (WebCore::SVGRootInlineBox::layoutRootBox):
        * rendering/svg/SVGRootInlineBox.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86927 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/svg/SVGRootInlineBox.cpp
Source/WebCore/rendering/svg/SVGRootInlineBox.h