LayoutTests:
authorthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 9 Jul 2006 07:56:54 +0000 (07:56 +0000)
committerthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 9 Jul 2006 07:56:54 +0000 (07:56 +0000)
commitf0dc5386446a59b8845f82bcafe0bbb8e8a99567
treee55f5cc68b65d82d75a22556e69b77894cbea19e
parenteee75f6f181b18349dc159269f6227f5d4b6b23d
LayoutTests:

        Reviewed by Maciej.

        Bug 5312: comments aren't available via DOM
        http://bugzilla.opendarwin.org/show_bug.cgi?id=5312

        New tests for DOM comment nodes. Updated results to account for new
        nodes in the DOM (editing offsets changed.)

        * editing/deleting/delete-line-013-expected.txt:
        * editing/deleting/delete-line-014-expected.txt:
        * editing/inserting/insert-3907422-fix-expected.txt:
        * editing/inserting/insert-div-009-expected.txt:
        * editing/inserting/insert-div-010-expected.txt:
        * editing/selection/extend-by-character-006-expected.txt:
        * editing/selection/move-between-blocks-no-001-expected.txt:
        * editing/selection/move-between-blocks-yes-001-expected.txt:
        * fast/dom/HTMLDocument/object-by-name-or-id-expected.txt:
        * fast/dom/HTMLDocument/object-by-name-or-id.html:
        * fast/dom/comment-document-fragment-expected.txt: Added.
        * fast/dom/comment-document-fragment.html: Added.
        * fast/dom/comment-dom-node-expected.txt: Added.
        * fast/dom/comment-dom-node.html: Added.
        * fast/dom/comment-not-documentElement-expected.checksum: Added.
        * fast/dom/comment-not-documentElement-expected.png: Added.
        * fast/dom/comment-not-documentElement-expected.txt: Added.
        * fast/dom/comment-not-documentElement.html: Added.
        * fast/text/atsui-pointtooffset-calls-cg-expected.txt:
        * fast/text/atsui-rtl-override-selection-expected.txt:

WebCore:

        Reviewed by Maciej.

        Bug 5312: comments aren't available via DOM
        http://bugzilla.opendarwin.org/show_bug.cgi?id=5312

        <rdar://problem/4564414> getting comments via DOM isn't working (5312)
        <rdar://problem/4545691> DOM_COMMENT node masking out real DOM elements

        * dom/Document.cpp:
        (WebCore::Document::removedLastRef): set m_documentElement to 0
        (WebCore::Document::childrenChanged): invalidate the document element we have cached in case it was replaced
        (WebCore::Document::documentElement): cache the first element as the document node if m_documentElement is 0
        * dom/Document.h: added m_documentElement
        * html/HTMLDocument.cpp: removed documentElement(), HTML documents just use Document's documentElement()
        * html/HTMLDocument.h: ditto
        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::handleError): make a new HTML node is the document's firstChild is NULL or
        the firstChild is not a HTML element (like a comment)
        * html/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::parseComment): removed the #ifdef to include comment nodes

WebKit:

        Reviewed by Maciej.

        Bug 5312: comments aren't available via DOM
        http://bugzilla.opendarwin.org/show_bug.cgi?id=5312

        Makes the Web Inspector show comment node contents.

        * WebInspector/WebInspector.m:
        (-[DOMNode _displayName]): return the contents of the comment
        * WebInspector/webInspector/inspector.js: check for comment nodes

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
31 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/deleting/delete-line-013-expected.txt
LayoutTests/editing/deleting/delete-line-014-expected.txt
LayoutTests/editing/inserting/insert-3907422-fix-expected.txt
LayoutTests/editing/inserting/insert-div-009-expected.txt
LayoutTests/editing/inserting/insert-div-010-expected.txt
LayoutTests/editing/selection/extend-by-character-006-expected.txt
LayoutTests/editing/selection/move-between-blocks-no-001-expected.txt
LayoutTests/editing/selection/move-between-blocks-yes-001-expected.txt
LayoutTests/fast/dom/HTMLDocument/object-by-name-or-id-expected.txt
LayoutTests/fast/dom/HTMLDocument/object-by-name-or-id.html
LayoutTests/fast/dom/comment-document-fragment-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/comment-document-fragment.html [new file with mode: 0644]
LayoutTests/fast/dom/comment-dom-node-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/comment-dom-node.html [new file with mode: 0644]
LayoutTests/fast/dom/comment-not-documentElement-expected.checksum [new file with mode: 0644]
LayoutTests/fast/dom/comment-not-documentElement-expected.png [new file with mode: 0644]
LayoutTests/fast/dom/comment-not-documentElement-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/comment-not-documentElement.html [new file with mode: 0644]
LayoutTests/fast/text/atsui-pointtooffset-calls-cg-expected.txt
LayoutTests/fast/text/atsui-rtl-override-selection-expected.txt
WebCore/ChangeLog
WebCore/dom/Document.cpp
WebCore/dom/Document.h
WebCore/html/HTMLDocument.cpp
WebCore/html/HTMLDocument.h
WebCore/html/HTMLParser.cpp
WebCore/html/HTMLTokenizer.cpp
WebKit/ChangeLog
WebKit/WebInspector/WebInspector.m
WebKit/WebInspector/webInspector/inspector.js