From: Michał Pakuła vel Rutka Date: Sun, 28 Apr 2013 15:36:19 +0000 (+0200) Subject: Fix DCM-1341 X-Git-Tag: submit/tizen_2.1/20130514.045449~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cc3f8fa6dec7f1929e19f820e9a3e182961a0608;p=framework%2Fweb%2Fwebkit-efl.git Fix DCM-1341 This is a quick fix for a bug DCM-1341 where new paragraph was not created on contenteditable area with image and text nodes inside span tag. Change-Id: I83708d2e816b86a722555729c7348d394917b98f Conflicts: Source/WTF/wtf/Platform.h --- diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h index 968ed6f..2925e2f 100644 --- a/Source/WTF/wtf/Platform.h +++ b/Source/WTF/wtf/Platform.h @@ -447,6 +447,7 @@ #define ENABLE_TIZEN_DRAW_SCALED_PATTERN 1 /* Kyungjin Kim(gen.kim@samsung.com) : Scale image prior to draw it's pattern to enhance performance */ #define ENABLE_TIZEN_PAINT_SELECTION_ANTIALIAS_NONE 1 /* Hyeonji Kim(hyeonji.kim@samsung.com) : Remove the line between the preceding text block and the next text block which are selected */ #define ENABLE_TIZEN_USE_SETTINGS_FONT 1 /* Hyeonji Kim(hyeonji.kim@samsung.com) : When font-family is "Tizen", use system's setting font as default font-family */ +#define ENABLE_TIZEN_PARAGRAPH_SEPARATOR_FIX 1 /* Michal Pakula (m.pakula@samsung.com) : This is a quick fix for a bug where new paragraph was not created on contenteditable area with image and text nodes inside span tag */ #define ENABLE_TIZEN_CONTENT_EDITABLE_BACKSPACE 1 /* Wojciech Bielawski(w.bielawski.com) : This is a quick fix for a bug where after pressing backspace image was moved not correctly */ #if ENABLE(TEXT_AUTOSIZING) diff --git a/Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp b/Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp index 10f5889..8996868 100644 --- a/Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp +++ b/Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp @@ -361,7 +361,12 @@ void InsertParagraphSeparatorCommand::doApply() // Move the start node and the siblings of the start node. if (VisiblePosition(insertionPosition) != VisiblePosition(positionBeforeNode(blockToInsert.get()))) { Node* n; +#if ENABLE(TIZEN_PARAGRAPH_SEPARATOR_FIX) + if (insertionPosition.containerNode() == startBlock + || (insertionPosition.containerNode()->parentNode() && insertionPosition.containerNode()->hasChildNodes() && insertionPosition.containerNode()->parentNode() == startBlock)) +#else if (insertionPosition.containerNode() == startBlock) +#endif n = insertionPosition.computeNodeAfterPosition(); else { Node* splitTo = insertionPosition.containerNode();