| Index: content/renderer/render_view.cc
|
| ===================================================================
|
| --- content/renderer/render_view.cc (revision 95703)
|
| +++ content/renderer/render_view.cc (working copy)
|
| @@ -361,8 +361,7 @@
|
| accessibility_ack_pending_(false),
|
| p2p_socket_dispatcher_(NULL),
|
| devtools_agent_(NULL),
|
| - session_storage_namespace_id_(session_storage_namespace_id),
|
| - handling_select_range_(false) {
|
| + session_storage_namespace_id_(session_storage_namespace_id) {
|
| routing_id_ = routing_id;
|
| if (opener_id != MSG_ROUTING_NONE)
|
| opener_id_ = opener_id;
|
| @@ -615,7 +614,6 @@
|
| IPC_MESSAGE_HANDLER(ViewMsg_Replace, OnReplace)
|
| IPC_MESSAGE_HANDLER(ViewMsg_Delete, OnDelete)
|
| IPC_MESSAGE_HANDLER(ViewMsg_SelectAll, OnSelectAll)
|
| - IPC_MESSAGE_HANDLER(ViewMsg_SelectRange, OnSelectRange)
|
| IPC_MESSAGE_HANDLER(ViewMsg_CopyImageAt, OnCopyImageAt)
|
| IPC_MESSAGE_HANDLER(ViewMsg_ExecuteEditCommand, OnExecuteEditCommand)
|
| IPC_MESSAGE_HANDLER(ViewMsg_Find, OnFind)
|
| @@ -981,15 +979,6 @@
|
| WebString::fromUTF8("SelectAll"));
|
| }
|
|
|
| -void RenderView::OnSelectRange(const gfx::Point& start, const gfx::Point& end) {
|
| - if (!webview())
|
| - return;
|
| -
|
| - handling_select_range_ = true;
|
| - webview()->focusedFrame()->selectRange(start, end);
|
| - handling_select_range_ = false;
|
| -}
|
| -
|
| void RenderView::OnSetInitialFocus(bool reverse) {
|
| if (!webview())
|
| return;
|
| @@ -1526,9 +1515,8 @@
|
|
|
| void RenderView::didChangeSelection(bool is_empty_selection) {
|
| #if defined(OS_POSIX)
|
| - if (!handling_input_event_ && !handling_select_range_)
|
| + if (!handling_input_event_)
|
| return;
|
| - handling_select_range_ = false;
|
|
|
| if (is_empty_selection) {
|
| last_selection_.clear();
|
| @@ -1549,22 +1537,7 @@
|
| range.set_start(location);
|
| range.set_end(location + length);
|
| }
|
| -
|
| - WebKit::WebPoint start, end;
|
| - webview()->selectionRange(start, end);
|
| -
|
| - // Webkit gives an offset of 1 between start and end even if there is no
|
| - // selection. So we need to check against that.
|
| - // TODO(varunjain): remove this check once that is fixed.
|
| - gfx::Point p1, p2;
|
| - if (std::abs(start.x - end.x) > 1 || std::abs(start.y - end.y) > 1) {
|
| - gfx::Point scroll_offset = GetScrollOffset();
|
| - p1.SetPoint(start.x + scroll_offset.x(), start.y + scroll_offset.y());
|
| - p2.SetPoint(end.x + scroll_offset.x(), end.y + scroll_offset.y());
|
| - }
|
| - // TODO(varunjain): add other hooks for SelectionChanged.
|
| - Send(new ViewHostMsg_SelectionChanged(routing_id_, last_selection_, range,
|
| - p1, p2));
|
| + Send(new ViewHostMsg_SelectionChanged(routing_id_, last_selection_, range));
|
| #endif // defined(OS_POSIX)
|
| }
|
|
|
|
|