Index: Source/core/editing/InsertLineBreakCommand.cpp |
diff --git a/Source/core/editing/InsertLineBreakCommand.cpp b/Source/core/editing/InsertLineBreakCommand.cpp |
index b02dbd71612f6ea64d0e483123ad7c0f96a08dab..9a4e72276482140878931745ee8e3af19bccb364 100644 |
--- a/Source/core/editing/InsertLineBreakCommand.cpp |
+++ b/Source/core/editing/InsertLineBreakCommand.cpp |
@@ -35,6 +35,7 @@ |
#include "core/editing/VisibleUnits.h" |
#include "core/editing/htmlediting.h" |
#include "core/html/HTMLElement.h" |
+#include "core/html/HTMLTableElement.h" |
#include "core/page/Frame.h" |
#include "core/rendering/RenderObject.h" |
@@ -112,10 +113,10 @@ void InsertLineBreakCommand::doApply() |
nodeToInsert = document()->createTextNode("\n"); |
// FIXME: Need to merge text nodes when inserting just after or before text. |
- |
+ |
if (isEndOfParagraph(caret) && !lineBreakExistsAtVisiblePosition(caret)) { |
- bool needExtraLineBreak = !pos.deprecatedNode()->hasTagName(hrTag) && !pos.deprecatedNode()->hasTagName(tableTag); |
- |
+ bool needExtraLineBreak = !pos.deprecatedNode()->hasTagName(hrTag) && !isHTMLTableElement(pos.deprecatedNode()); |
+ |
insertNodeAt(nodeToInsert.get(), pos); |
if (needExtraLineBreak) |