| Index: content/renderer/render_widget.cc
|
| diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
|
| index 8cf0ae0735652ea30717f1baa56af0806975a309..1034e08991b2638cc1389cd86abc31b4acfecce1 100644
|
| --- a/content/renderer/render_widget.cc
|
| +++ b/content/renderer/render_widget.cc
|
| @@ -64,6 +64,7 @@
|
| #include "third_party/WebKit/public/web/WebPopupMenu.h"
|
| #include "third_party/WebKit/public/web/WebPopupMenuInfo.h"
|
| #include "third_party/WebKit/public/web/WebRange.h"
|
| +#include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
|
| #include "third_party/skia/include/core/SkShader.h"
|
| #include "ui/base/ui_base_switches.h"
|
| #include "ui/gfx/frame_time.h"
|
| @@ -1818,16 +1819,22 @@ void RenderWidget::UpdateSelectionBounds() {
|
| if (handling_ime_event_)
|
| return;
|
|
|
| - ViewHostMsg_SelectionBounds_Params params;
|
| - GetSelectionBounds(¶ms.anchor_rect, ¶ms.focus_rect);
|
| - if (selection_anchor_rect_ != params.anchor_rect ||
|
| - selection_focus_rect_ != params.focus_rect) {
|
| - selection_anchor_rect_ = params.anchor_rect;
|
| - selection_focus_rect_ = params.focus_rect;
|
| - webwidget_->selectionTextDirection(params.focus_dir, params.anchor_dir);
|
| - params.is_anchor_first = webwidget_->isSelectionAnchorFirst();
|
| - Send(new ViewHostMsg_SelectionBoundsChanged(routing_id_, params));
|
| + // With composited selection updates, the selection bounds will be reported
|
| + // directly by the compositor, in which case explicit IPC selection
|
| + // notifications should be suppressed.
|
| + if (!blink::WebRuntimeFeatures::isCompositedSelectionUpdateEnabled()) {
|
| + ViewHostMsg_SelectionBounds_Params params;
|
| + GetSelectionBounds(¶ms.anchor_rect, ¶ms.focus_rect);
|
| + if (selection_anchor_rect_ != params.anchor_rect ||
|
| + selection_focus_rect_ != params.focus_rect) {
|
| + selection_anchor_rect_ = params.anchor_rect;
|
| + selection_focus_rect_ = params.focus_rect;
|
| + webwidget_->selectionTextDirection(params.focus_dir, params.anchor_dir);
|
| + params.is_anchor_first = webwidget_->isSelectionAnchorFirst();
|
| + Send(new ViewHostMsg_SelectionBoundsChanged(routing_id_, params));
|
| + }
|
| }
|
| +
|
| #if defined(OS_MACOSX) || defined(USE_AURA)
|
| UpdateCompositionInfo(false);
|
| #endif
|
|
|