WebCore:
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Jun 2008 06:44:20 +0000 (06:44 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Jun 2008 06:44:20 +0000 (06:44 +0000)
commitc931f6c942ad95a9d7a00ee5e1b77d6d031b75d2
tree763f96896d11c9e7d0bcec2e729725dcf1a6bd6b
parentd542ef8e8d0948f6b664bcb87e9ea477babcd24f
WebCore:

        Reviewed by Dave Hyatt.

        - fix <rdar://problem/5876370> Safari 3.1.1 bad rendering of pages from http://www.legifrance.gouv.fr/

        Tests: fast/parser/p-in-scope-strict.html
               fast/parser/p-in-scope.html

        * html/HTMLParagraphElement.h:
        (WebCore::HTMLParagraphElement::endTagRequirement): Changed to require
        an end tag. The explicit closing of one P element by another is now
        done in error checking, and therefore takes scope into account, allowing
        for <p><button><p>, for example.

        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::HTMLParser): Initialize m_hasPElementInScope.
        (WebCore::isScopingTag): Added. Returns whether the given tag represents
        a scoping element as defined in HTML 5 section 8.2.3.2.
        (WebCore::HTMLParser::formCreateErrorCheck): Added a call to
        pCloserCreateErrorCheck().
        (WebCore::HTMLParser::ddCreateErrorCheck): Ditto.
        (WebCore::HTMLParser::dtCreateErrorCheck): Ditto.
        (WebCore::HTMLParser::nestedPCloserCreateErrorCheck): Added for use with
        <li>, which both closes P elements in scope and any previous LI.
        (WebCore::HTMLParser::pCloserCreateErrorCheck): Added. If there is a P
        element in scope, acts as if a </p> tag was seen.
        (WebCore::HTMLParser::pCloserStrictCreateErrorCheck): Ditto, but only
        in strict mode. Used for <table>.
        (WebCore::HTMLParser::getNode): Added entries for tags that close a P
        element in scope.
        (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): Added
        code to reset m_hasPElementInScope.
        (WebCore::HTMLParser::pushBlock): Added code to update
        m_hasPElementInScope.
        (WebCore::HTMLParser::popOneBlockCommon): Ditto.
        (WebCore::HTMLParser::checkIfHasPElementInScope): Added. Updates
        m_hasPElementInScope.

        * html/HTMLParser.h:
        (WebCore::HTMLParser::hasPElementInScope): Added. Calls
        checkIfHasPElementInScope() if needed and returns whether there
        is a P element in scope.

LayoutTests:

        Reviewed by Dave Hyatt.

        - tests, updated tests and updated results for
          <rdar://problem/5876370> Safari 3.1.1 bad rendering of pages from http://www.legifrance.gouv.fr/

        * fast/block/basic/001.html:
        * fast/block/positioning/absolute-in-inline-ltr-2.html:
        * fast/block/positioning/absolute-in-inline-ltr-3.html:
        * fast/block/positioning/absolute-in-inline-ltr.html:
        * fast/block/positioning/absolute-in-inline-rtl-2.html:
        * fast/block/positioning/absolute-in-inline-rtl-3.html:
        * fast/block/positioning/absolute-in-inline-rtl.html:
        * fast/block/positioning/absolute-in-inline-short-ltr.html:
        * fast/block/positioning/absolute-in-inline-short-rtl.html:
        * fast/block/positioning/auto/006.html:
        * fast/inline/continuation-outlines-with-layers.html:
        * fast/inline/continuation-outlines.html:
        * fast/parser/p-in-scope-expected.txt: Added.
        * fast/parser/p-in-scope-strict-expected.txt: Added.
        * fast/parser/p-in-scope-strict.html: Added.
        * fast/parser/p-in-scope.html: Added.
        * fast/parser/resources/p-in-scope.css: Added.
        * fast/parser/resources/p-in-scope.js: Added.
        * fast/repaint/subtree-root-clip-2.html:
        * platform/mac/fast/block/basic/001-expected.txt:
        * platform/mac/fast/block/positioning/absolute-in-inline-ltr-2-expected.txt:
        * platform/mac/fast/block/positioning/absolute-in-inline-ltr-3-expected.txt:
        * platform/mac/fast/block/positioning/absolute-in-inline-ltr-expected.txt:
        * platform/mac/fast/block/positioning/absolute-in-inline-rtl-2-expected.txt:
        * platform/mac/fast/block/positioning/absolute-in-inline-rtl-3-expected.txt:
        * platform/mac/fast/block/positioning/absolute-in-inline-rtl-expected.txt:
        * platform/mac/fast/block/positioning/absolute-in-inline-short-ltr-expected.txt:
        * platform/mac/fast/block/positioning/absolute-in-inline-short-rtl-expected.txt:
        * platform/mac/fast/block/positioning/auto/006-expected.txt:
        * platform/mac/fast/inline/continuation-outlines-expected.txt:
        * platform/mac/fast/inline/continuation-outlines-with-layers-expected.txt:
        * platform/mac/fast/repaint/subtree-root-clip-2-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34507 268f45cc-cd09-0410-ab3c-d52691b4dbfc
