2008-05-25 Maciej Stachowiak <mjs@apple.com>
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 25 May 2008 23:23:25 +0000 (23:23 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 25 May 2008 23:23:25 +0000 (23:23 +0000)
commit87d533aac7dba9f4bb1b7bb700fc6e4d23c8a39f
tree0457edcac8edefc9b4ec15d9b0c854528a79828a
parentd0da2ada9dada682cec6681f1c147f0c2147a059
2008-05-25  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        - don't repaint nodes that are removed before layout
        4.3% speedup on Acid3 test 26

        Mitz points out the new flag can also be used to optimize other
        cases of needless repaint such as
        <https://bugs.webkit.org/show_bug.cgi?id=15129>.

        * rendering/RenderContainer.cpp:
        (WebCore::RenderContainer::removeChildNode): If the child has never had a layout,
        don't bother to repaint it, since there's nothing to dirty.
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::RenderObject): Initialize m_everHadLayout to false.
        (WebCore::RenderObject::setNeedsLayout): Set m_everHadLayout to true if we
        are being marked as not needing layout.
        * rendering/RenderObject.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/rendering/RenderContainer.cpp
WebCore/rendering/RenderObject.cpp
WebCore/rendering/RenderObject.h