Index: Source/core/editing/DeleteSelectionCommand.cpp |
diff --git a/Source/core/editing/DeleteSelectionCommand.cpp b/Source/core/editing/DeleteSelectionCommand.cpp |
index a01bb00bf2e032a4263dba30772596db6beafcec..9ba5478843d829c558f1d7882ba0384f3f6fa488 100644 |
--- a/Source/core/editing/DeleteSelectionCommand.cpp |
+++ b/Source/core/editing/DeleteSelectionCommand.cpp |
@@ -36,6 +36,7 @@ |
#include "core/editing/VisibleUnits.h" |
#include "core/editing/htmlediting.h" |
#include "core/html/HTMLInputElement.h" |
+#include "core/html/HTMLTableElement.h" |
#include "core/page/Frame.h" |
#include "core/rendering/RenderTableCell.h" |
@@ -443,7 +444,7 @@ void DeleteSelectionCommand::handleGeneralDelete() |
makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss(); |
// Never remove the start block unless it's a table, in which case we won't merge content in. |
- if (startNode == m_startBlock && startOffset == 0 && canHaveChildrenForEditing(startNode) && !startNode->hasTagName(tableTag)) { |
+ if (startNode->isSameNode(m_startBlock.get()) && !startOffset && canHaveChildrenForEditing(startNode) && !isHTMLTableElement(startNode)) { |
startOffset = 0; |
startNode = NodeTraversal::next(startNode); |
if (!startNode) |