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 d73063fa545314227b75691fbe8b7ba98250a51a..4606c4af964710dfefade2a04922cae82b99fb55 100644 |
| --- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp |
| +++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp |
| @@ -2072,12 +2072,14 @@ bool isTextSecurityNode(const Node* node) { |
| const StaticRangeVector* targetRangesForInputEvent(const Node& node) { |
| if (!hasRichlyEditableStyle(node)) |
| return nullptr; |
| - return new StaticRangeVector( |
| - 1, StaticRange::create( |
| - firstRangeOf(node.document() |
| - .frame() |
| - ->selection() |
| - .computeVisibleSelectionInDOMTreeDeprecated()))); |
| + Range* range = |
|
yosin_UTC9
2017/03/03 05:11:50
We would like to do following after this patch:
-
chongz
2017/03/03 15:53:50
Sure, will create another patch.
|
| + firstRangeOf(node.document() |
| + .frame() |
| + ->selection() |
| + .computeVisibleSelectionInDOMTreeDeprecated()); |
| + if (!range) |
| + return nullptr; |
| + return new StaticRangeVector(1, StaticRange::create(range)); |
| } |
| DispatchEventResult dispatchBeforeInputInsertText(Node* target, |