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
#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)
// 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();