Index: third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp |
diff --git a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp |
index 937bc729b0f3b8cb3b804d80ed4c8b629cc759cb..9e6896ee1309521e2ec3500ae956a7afb640075d 100644 |
--- a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp |
+++ b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp |
@@ -612,8 +612,11 @@ void TypingCommand::deleteKeyPressed(TextGranularity granularity, |
// anything. |
} else if (Element* table = tableElementJustBefore(visibleStart)) { |
setEndingSelection(createVisibleSelection( |
- Position::beforeNode(table), endingSelection().start(), |
- TextAffinity::Downstream, endingSelection().isDirectional())); |
+ SelectionInDOMTree::Builder() |
+ .setBaseAndExtentDeprecated(Position::beforeNode(table), |
Xiaocheng
2016/10/26 05:49:18
We can use |setBaseAndExtent| since Position::befo
yosin_UTC9
2016/10/26 07:43:07
Done.
|
+ endingSelection().start()) |
+ .setIsDirectional(endingSelection().isDirectional()) |
+ .build())); |
typingAddedToOpenCommand(DeleteKey); |
return; |
} |
@@ -730,9 +733,12 @@ void TypingCommand::forwardDeleteKeyPressed(TextGranularity granularity, |
downstreamEnd.computeOffsetInContainerNode() <= |
caretMinOffset(downstreamEnd.computeContainerNode())) { |
setEndingSelection(createVisibleSelection( |
- endingSelection().end(), |
- Position::afterNode(downstreamEnd.computeContainerNode()), |
- TextAffinity::Downstream, endingSelection().isDirectional())); |
+ SelectionInDOMTree::Builder() |
+ .setBaseAndExtentDeprecated( |
+ endingSelection().end(), |
+ Position::afterNode(downstreamEnd.computeContainerNode())) |
+ .setIsDirectional(endingSelection().isDirectional()) |
+ .build())); |
typingAddedToOpenCommand(ForwardDeleteKey); |
return; |
} |