Reviewed by Darin.
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Apr 2006 05:21:08 +0000 (05:21 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Apr 2006 05:21:08 +0000 (05:21 +0000)
commitfa6f8e9c8b38123025a1abda296bc3b0842b3347
tree6add79a75ef7a02dbf41608df9ec463df78e0a8d
parent925e26fbbe24369e97919233e68bed47911fca4d
    Reviewed by Darin.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7118
          Property values with extra items do not get treated as invalid (they should)

        Tests: fast/css/invalidation-errors.html
               fast/css/invalidation-errors-2.html
               fast/css/invalidation-errors-3.html

        * css/CSSGrammar.y: Rollback the properties added by parseValue() when it returns false.
        * css/cssparser.h: Moved shorthand counting to ShorthandScope, a new class in cssparser.cpp.
        * css/cssparser.cpp:
        (WebCore::CSSParser::rollbackLastProperties): Added.
        (WebCore::CSSParser::parseValue): Return false if there are too many properties in the list.
        (WebCore::CSSParser::parseBackgroundShorthand): Use ShorthandScope.
        (WebCore::CSSParser::parseShorthand): Ditto.
        (WebCore::CSSParser::parse4Values): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/block/margin-collapse/103-expected.checksum
LayoutTests/fast/block/margin-collapse/103-expected.png
LayoutTests/fast/block/margin-collapse/103-expected.txt
LayoutTests/fast/css/invalidation-errors-2-expected.checksum [new file with mode: 0644]
LayoutTests/fast/css/invalidation-errors-2-expected.png [new file with mode: 0644]
LayoutTests/fast/css/invalidation-errors-2-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/invalidation-errors-2.html [new file with mode: 0644]
LayoutTests/fast/css/invalidation-errors-3-expected.checksum [new file with mode: 0644]
LayoutTests/fast/css/invalidation-errors-3-expected.png [new file with mode: 0644]
LayoutTests/fast/css/invalidation-errors-3-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/invalidation-errors-3.html [new file with mode: 0644]
LayoutTests/fast/css/invalidation-errors-expected.checksum [new file with mode: 0644]
LayoutTests/fast/css/invalidation-errors-expected.png [new file with mode: 0644]
LayoutTests/fast/css/invalidation-errors-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/invalidation-errors.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/css/CSSGrammar.y
WebCore/css/cssparser.cpp
WebCore/css/cssparser.h