WebCore:
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Feb 2008 10:06:14 +0000 (10:06 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Feb 2008 10:06:14 +0000 (10:06 +0000)
commit4f3995601f6c5e34fa5e8572e95003eaa7f49bb8
tree08a73b8336dbb400d176d89f84a183118c62e5b3
parente966e154e52f946e2ed543a6453697f7d3ce0e16
WebCore:

        Make :first-child and :first-of-type properly dynamic when the DOM changes.  Brings the Acid3 score up
        to 66/100.

        Reviewed by olliej

        Added fast/css/first-child-pseudo-class.html, fast/css/first-of-type-pseudo-class.html, fast/css/empty-body-test.html

        * css/CSSGrammar.y:
        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::checkOneSelector):
        * dom/Element.cpp:
        (WebCore::Element::recalcStyle):
        (WebCore::Element::childrenChanged):
        * rendering/RenderStyle.cpp:
        (WebCore::RenderStyle::RenderStyle):
        * rendering/RenderStyle.h:
        (WebCore::RenderStyle::childrenAffectedByFirstChildRules):
        (WebCore::RenderStyle::setChildrenAffectedByFirstChildRules):
        (WebCore::RenderStyle::childrenAffectedByLastChildRules):
        (WebCore::RenderStyle::setChildrenAffectedByLastChildRules):
        (WebCore::RenderStyle::childrenAffectedByPositionalRules):
        (WebCore::RenderStyle::setChildrenAffectedByPositionalRules):
        (WebCore::RenderStyle::firstChildState):
        (WebCore::RenderStyle::setFirstChildState):
        (WebCore::RenderStyle::lastChildState):
        (WebCore::RenderStyle::setLastChildState):

LayoutTests:

        Added tests for dynamic :first-child support (Acid3).

        Reviewed by olliej

        * fast/css/empty-body-test.html: Added.
        * fast/css/first-child-pseudo-class.html: Added.
        * fast/css/first-of-type-pseudo-class.html: Added.
        * platform/mac/fast/css/empty-body-test-expected.checksum: Added.
        * platform/mac/fast/css/empty-body-test-expected.png: Added.
        * platform/mac/fast/css/empty-body-test-expected.txt: Added.
        * platform/mac/fast/css/first-child-pseudo-class-expected.checksum: Added.
        * platform/mac/fast/css/first-child-pseudo-class-expected.png: Added.
        * platform/mac/fast/css/first-child-pseudo-class-expected.txt: Added.
        * platform/mac/fast/css/first-of-type-pseudo-class-expected.checksum: Added.
        * platform/mac/fast/css/first-of-type-pseudo-class-expected.png: Added.
        * platform/mac/fast/css/first-of-type-pseudo-class-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/empty-body-test.html [new file with mode: 0644]
LayoutTests/fast/css/first-child-pseudo-class.html [new file with mode: 0644]
LayoutTests/fast/css/first-of-type-pseudo-class.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/css/empty-body-test-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/css/empty-body-test-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/css/empty-body-test-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/css/first-child-pseudo-class-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/css/first-child-pseudo-class-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/css/first-child-pseudo-class-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/css/first-of-type-pseudo-class-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/css/first-of-type-pseudo-class-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/css/first-of-type-pseudo-class-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/css/CSSGrammar.y
WebCore/css/CSSStyleSelector.cpp
WebCore/dom/Element.cpp
WebCore/rendering/RenderStyle.cpp
WebCore/rendering/RenderStyle.h