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 c4fd9c04fa9072c1e1cc67fcd884951b81944d23..edea774080801741a30f18d0163f52d19d465690 100644 |
| --- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp |
| +++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp |
| @@ -2087,14 +2087,17 @@ bool isTextSecurityNode(const Node* node) { |
| } |
| const StaticRangeVector* targetRangesForInputEvent(const Node& node) { |
| + // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| + // needs to be audited. see http://crbug.com/590369 for more details. |
| + node.document().updateStyleAndLayoutIgnorePendingStylesheets(); |
| if (!hasRichlyEditableStyle(node)) |
| return nullptr; |
| - Range* range = createRange( |
| + EphemeralRange range = |
|
yosin_UTC9
2017/03/08 07:35:51
nit: s/EphmeralRange/const EphemeralRange&/
to avo
chongz
2017/03/08 18:31:09
Done.
|
| firstEphemeralRangeOf(node.document() |
| .frame() |
| ->selection() |
| - .computeVisibleSelectionInDOMTreeDeprecated())); |
| - if (!range) |
| + .computeVisibleSelectionInDOMTreeDeprecated()); |
| + if (range.isNull()) |
| return nullptr; |
| return new StaticRangeVector(1, StaticRange::create(range)); |
| } |