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

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

Issue 2903833002: Reland: Update TextSelection for non-user initiated events
Patch Set: Suppress superfluous non-user initiated text selection events Created 3 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
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 9a4eece3a897724f1e9cd4d7828819ce8bb97c40..681181b8adab5cbd37099bf3c3b7ce5ea796c3e9 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -2389,7 +2389,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()) {
Changwan Ryu 2017/07/14 18:44:03 This CL does more than commit description as follo
Peter Varga 2017/07/17 09:36:06 I thought the description is clear enough but I wi
// 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