Index: Source/core/editing/VisibleUnits.cpp |
diff --git a/Source/core/editing/VisibleUnits.cpp b/Source/core/editing/VisibleUnits.cpp |
index 78746f5c510b6129d4b5c5c49ab75e33731425ee..9ffa0c86b26111f990102052a61108d09d4f7224 100644 |
--- a/Source/core/editing/VisibleUnits.cpp |
+++ b/Source/core/editing/VisibleUnits.cpp |
@@ -996,7 +996,7 @@ VisiblePosition nextLinePosition(const VisiblePosition &visiblePosition, int lin |
if (!root) { |
// FIXME: We need do the same in previousLinePosition. |
Node* child = node->traverseToChildAt(p.deprecatedEditingOffset()); |
- node = child ? child : &node->lastDescendant(); |
+ node = child ? child : &node->lastDescendantOrSelf(); |
Position position = nextRootInlineBoxCandidatePosition(node, visiblePosition, editableType); |
if (position.isNotNull()) { |
RenderedPosition renderedPosition((VisiblePosition(position))); |