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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 2856093003: Update TextSelection for non-user initiated events (Closed)
Patch Set: Update TextSelection for non-user initiated events Created 3 years, 7 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
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index cdc4c14b3148c5811e45e81f3e89224cc6eb94ef..bb6bcd83ba2dace51964c6a0d11663c076490f6f 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -2373,7 +2373,7 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged(
#if defined(USE_X11) && !defined(OS_CHROMEOS)
const TextInputManager::TextSelection* selection =
GetTextInputManager()->GetTextSelection(focused_view);
- if (selection->selected_text().length()) {
+ if (selection->selected_text().length() && selection->user_initiated()) {
// Set the CLIPBOARD_TYPE_SELECTION to the ui::Clipboard.
ui::ScopedClipboardWriter clipboard_writer(ui::CLIPBOARD_TYPE_SELECTION);
clipboard_writer.WriteText(selection->selected_text());

Powered by Google App Engine
This is Rietveld 408576698