Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1020)

Unified Diff: third_party/WebKit/Source/core/editing/SelectionController.cpp

Issue 2104883002: Change text selection iterator behaviour for non-editable empty selection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added myself in AUTHORS list. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « AUTHORS ('k') | third_party/WebKit/Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « AUTHORS ('k') | third_party/WebKit/Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698