--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1044,11 +1044,20 @@ void RenderWidgetHostViewAura::Selection
   if (text.empty() || range.is_empty())
     return;
 
+  size_t pos = range.GetMin() - offset;
+  size_t n = range.length();
+
+  DCHECK(pos + n <= text.length()) << "The text can not fully cover range.";
+  if (pos >= text.length()) {
+    NOTREACHED() << "The text can not cover range.";
+    return;
+  }
+
   // Set the CLIPBOARD_TYPE_SELECTION to the ui::Clipboard.
   ui::ScopedClipboardWriter clipboard_writer(
       ui::Clipboard::GetForCurrentThread(),
       ui::CLIPBOARD_TYPE_SELECTION);
-  clipboard_writer.WriteText(text);
+  clipboard_writer.WriteText(text.substr(pos, n));
 #endif  // defined(USE_X11) && !defined(OS_CHROMEOS)
 }
 
--- a/ui/base/clipboard/clipboard_aurax11.cc
+++ b/ui/base/clipboard/clipboard_aurax11.cc
@@ -480,9 +480,9 @@ std::vector< ::Atom> Clipboard::AuraX11D
 
 void Clipboard::AuraX11Details::Clear(ClipboardType type) {
   if (type == CLIPBOARD_TYPE_COPY_PASTE)
-    return clipboard_owner_.Clear();
+    clipboard_owner_.ClearSelectionOwner();
   else
-    return primary_owner_.Clear();
+    primary_owner_.ClearSelectionOwner();
 }
 
 uint32_t Clipboard::AuraX11Details::Dispatch(const base::NativeEvent& event) {
--- a/ui/base/x/selection_owner.cc
+++ b/ui/base/x/selection_owner.cc
@@ -35,7 +35,8 @@ SelectionOwner::SelectionOwner(Display*
 }
 
 SelectionOwner::~SelectionOwner() {
-  Clear();
+  if (XGetSelectionOwner(x_display_, selection_name_) == x_window_)
+    XSetSelectionOwner(x_display_, selection_name_, None, CurrentTime);
 }
 
 void SelectionOwner::RetrieveTargets(std::vector<Atom>* targets) {
@@ -55,10 +56,8 @@ void SelectionOwner::TakeOwnershipOfSele
   }
 }
 
-void SelectionOwner::Clear() {
-  if (XGetSelectionOwner(x_display_, selection_name_) == x_window_)
-    XSetSelectionOwner(x_display_, selection_name_, None, CurrentTime);
-
+void SelectionOwner::ClearSelectionOwner() {
+  XSetSelectionOwner(x_display_, selection_name_, None, CurrentTime);
   format_map_ = SelectionFormatMap();
 }
 
--- a/ui/base/x/selection_owner.h
+++ b/ui/base/x/selection_owner.h
@@ -43,7 +43,7 @@ class UI_BASE_EXPORT SelectionOwner {
   void TakeOwnershipOfSelection(const SelectionFormatMap& data);
 
   // Releases the selection (if we own it) and clears any data we own.
-  void Clear();
+  void ClearSelectionOwner();
 
   // It is our owner's responsibility to plumb X11 events on |xwindow_| to us.
   void OnSelectionRequest(const XSelectionRequestEvent& event);
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -84,6 +84,7 @@ Textfield::Textfield()
       text_input_type_(ui::TEXT_INPUT_TYPE_TEXT),
       skip_input_method_cancel_composition_(false),
       cursor_visible_(false),
+      performing_user_action_(false),
       drop_cursor_visible_(false),
       initiating_drag_(false),
       aggregated_clicks_(0),
@@ -1371,6 +1372,9 @@ void Textfield::OnCaretBoundsChanged() {
 }
 
 void Textfield::OnBeforeUserAction() {
+  DCHECK(!performing_user_action_);
+  performing_user_action_ = true;
+
   if (controller_)
     controller_->OnBeforeUserAction(this);
 }
@@ -1378,6 +1382,8 @@ void Textfield::OnBeforeUserAction() {
 void Textfield::OnAfterUserAction() {
   if (controller_)
     controller_->OnAfterUserAction(this);
+  DCHECK(performing_user_action_);
+  performing_user_action_ = false;
 }
 
 bool Textfield::Cut() {
@@ -1471,7 +1477,7 @@ void Textfield::CreateTouchSelectionCont
 
 void Textfield::UpdateSelectionClipboard() const {
 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-  if (HasSelection()) {
+  if (performing_user_action_ && HasSelection()) {
     ui::ScopedClipboardWriter(
         ui::Clipboard::GetForCurrentThread(),
         ui::CLIPBOARD_TYPE_SELECTION).WriteText(GetSelectedText());
--- a/ui/views/controls/textfield/textfield.h
+++ b/ui/views/controls/textfield/textfield.h
@@ -400,6 +400,8 @@ class VIEWS_EXPORT Textfield : public Vi
   base::TimeDelta password_reveal_duration_;
   base::OneShotTimer<Textfield> password_reveal_timer_;
 
+  bool performing_user_action_;
+
   // True if InputMethod::CancelComposition() should not be called.
   bool skip_input_method_cancel_composition_;
 
