WebCore:
authorbdakin <bdakin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Nov 2006 07:48:12 +0000 (07:48 +0000)
committerbdakin <bdakin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Nov 2006 07:48:12 +0000 (07:48 +0000)
commitc412e3ff7bec8ee0263807085552a68876b0933a
treee63796dbb29cf0d6b55d15da5db986d43c139388
parenta9ddb42768f100b4884fd751015c5bc5b5a090e3
WebCore:
        Reviewed by Hyatt.

        Another go at fix for <rdar://problem/4820814> A crash occurs at
        WebCore::HitTestResult::spellingToolTip() when mousing down on
        iframe at www.macsurfer.com

        The fix from yesterday caused a layout test regression which
        exposed an existing bug. The existing bug was that we allowed text
        nodes to stay in the head tag, but other browsers move them to the
        body. The previous fix also caused a performance regression, which
        was seemingly easy to fix by moving the new clause in
        HTMLParser::handleError() to be below the HTMLElement case.

        * html/HTMLDocument.cpp:
        (WebCore::HTMLDocument::childAllowed): Don't allow comment nodes to
        be the child of the document.
        * html/HTMLHeadElement.cpp:
        (WebCore::HTMLHeadElement::childAllowed): Do not allow non-
        whitespace text nodes to be children of the head.
        * html/HTMLHeadElement.h:
        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::handleError): Error case for comment nodes.
        * page/FrameView.cpp:
        (WebCore::FrameView::handleMousePressEvent): Safety-net null check
        for the original crash.

Layout Tests:
        Reviewed by Hyatt.

        Test cases for <rdar://problem/4820814> A crash occurs at
        WebCore::HitTestResult::spellingToolTip() when mousing down on
        iframe at www.macsurfer.com

        And for the found-bug of moving text nodes within the head to the
        body.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
35 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/HTMLHeadElement/textInHead1-expected.checksum [new file with mode: 0644]
LayoutTests/fast/dom/HTMLHeadElement/textInHead1-expected.png [new file with mode: 0644]
LayoutTests/fast/dom/HTMLHeadElement/textInHead1-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/HTMLHeadElement/textInHead1.html [new file with mode: 0644]
LayoutTests/fast/dom/HTMLHeadElement/textInHead2-expected.checksum [new file with mode: 0644]
LayoutTests/fast/dom/HTMLHeadElement/textInHead2-expected.png [new file with mode: 0644]
LayoutTests/fast/dom/HTMLHeadElement/textInHead2-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/HTMLHeadElement/textInHead2.html [new file with mode: 0644]
LayoutTests/fast/dom/HTMLHeadElement/textInHead3-expected.checksum [new file with mode: 0644]
LayoutTests/fast/dom/HTMLHeadElement/textInHead3-expected.png [new file with mode: 0644]
LayoutTests/fast/dom/HTMLHeadElement/textInHead3-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/HTMLHeadElement/textInHead3.html [new file with mode: 0644]
LayoutTests/fast/dom/HTMLHeadElement/textInHead4-expected.checksum [new file with mode: 0644]
LayoutTests/fast/dom/HTMLHeadElement/textInHead4-expected.png [new file with mode: 0644]
LayoutTests/fast/dom/HTMLHeadElement/textInHead4-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/HTMLHeadElement/textInHead4.html [new file with mode: 0644]
LayoutTests/fast/dom/HTMLHeadElement/textInHead5-expected.checksum [new file with mode: 0644]
LayoutTests/fast/dom/HTMLHeadElement/textInHead5-expected.png [new file with mode: 0644]
LayoutTests/fast/dom/HTMLHeadElement/textInHead5-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/HTMLHeadElement/textInHead5.html [new file with mode: 0644]
LayoutTests/fast/frames/onlyCommentInIFrame-expected.checksum [new file with mode: 0644]
LayoutTests/fast/frames/onlyCommentInIFrame-expected.txt [new file with mode: 0644]
LayoutTests/fast/frames/onlyCommentInIFrame.html [new file with mode: 0644]
LayoutTests/fast/frames/resources/comment.html [new file with mode: 0644]
LayoutTests/fast/frames/resources/commentX.xhtml [new file with mode: 0644]
LayoutTests/tables/mozilla/bugs/bug1224-expected.checksum
LayoutTests/tables/mozilla/bugs/bug1224-expected.png
LayoutTests/tables/mozilla/bugs/bug1224-expected.txt
WebCore/ChangeLog
WebCore/html/HTMLDocument.cpp
WebCore/html/HTMLHeadElement.cpp
WebCore/html/HTMLHeadElement.h
WebCore/html/HTMLParser.cpp
WebCore/page/FrameView.cpp