-
thatcher authored
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: http://svn.webkit.org/repository/webkit/trunk@15247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
e6e3e565