| Index: third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp b/third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp
|
| index 565a6bc650129f3840530c8acc0dd99e7b4fe21a..3c85a2dac8900e813eea720a2eb64f44ddb6e424 100644
|
| --- a/third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp
|
| @@ -85,7 +85,7 @@ PositionInFlatTree AdjustPositionInFlatTreeForStart(
|
| if (IsEnclosedBy(position, *shadow_host)) {
|
| if (position.IsBeforeChildren())
|
| return PositionInFlatTree::BeforeNode(*shadow_host);
|
| - return PositionInFlatTree::AfterNode(shadow_host);
|
| + return PositionInFlatTree::AfterNode(*shadow_host);
|
| }
|
|
|
| // We use |firstChild|'s after instead of beforeAllChildren for backward
|
| @@ -105,12 +105,12 @@ Position AdjustPositionForEnd(const Position& current_position,
|
| if (Node* ancestor = tree_scope.AncestorInThisScope(
|
| current_position.ComputeContainerNode())) {
|
| if (ancestor->contains(start_container_node))
|
| - return Position::AfterNode(ancestor);
|
| + return Position::AfterNode(*ancestor);
|
| return Position::BeforeNode(*ancestor);
|
| }
|
|
|
| if (Node* last_child = tree_scope.RootNode().lastChild())
|
| - return Position::AfterNode(last_child);
|
| + return Position::AfterNode(*last_child);
|
|
|
| return Position();
|
| }
|
| @@ -120,7 +120,7 @@ PositionInFlatTree AdjustPositionInFlatTreeForEnd(
|
| Node* shadow_host) {
|
| if (IsEnclosedBy(position, *shadow_host)) {
|
| if (position.IsAfterChildren())
|
| - return PositionInFlatTree::AfterNode(shadow_host);
|
| + return PositionInFlatTree::AfterNode(*shadow_host);
|
| return PositionInFlatTree::BeforeNode(*shadow_host);
|
| }
|
|
|
| @@ -128,7 +128,7 @@ PositionInFlatTree AdjustPositionInFlatTreeForEnd(
|
| // compatibility. The positions are same but the anchors would be different,
|
| // and selection painting uses anchor nodes.
|
| if (Node* last_child = FlatTreeTraversal::LastChild(*shadow_host))
|
| - return PositionInFlatTree::AfterNode(last_child);
|
| + return PositionInFlatTree::AfterNode(*last_child);
|
| return PositionInFlatTree();
|
| }
|
|
|
| @@ -142,7 +142,7 @@ Position AdjustPositionForStart(const Position& current_position,
|
| current_position.ComputeContainerNode())) {
|
| if (ancestor->contains(end_container_node))
|
| return Position::BeforeNode(*ancestor);
|
| - return Position::AfterNode(ancestor);
|
| + return Position::AfterNode(*ancestor);
|
| }
|
|
|
| if (Node* first_child = tree_scope.RootNode().firstChild())
|
|
|