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 60f179a96509fb54c23b1de1396f1530119f9c9c..e7e1b6240842ef49dbdd122c763c023f77c07d31 100644 |
| --- a/third_party/WebKit/Source/core/editing/SelectionController.cpp |
| +++ b/third_party/WebKit/Source/core/editing/SelectionController.cpp |
| @@ -304,14 +304,12 @@ void SelectionController::selectClosestWordFromHitTestResult(const HitTestResult |
| } |
| #if OS(ANDROID) |
| - // If node is not editable and doesn't have text except space, tab or |
| - // line break, do not select that 'empty' area. |
| - if (!innerNode->hasEditableStyle()) { |
| - EphemeralRangeTemplate<Strategy> range = EphemeralRangeTemplate<Strategy>(newSelection.start(), newSelection.end()); |
| - String str = plainText(range, TextIteratorDefaultBehavior); |
| - if (str.isEmpty() || str.simplifyWhiteSpace().containsOnlyWhitespace()) |
| - return; |
| - } |
| + // If node doesn't have text except space, tab or line break, do not |
| + // select that 'empty' area. |
| + EphemeralRangeTemplate<Strategy> range = EphemeralRangeTemplate<Strategy>(newSelection.start(), newSelection.end()); |
| + String str = plainText(range, TextIteratorDefaultBehavior); |
|
yosin_UTC9
2016/02/03 06:49:28
nit: |const String&| to avoid unnecessary copy of
|
| + if (str.isEmpty() || str.simplifyWhiteSpace().containsOnlyWhitespace()) |
| + return; |
| #endif |
| if (appendTrailingWhitespace == AppendTrailingWhitespace::ShouldAppend && newSelection.isRange()) |