Better solution for Docomo 1339 bug.
authorWojciech Bielawski <w.bielawski@samsung.com>
Tue, 7 May 2013 09:07:48 +0000 (11:07 +0200)
committerWojciech Bielawski <w.bielawski@samsung.com>
Wed, 8 May 2013 07:55:23 +0000 (09:55 +0200)
Source/WebCore/editing/ReplaceSelectionCommand.cpp

index 4799314..91b0957 100644 (file)
@@ -945,11 +945,16 @@ void ReplaceSelectionCommand::doApply()
         if (RefPtr<Node> nodeToSplitTo = nodeToSplitToAvoidPastingIntoInlineNodesWithStyle(insertionPos)) {
             if (insertionPos.containerNode() != nodeToSplitTo->parentNode()) {
                 Node* splitStart = insertionPos.computeNodeAfterPosition();
+#if ENABLE(ENABLE_TIZEN_CONTENT_EDITABLE_BACKSPACE)
+                if (splitStart) {
+                    nodeToSplitTo = splitTreeToNode(splitStart, nodeToSplitTo->parentNode()).get();
+                    insertionPos = positionInParentBeforeNode(nodeToSplitTo.get());
+                }
+#else
                 if (!splitStart)
                     splitStart = insertionPos.containerNode();
                 nodeToSplitTo = splitTreeToNode(splitStart, nodeToSplitTo->parentNode()).get();
-#if !ENABLE(ENABLE_TIZEN_CONTENT_EDITABLE_BACKSPACE)
-                 insertionPos = positionInParentBeforeNode(nodeToSplitTo.get());
+                insertionPos = positionInParentBeforeNode(nodeToSplitTo.get());
 #endif
             }
         }