Index: Source/core/editing/VisibleSelection.cpp |
diff --git a/Source/core/editing/VisibleSelection.cpp b/Source/core/editing/VisibleSelection.cpp |
index c5fcdab9711d32802673bddf3b54b903e8161e15..3bb504b37d1c700ba946e03f56270d9fb3e8a2bd 100644 |
--- a/Source/core/editing/VisibleSelection.cpp |
+++ b/Source/core/editing/VisibleSelection.cpp |
@@ -571,7 +571,7 @@ void VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries() |
while (p.isNotNull() && !(lowestEditableAncestor(p.containerNode()) == baseEditableAncestor && !isEditablePosition(p))) { |
Node* root = editableRootForPosition(p); |
shadowAncestor = root ? root->shadowHost() : 0; |
- p = isAtomicNode(p.containerNode()) ? positionInParentBeforeNode(p.containerNode()) : previousVisuallyDistinctCandidate(p); |
+ p = isAtomicNode(p.containerNode()) ? positionInParentBeforeNode(*p.containerNode()) : previousVisuallyDistinctCandidate(p); |
if (p.isNull() && shadowAncestor) |
p = positionAfterNode(shadowAncestor); |
} |
@@ -600,7 +600,7 @@ void VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries() |
while (p.isNotNull() && !(lowestEditableAncestor(p.containerNode()) == baseEditableAncestor && !isEditablePosition(p))) { |
Node* root = editableRootForPosition(p); |
shadowAncestor = root ? root->shadowHost() : 0; |
- p = isAtomicNode(p.containerNode()) ? positionInParentAfterNode(p.containerNode()) : nextVisuallyDistinctCandidate(p); |
+ p = isAtomicNode(p.containerNode()) ? positionInParentAfterNode(*p.containerNode()) : nextVisuallyDistinctCandidate(p); |
if (p.isNull() && shadowAncestor) |
p = positionBeforeNode(shadowAncestor); |
} |