| 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 2606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2617 #if defined(OS_ANDROID) | 2617 #if defined(OS_ANDROID) |
| 2618 bool RenderViewImpl::didTapMultipleTargets( | 2618 bool RenderViewImpl::didTapMultipleTargets( |
| 2619 const WebSize& inner_viewport_offset, | 2619 const WebSize& inner_viewport_offset, |
| 2620 const WebRect& touch_rect, | 2620 const WebRect& touch_rect, |
| 2621 const WebVector<WebRect>& target_rects) { | 2621 const WebVector<WebRect>& target_rects) { |
| 2622 // Never show a disambiguation popup when accessibility is enabled, | 2622 // Never show a disambiguation popup when accessibility is enabled, |
| 2623 // as this interferes with "touch exploration". | 2623 // as this interferes with "touch exploration". |
| 2624 AccessibilityMode accessibility_mode = | 2624 AccessibilityMode accessibility_mode = |
| 2625 GetMainRenderFrame()->accessibility_mode(); | 2625 GetMainRenderFrame()->accessibility_mode(); |
| 2626 bool matches_accessibility_mode_complete = | 2626 bool matches_accessibility_mode_complete = |
| 2627 (accessibility_mode & AccessibilityModeComplete) == | 2627 (accessibility_mode & ACCESSIBILITY_MODE_COMPLETE) == |
| 2628 AccessibilityModeComplete; | 2628 ACCESSIBILITY_MODE_COMPLETE; |
| 2629 if (matches_accessibility_mode_complete) | 2629 if (matches_accessibility_mode_complete) |
| 2630 return false; | 2630 return false; |
| 2631 | 2631 |
| 2632 // The touch_rect, target_rects and zoom_rect are in the outer viewport | 2632 // The touch_rect, target_rects and zoom_rect are in the outer viewport |
| 2633 // reference frame. | 2633 // reference frame. |
| 2634 gfx::Rect zoom_rect; | 2634 gfx::Rect zoom_rect; |
| 2635 float new_total_scale = | 2635 float new_total_scale = |
| 2636 DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor( | 2636 DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor( |
| 2637 touch_rect, target_rects, GetSize(), | 2637 touch_rect, target_rects, GetSize(), |
| 2638 gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(), | 2638 gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(), |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2819 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 2819 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
| 2820 } | 2820 } |
| 2821 | 2821 |
| 2822 std::unique_ptr<InputEventAck> ack( | 2822 std::unique_ptr<InputEventAck> ack( |
| 2823 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, | 2823 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, |
| 2824 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); | 2824 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); |
| 2825 OnInputEventAck(std::move(ack)); | 2825 OnInputEventAck(std::move(ack)); |
| 2826 } | 2826 } |
| 2827 | 2827 |
| 2828 } // namespace content | 2828 } // namespace content |
| OLD | NEW |