Reviewed by darin.
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Feb 2008 09:04:22 +0000 (09:04 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Feb 2008 09:04:22 +0000 (09:04 +0000)
commit57978d436f76605bd9f6c12025f352b34452ad62
tree7695697140567adbc547a506125d6ef5037844b4
parentc9f46a3840176d457a3f1664d62be2678ac5e208
    Reviewed by darin.

        Add support for Text.wholeText and Text.replaceWholeText
        http://bugs.webkit.org/show_bug.cgi?id=17125

        Test EntityReferences to make sure they're always treated as read-only
        In doing so I discovered a bug in document.adoptNode(readonlyNode) (and fixed it)

        * dom/Document.cpp:
        (WebCore::Document::adoptNode): throw NO_MODIFICATION_ALLOWED_ERR when passed a readonly node
        * dom/Node.cpp:
        * dom/Node.cpp:
        (WebCore::Node::textContent):
        * dom/Text.cpp:
        (WebCore::earliestLogicallyAdjacentTextNode):
        (WebCore::latestLogicallyAdjacentTextNode):
        (WebCore::Text::wholeText):
        (WebCore::Text::replaceWholeText):
        * dom/Text.h:
        * dom/Text.idl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
26 files changed:
LayoutTests/ChangeLog
LayoutTests/dom/xhtml/level3/core/textreplacewholetext01-expected.txt
LayoutTests/dom/xhtml/level3/core/textreplacewholetext02-expected.txt
LayoutTests/dom/xhtml/level3/core/textreplacewholetext03-expected.txt
LayoutTests/dom/xhtml/level3/core/textreplacewholetext04-expected.txt
LayoutTests/dom/xhtml/level3/core/textreplacewholetext05-expected.txt
LayoutTests/dom/xhtml/level3/core/textreplacewholetext06-expected.txt
LayoutTests/dom/xhtml/level3/core/textreplacewholetext07-expected.txt
LayoutTests/dom/xhtml/level3/core/textwholetext01-expected.txt
LayoutTests/dom/xhtml/level3/core/textwholetext02-expected.txt
LayoutTests/dom/xhtml/level3/core/textwholetext03-expected.txt
LayoutTests/fast/dom/EntityReference/readonly-exceptions-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/EntityReference/readonly-exceptions.html [new file with mode: 0644]
LayoutTests/fast/dom/EntityReference/resources/TEMPLATE.html [new file with mode: 0644]
LayoutTests/fast/dom/EntityReference/resources/readonly-exceptions.js [new file with mode: 0644]
LayoutTests/fast/dom/Text/replaceWholeText-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/Text/replaceWholeText.html [new file with mode: 0644]
LayoutTests/fast/dom/Text/resources/TEMPLATE.html [new file with mode: 0644]
LayoutTests/fast/dom/Text/resources/replaceWholeText.js [new file with mode: 0644]
LayoutTests/fast/dom/Window/window-properties-expected.txt
WebCore/ChangeLog
WebCore/dom/Document.cpp
WebCore/dom/Node.cpp
WebCore/dom/Text.cpp
WebCore/dom/Text.h
WebCore/dom/Text.idl