39 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/block/basic/001.html
LayoutTests/fast/block/positioning/absolute-in-inline-ltr-2.html
LayoutTests/fast/block/positioning/absolute-in-inline-ltr-3.html
LayoutTests/fast/block/positioning/absolute-in-inline-ltr.html
LayoutTests/fast/block/positioning/absolute-in-inline-rtl-2.html
LayoutTests/fast/block/positioning/absolute-in-inline-rtl-3.html
LayoutTests/fast/block/positioning/absolute-in-inline-rtl.html
LayoutTests/fast/block/positioning/absolute-in-inline-short-ltr.html
LayoutTests/fast/block/positioning/absolute-in-inline-short-rtl.html
LayoutTests/fast/block/positioning/auto/006.html
LayoutTests/fast/inline/continuation-outlines-with-layers.html
LayoutTests/fast/inline/continuation-outlines.html
LayoutTests/fast/parser/p-in-scope-expected.txt [new file with mode: 0644]
LayoutTests/fast/parser/p-in-scope-strict-expected.txt [new file with mode: 0644]
LayoutTests/fast/parser/p-in-scope-strict.html [new file with mode: 0644]
LayoutTests/fast/parser/p-in-scope.html [new file with mode: 0644]
LayoutTests/fast/parser/resources/p-in-scope.css [new file with mode: 0644]
LayoutTests/fast/parser/resources/p-in-scope.js [new file with mode: 0644]
LayoutTests/fast/repaint/subtree-root-clip-2.html
LayoutTests/platform/mac/fast/block/basic/001-expected.txt
LayoutTests/platform/mac/fast/block/positioning/absolute-in-inline-ltr-2-expected.txt
LayoutTests/platform/mac/fast/block/positioning/absolute-in-inline-ltr-3-expected.txt
LayoutTests/platform/mac/fast/block/positioning/absolute-in-inline-ltr-expected.txt
LayoutTests/platform/mac/fast/block/positioning/absolute-in-inline-rtl-2-expected.txt
LayoutTests/platform/mac/fast/block/positioning/absolute-in-inline-rtl-3-expected.txt
LayoutTests/platform/mac/fast/block/positioning/absolute-in-inline-rtl-expected.txt
LayoutTests/platform/mac/fast/block/positioning/absolute-in-inline-short-ltr-expected.txt
LayoutTests/platform/mac/fast/block/positioning/absolute-in-inline-short-rtl-expected.txt
LayoutTests/platform/mac/fast/block/positioning/auto/006-expected.txt
LayoutTests/platform/mac/fast/inline/continuation-outlines-expected.txt
LayoutTests/platform/mac/fast/inline/continuation-outlines-with-layers-expected.txt
LayoutTests/platform/mac/fast/repaint/subtree-root-clip-2-expected.txt
WebCore/ChangeLog
WebCore/html/HTMLParagraphElement.h
WebCore/html/HTMLParser.cpp
WebCore/html/HTMLParser.h
WebKitSite/demos/transitions-and-transforms/index.html
WebKitTools/Scripts/bisect-builds