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

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

Issue 754963007: Revert of Move TouchSelectionController from content to ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 673016450050597b0898ff1a1ae14b43b912ce78..8db3faeab6baa94290b84757401ad7112abd5a4d 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -929,14 +929,13 @@
void RenderWidgetHostViewAura::SelectionBoundsChanged(
const ViewHostMsg_SelectionBounds_Params& params) {
ui::SelectionBound anchor_bound, focus_bound;
- anchor_bound.SetEdge(params.anchor_rect.origin(),
- params.anchor_rect.bottom_left());
- focus_bound.SetEdge(params.focus_rect.origin(),
- params.focus_rect.bottom_left());
+ anchor_bound.edge_top = params.anchor_rect.origin();
+ anchor_bound.edge_bottom = params.anchor_rect.bottom_left();
+ focus_bound.edge_top = params.focus_rect.origin();
+ focus_bound.edge_bottom = params.focus_rect.bottom_left();
if (params.anchor_rect == params.focus_rect) {
- anchor_bound.set_type(ui::SelectionBound::CENTER);
- focus_bound.set_type(ui::SelectionBound::CENTER);
+ anchor_bound.type = focus_bound.type = ui::SelectionBound::CENTER;
} else {
// Whether text is LTR at the anchor handle.
bool anchor_LTR = params.anchor_dir == blink::WebTextDirectionLeftToRight;
@@ -945,15 +944,15 @@
if ((params.is_anchor_first && anchor_LTR) ||
(!params.is_anchor_first && !anchor_LTR)) {
- anchor_bound.set_type(ui::SelectionBound::LEFT);
+ anchor_bound.type = ui::SelectionBound::LEFT;
} else {
- anchor_bound.set_type(ui::SelectionBound::RIGHT);
+ anchor_bound.type = ui::SelectionBound::RIGHT;
}
if ((params.is_anchor_first && focus_LTR) ||
(!params.is_anchor_first && !focus_LTR)) {
- focus_bound.set_type(ui::SelectionBound::RIGHT);
+ focus_bound.type = ui::SelectionBound::RIGHT;
} else {
- focus_bound.set_type(ui::SelectionBound::LEFT);
+ focus_bound.type = ui::SelectionBound::LEFT;
}
}
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.h ('k') | content/browser/web_contents/touch_editable_impl_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698