| 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 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 2596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2607 #if defined(OS_ANDROID) | 2607 #if defined(OS_ANDROID) |
| 2608 bool RenderViewImpl::didTapMultipleTargets( | 2608 bool RenderViewImpl::didTapMultipleTargets( |
| 2609 const WebSize& inner_viewport_offset, | 2609 const WebSize& inner_viewport_offset, |
| 2610 const WebRect& touch_rect, | 2610 const WebRect& touch_rect, |
| 2611 const WebVector<WebRect>& target_rects) { | 2611 const WebVector<WebRect>& target_rects) { |
| 2612 // Never show a disambiguation popup when accessibility is enabled, | 2612 // Never show a disambiguation popup when accessibility is enabled, |
| 2613 // as this interferes with "touch exploration". | 2613 // as this interferes with "touch exploration". |
| 2614 AccessibilityMode accessibility_mode = | 2614 AccessibilityMode accessibility_mode = |
| 2615 GetMainRenderFrame()->accessibility_mode(); | 2615 GetMainRenderFrame()->accessibility_mode(); |
| 2616 bool matches_accessibility_mode_complete = | 2616 bool matches_accessibility_mode_complete = |
| 2617 (accessibility_mode & AccessibilityModeComplete) == | 2617 (accessibility_mode & kAccessibilityModeComplete) == |
| 2618 AccessibilityModeComplete; | 2618 kAccessibilityModeComplete; |
| 2619 if (matches_accessibility_mode_complete) | 2619 if (matches_accessibility_mode_complete) |
| 2620 return false; | 2620 return false; |
| 2621 | 2621 |
| 2622 // The touch_rect, target_rects and zoom_rect are in the outer viewport | 2622 // The touch_rect, target_rects and zoom_rect are in the outer viewport |
| 2623 // reference frame. | 2623 // reference frame. |
| 2624 gfx::Rect zoom_rect; | 2624 gfx::Rect zoom_rect; |
| 2625 float new_total_scale = | 2625 float new_total_scale = |
| 2626 DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor( | 2626 DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor( |
| 2627 touch_rect, target_rects, GetSize(), | 2627 touch_rect, target_rects, GetSize(), |
| 2628 gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(), | 2628 gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(), |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2809 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 2809 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
| 2810 } | 2810 } |
| 2811 | 2811 |
| 2812 std::unique_ptr<InputEventAck> ack( | 2812 std::unique_ptr<InputEventAck> ack( |
| 2813 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, | 2813 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, |
| 2814 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); | 2814 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); |
| 2815 OnInputEventAck(std::move(ack)); | 2815 OnInputEventAck(std::move(ack)); |
| 2816 } | 2816 } |
| 2817 | 2817 |
| 2818 } // namespace content | 2818 } // namespace content |
| OLD | NEW |