OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |