Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/EditingUtilities.cpp |
| diff --git a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp |
| index 60ef9c2598a6be301ff403ab218034e448a039c1..070d99679075ca3319991cb4bdbe3017d4dd7adc 100644 |
| --- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp |
| +++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp |
| @@ -618,6 +618,12 @@ PositionTemplate<Strategy> firstEditablePositionAfterPositionInRootAlgorithm( |
| if (nonEditableNode && |
| nonEditableNode->isDescendantOf(editablePosition.anchorNode())) |
| editablePosition = nextVisuallyDistinctCandidate(editablePosition); |
| + |
| + // if |editablePosition| is not editable, return the last editable position. |
| + // See http://crbug.com/669229. |
| + if (!isEditablePosition(editablePosition)) |
|
yosin_UTC9
2016/12/07 05:07:15
I think we should revise implementation of this fu
|
| + return PositionTemplate<Strategy>(&highestRoot, 1); |
| + |
| return editablePosition; |
| } |