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

Side by Side Diff: content/renderer/render_widget.cc

Issue 12228005: Pass is_anchor_first with SelectionBounds_Params (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1875 matching lines...) Expand 10 before | Expand all | Expand 10 after
1886 if (!webwidget_) 1886 if (!webwidget_)
1887 return; 1887 return;
1888 1888
1889 ViewHostMsg_SelectionBounds_Params params; 1889 ViewHostMsg_SelectionBounds_Params params;
1890 GetSelectionBounds(&params.anchor_rect, &params.focus_rect); 1890 GetSelectionBounds(&params.anchor_rect, &params.focus_rect);
1891 if (selection_anchor_rect_ != params.anchor_rect || 1891 if (selection_anchor_rect_ != params.anchor_rect ||
1892 selection_focus_rect_ != params.focus_rect) { 1892 selection_focus_rect_ != params.focus_rect) {
1893 selection_anchor_rect_ = params.anchor_rect; 1893 selection_anchor_rect_ = params.anchor_rect;
1894 selection_focus_rect_ = params.focus_rect; 1894 selection_focus_rect_ = params.focus_rect;
1895 webwidget_->selectionTextDirection(params.focus_dir, params.anchor_dir); 1895 webwidget_->selectionTextDirection(params.focus_dir, params.anchor_dir);
1896 params.is_anchor_first = webwidget_->isSelectionAnchorFirst();
1896 Send(new ViewHostMsg_SelectionBoundsChanged(routing_id_, params)); 1897 Send(new ViewHostMsg_SelectionBoundsChanged(routing_id_, params));
1897 } 1898 }
1898 1899
1899 std::vector<gfx::Rect> character_bounds; 1900 std::vector<gfx::Rect> character_bounds;
1900 GetCompositionCharacterBounds(&character_bounds); 1901 GetCompositionCharacterBounds(&character_bounds);
1901 UpdateCompositionInfo(composition_range_, character_bounds); 1902 UpdateCompositionInfo(composition_range_, character_bounds);
1902 } 1903 }
1903 1904
1904 bool RenderWidget::ShouldUpdateCompositionInfo( 1905 bool RenderWidget::ShouldUpdateCompositionInfo(
1905 const ui::Range& range, 1906 const ui::Range& range,
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
2099 bool RenderWidget::WillHandleGestureEvent( 2100 bool RenderWidget::WillHandleGestureEvent(
2100 const WebKit::WebGestureEvent& event) { 2101 const WebKit::WebGestureEvent& event) {
2101 return false; 2102 return false;
2102 } 2103 }
2103 2104
2104 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { 2105 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const {
2105 return true; 2106 return true;
2106 } 2107 }
2107 2108
2108 } // namespace content 2109 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698