Index: Source/core/editing/DeleteSelectionCommand.cpp |
diff --git a/Source/core/editing/DeleteSelectionCommand.cpp b/Source/core/editing/DeleteSelectionCommand.cpp |
index be256e602f54583cfa4821d54cd46738f2264b70..164437e8c25f02fbdaae9d5b7c15953e54cbb0e3 100644 |
--- a/Source/core/editing/DeleteSelectionCommand.cpp |
+++ b/Source/core/editing/DeleteSelectionCommand.cpp |
@@ -532,7 +532,7 @@ void DeleteSelectionCommand::handleGeneralDelete() |
} |
} |
- if (m_downstreamEnd.deprecatedNode() != startNode && !m_upstreamStart.deprecatedNode()->isDescendantOf(m_downstreamEnd.deprecatedNode()) && m_downstreamEnd.anchorNode()->inDocument() && m_downstreamEnd.deprecatedEditingOffset() >= caretMinOffset(m_downstreamEnd.deprecatedNode())) { |
+ if (m_downstreamEnd.deprecatedNode() != startNode && !m_upstreamStart.deprecatedNode()->isDescendantOf(m_downstreamEnd.deprecatedNode()) && m_downstreamEnd.inDocument() && m_downstreamEnd.deprecatedEditingOffset() >= caretMinOffset(m_downstreamEnd.deprecatedNode())) { |
if (m_downstreamEnd.atLastEditingPositionForNode() && !canHaveChildrenForEditing(m_downstreamEnd.deprecatedNode())) { |
// The node itself is fully selected, not just its contents. Delete it. |
removeNode(m_downstreamEnd.deprecatedNode()); |
@@ -549,7 +549,7 @@ void DeleteSelectionCommand::handleGeneralDelete() |
// know how many children to remove. |
// FIXME: Make m_upstreamStart a position we update as we remove content, then we can |
// always know which children to remove. |
- } else if (!(startNodeWasDescendantOfEndNode && !m_upstreamStart.anchorNode()->inDocument())) { |
+ } else if (!(startNodeWasDescendantOfEndNode && !m_upstreamStart.inDocument())) { |
int offset = 0; |
if (m_upstreamStart.deprecatedNode()->isDescendantOf(m_downstreamEnd.deprecatedNode())) { |
Node* n = m_upstreamStart.deprecatedNode(); |
@@ -601,7 +601,7 @@ void DeleteSelectionCommand::mergeParagraphs() |
ASSERT(!m_pruneStartBlockIfNecessary); |
// FIXME: Deletion should adjust selection endpoints as it removes nodes so that we never get into this state (4099839). |
- if (!m_downstreamEnd.anchorNode()->inDocument() || !m_upstreamStart.anchorNode()->inDocument()) |
+ if (!m_downstreamEnd.inDocument() || !m_upstreamStart.inDocument()) |
return; |
// FIXME: The deletion algorithm shouldn't let this happen. |