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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 2741503002: Hotfix: hasText value is incorrectly set (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index d60da64073eb29024c09b027513251a0ad2e25d3..b7b6e741b5555a87b1855b7694a229053d5fa045 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -3422,7 +3422,7 @@ extern NSString *NSTextInputReplacementRangeAttributeName;
BOOL returnTypeIsString = [returnType isEqual:NSStringPboardType];
const content::TextInputManager::TextSelection* selection =
renderWidgetHostView_->GetTextSelection();
- BOOL hasText = !selection || selection->selected_text().empty();
+ BOOL hasText = selection && !selection->selected_text().empty();
BOOL takesText =
renderWidgetHostView_->GetTextInputType() != ui::TEXT_INPUT_TYPE_NONE;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698