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 d5cfe61d4806e0235279054e62df41781e04ab39..453a3f48f41b08e38d6227d2751a81de2b7bbf0d 100644 |
--- a/third_party/WebKit/Source/core/editing/SelectionController.cpp |
+++ b/third_party/WebKit/Source/core/editing/SelectionController.cpp |
@@ -318,7 +318,7 @@ void SelectionController::selectClosestWordFromHitTestResult(const HitTestResult |
// If node doesn't have text except space, tab or line break, do not |
// select that 'empty' area. |
EphemeralRangeInFlatTree range(newSelection.start(), newSelection.end()); |
- const String& str = plainText(range, TextIteratorEmitsObjectReplacementCharacter); |
+ const String& str = plainText(range, innerNode->hasEditableStyle() ? TextIteratorEmitsObjectReplacementCharacter : TextIteratorDefaultBehavior); |
if (str.isEmpty() || str.simplifyWhiteSpace().containsOnlyWhitespace()) |
return; |