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

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

Issue 2856093003: Update TextSelection for non-user initiated events (Closed)
Patch Set: Created 3 years, 8 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 64e3883071e13069017e7f3f006552e7392335d9..d9740957b5740202a507e5664dbf333347c39a5a 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -2357,7 +2357,7 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged(
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