Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/SelectionController.cpp |
| diff --git a/third_party/WebKit/Source/core/editing/SelectionController.cpp b/third_party/WebKit/Source/core/editing/SelectionController.cpp |
| index 2a2de00affe2c588c740a2593162894d6dc99f54..b07f0766af86f9dad1d5f5308f83f19ee61d5400 100644 |
| --- a/third_party/WebKit/Source/core/editing/SelectionController.cpp |
| +++ b/third_party/WebKit/Source/core/editing/SelectionController.cpp |
| @@ -316,6 +316,13 @@ void SelectionController::selectClosestWordFromHitTestResult(const HitTestResult |
| } |
| if (selectInputEventType == SelectInputEventType::Touch) { |
| + if (pos.isNull()) |
| + return; |
| + |
| + // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| + // needs to be audited. See http://crbug.com/590369 for more details. |
| + pos.deepEquivalent().document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
|
yosin_UTC9
2016/08/31 04:58:21
There are only two call sites of selectClosestWord
Xiaocheng
2016/09/02 05:37:24
Done.
|
| + |
| // If node doesn't have text except space, tab or line break, do not |
| // select that 'empty' area. |
| EphemeralRangeInFlatTree range(newSelection.start(), newSelection.end()); |