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

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

Issue 1740193002: Fix the coordinates for touch selection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/test/data/touch_selection.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1452 matching lines...) Expand 10 before | Expand all | Expand 10 after
1463 1463
1464 webview()->focusedFrame()->executeCommand( 1464 webview()->focusedFrame()->executeCommand(
1465 WebString::fromUTF8(name), WebString::fromUTF8(value)); 1465 WebString::fromUTF8(name), WebString::fromUTF8(value));
1466 } 1466 }
1467 1467
1468 void RenderViewImpl::OnMoveCaret(const gfx::Point& point) { 1468 void RenderViewImpl::OnMoveCaret(const gfx::Point& point) {
1469 if (!webview()) 1469 if (!webview())
1470 return; 1470 return;
1471 1471
1472 Send(new InputHostMsg_MoveCaret_ACK(routing_id())); 1472 Send(new InputHostMsg_MoveCaret_ACK(routing_id()));
1473 1473 webview()->focusedFrame()->moveCaretSelection(
1474 webview()->focusedFrame()->moveCaretSelection(point); 1474 ConvertWindowPointToViewport(point));
1475 } 1475 }
1476 1476
1477 void RenderViewImpl::OnScrollFocusedEditableNodeIntoRect( 1477 void RenderViewImpl::OnScrollFocusedEditableNodeIntoRect(
1478 const gfx::Rect& rect) { 1478 const gfx::Rect& rect) {
1479 if (has_scrolled_focused_editable_node_into_rect_ && 1479 if (has_scrolled_focused_editable_node_into_rect_ &&
1480 rect == rect_for_scrolled_focused_editable_node_) { 1480 rect == rect_for_scrolled_focused_editable_node_) {
1481 FocusChangeComplete(); 1481 FocusChangeComplete();
1482 return; 1482 return;
1483 } 1483 }
1484 1484
(...skipping 2062 matching lines...) Expand 10 before | Expand all | Expand 10 after
3547 if (IsUseZoomForDSFEnabled()) { 3547 if (IsUseZoomForDSFEnabled()) {
3548 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); 3548 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_);
3549 } else { 3549 } else {
3550 webview()->setDeviceScaleFactor(device_scale_factor_); 3550 webview()->setDeviceScaleFactor(device_scale_factor_);
3551 } 3551 }
3552 webview()->settings()->setPreferCompositingToLCDTextEnabled( 3552 webview()->settings()->setPreferCompositingToLCDTextEnabled(
3553 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); 3553 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_));
3554 } 3554 }
3555 3555
3556 } // namespace content 3556 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/test/data/touch_selection.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698