| 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 2ed10f7090cccc9eb40b19e40d567ce0a42a792d..565a6bc650129f3840530c8acc0dd99e7b4fe21a 100644
|
| --- a/third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp
|
| @@ -84,7 +84,7 @@ PositionInFlatTree AdjustPositionInFlatTreeForStart(
|
| Node* shadow_host) {
|
| if (IsEnclosedBy(position, *shadow_host)) {
|
| if (position.IsBeforeChildren())
|
| - return PositionInFlatTree::BeforeNode(shadow_host);
|
| + return PositionInFlatTree::BeforeNode(*shadow_host);
|
| return PositionInFlatTree::AfterNode(shadow_host);
|
| }
|
|
|
| @@ -92,7 +92,7 @@ PositionInFlatTree AdjustPositionInFlatTreeForStart(
|
| // compatibility. The positions are same but the anchors would be different,
|
| // and selection painting uses anchor nodes.
|
| if (Node* first_child = FlatTreeTraversal::FirstChild(*shadow_host))
|
| - return PositionInFlatTree::BeforeNode(first_child);
|
| + return PositionInFlatTree::BeforeNode(*first_child);
|
| return PositionInFlatTree();
|
| }
|
|
|
| @@ -106,7 +106,7 @@ Position AdjustPositionForEnd(const Position& current_position,
|
| current_position.ComputeContainerNode())) {
|
| if (ancestor->contains(start_container_node))
|
| return Position::AfterNode(ancestor);
|
| - return Position::BeforeNode(ancestor);
|
| + return Position::BeforeNode(*ancestor);
|
| }
|
|
|
| if (Node* last_child = tree_scope.RootNode().lastChild())
|
| @@ -121,7 +121,7 @@ PositionInFlatTree AdjustPositionInFlatTreeForEnd(
|
| if (IsEnclosedBy(position, *shadow_host)) {
|
| if (position.IsAfterChildren())
|
| return PositionInFlatTree::AfterNode(shadow_host);
|
| - return PositionInFlatTree::BeforeNode(shadow_host);
|
| + return PositionInFlatTree::BeforeNode(*shadow_host);
|
| }
|
|
|
| // We use |lastChild|'s after instead of afterAllChildren for backward
|
| @@ -141,12 +141,12 @@ Position AdjustPositionForStart(const Position& current_position,
|
| if (Node* ancestor = tree_scope.AncestorInThisScope(
|
| current_position.ComputeContainerNode())) {
|
| if (ancestor->contains(end_container_node))
|
| - return Position::BeforeNode(ancestor);
|
| + return Position::BeforeNode(*ancestor);
|
| return Position::AfterNode(ancestor);
|
| }
|
|
|
| if (Node* first_child = tree_scope.RootNode().firstChild())
|
| - return Position::BeforeNode(first_child);
|
| + return Position::BeforeNode(*first_child);
|
|
|
| return Position();
|
| }
|
|
|