WebCore:
authorantti <antti@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Aug 2007 22:46:41 +0000 (22:46 +0000)
committerantti <antti@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Aug 2007 22:46:41 +0000 (22:46 +0000)
commitbec78c13a988de79b8ed886c3e6c9fa7c8e2702c
tree6ddb682a0a65a3f5e3d1dc6acb17c17b2ff3cc76
parent516d08de63837310abbc2e67b1c033cda8969343
WebCore:

        Reviewed by Mitz.

        Fix <rdar://problem/5425951>
        REGRESSION: change to updateLayoutIgnorePendingStylesheets causes SAP Portal page to render wrong

        If new nodes have been added or style recalc has been done with style sheets still pending, some nodes
        may not have had their real style calculated yet. Normally this state gets cleaned when style sheets arrive
        but in updateLayoutIgnorePendingStylesheets() we need to do full style recalc to get up-to-date style immediatly.

        Added a document flag to track if there are any nodes that did not have their real style calculated due to
        pending stylesheets.

        Test: fast/dynamic/style-access-late-stylesheet-load.html

        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::styleForElement):
        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::Document::recalcStyle):
        (WebCore::Document::updateLayoutIgnorePendingStylesheets):
        * dom/Document.h:
        (WebCore::Document::setHasNodesWithPlaceholderStyle):

LayoutTests:

        Reviewed by Mitz.

        Test for <rdar://problem/5425951>
        REGRESSION: change to updateLayoutIgnorePendingStylesheets causes SAP Portal page to render wrong

        * fast/dynamic/style-access-late-stylesheet-load-expected.txt: Added.
        * fast/dynamic/style-access-late-stylesheet-load.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25308 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dynamic/style-access-late-stylesheet-load-expected.txt [new file with mode: 0644]
LayoutTests/fast/dynamic/style-access-late-stylesheet-load.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/css/CSSStyleSelector.cpp
WebCore/dom/Document.cpp
WebCore/dom/Document.h