Reviewed by Justin.

        <rdar://problem/4204892> Correcting incorrect spelling in Mail causes others to lose their red squiggles

        Fixed by having SplitTextNodeCommand::doApply copy the markers to the new node, and having SplitTextNodeCommand::doUnapply
        copy the markers from the merged-in node to the combined node.

        btw - filed <rdar://problem/4256492> "WebCore editing automated layout tests verify spelling markers"
        so that we can automate tests for this.

        Test cases added:
        * manual-tests/keep_spelling_markers.html: Added.

        * khtml/editing/split_text_node_command.cpp:
        (khtml::SplitTextNodeCommand::doApply):
        (khtml::SplitTextNodeCommand::doUnapply):
        Call new copyMarkers() function.

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::removeMarkers):
        (DocumentImpl::addMarker):
        (DocumentImpl::copyMarkers):
        (DocumentImpl::markersForNode):
        (DocumentImpl::shiftMarkers):
        * khtml/xml/dom_docimpl.h:
        (DOM::DocumentMarker::):
        Added copyMarkers() function.  Reorganized code for clarity.

        * khtml/xml/dom_textimpl.cpp:
        (CharacterDataImpl::setData):
        (CharacterDataImpl::deleteData):
        (CharacterDataImpl::replaceData):
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::respondToChangedSelection):
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge unmarkAllMisspellings]):
        Update calls to marker functions.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@10530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/manual-tests/keep_spelling_markers.html b/WebCore/manual-tests/keep_spelling_markers.html
new file mode 100644
index 0000000..91b89ca
--- /dev/null
+++ b/WebCore/manual-tests/keep_spelling_markers.html
@@ -0,0 +1,12 @@
+<HTML><BODY contenteditable>
+<p>- open this in Blot</p>
+<p>- turn on Check Spelling as You Type from Edit-&gt;Spelling menu</p>
+<p>- click on each of the misspelled words in the line at the bottom of this page</p>
+<p>&nbsp;&nbsp;(result should be that each misspelled word now has a red squiggly line below it)
+<p>- control-click on &#147;foor&#148; in that sentence</p>
+<p>- select a corrected spelling from the popup, e.g.&#147;four&#148;</p>
+<p>- make sure that no other misspellings lost their red squiggly underline</p>
+<p>- was bug #4204892</p>
+<hr>
+<p>One twwo three foor five siz seven</p>
+</BODY></HTML>