| Index: third_party/WebKit/Source/core/editing/VisibleUnits.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
|
| index c0c782d05229538a0e83f5cada41032c03ecd736..088a6df8bd61fff9180c7cc203c282279048378b 100644
|
| --- a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
|
| @@ -126,7 +126,7 @@ static PositionType canonicalPosition(const PositionType& passedPosition)
|
| if (node && node->document().documentElement() == node && !node->hasEditableStyle() && node->document().body() && node->document().body()->hasEditableStyle())
|
| return next.isNotNull() ? next : prev;
|
|
|
| - Element* editingRoot = editableRootElementForPosition(position);
|
| + Element* editingRoot = rootEditableElementOf(position);
|
|
|
| // If the html element is editable, descending into its body will look like
|
| // a descent from non-editable to editable content since
|
| @@ -134,8 +134,8 @@ static PositionType canonicalPosition(const PositionType& passedPosition)
|
| if ((editingRoot && editingRoot->document().documentElement() == editingRoot) || position.anchorNode()->isDocumentNode())
|
| return next.isNotNull() ? next : prev;
|
|
|
| - bool prevIsInSameEditableElement = prevNode && editableRootElementForPosition(prev) == editingRoot;
|
| - bool nextIsInSameEditableElement = nextNode && editableRootElementForPosition(next) == editingRoot;
|
| + bool prevIsInSameEditableElement = prevNode && rootEditableElementOf(prev) == editingRoot;
|
| + bool nextIsInSameEditableElement = nextNode && rootEditableElementOf(next) == editingRoot;
|
| if (prevIsInSameEditableElement && !nextIsInSameEditableElement)
|
| return prev;
|
|
|
|
|