Chromium Code Reviews| 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 2486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2497 #if defined(OS_ANDROID) | 2497 #if defined(OS_ANDROID) |
| 2498 bool RenderViewImpl::didTapMultipleTargets( | 2498 bool RenderViewImpl::didTapMultipleTargets( |
| 2499 const WebSize& inner_viewport_offset, | 2499 const WebSize& inner_viewport_offset, |
| 2500 const WebRect& touch_rect, | 2500 const WebRect& touch_rect, |
| 2501 const WebVector<WebRect>& target_rects) { | 2501 const WebVector<WebRect>& target_rects) { |
| 2502 // Never show a disambiguation popup when accessibility is enabled, | 2502 // Never show a disambiguation popup when accessibility is enabled, |
| 2503 // as this interferes with "touch exploration". | 2503 // as this interferes with "touch exploration". |
| 2504 AccessibilityMode accessibility_mode = | 2504 AccessibilityMode accessibility_mode = |
| 2505 GetMainRenderFrame()->accessibility_mode(); | 2505 GetMainRenderFrame()->accessibility_mode(); |
| 2506 bool matches_accessibility_mode_complete = | 2506 bool matches_accessibility_mode_complete = |
| 2507 (accessibility_mode & ACCESSIBILITY_MODE_COMPLETE) == | 2507 (accessibility_mode & AccessibilityMode::COMPLETE) == |
|
dmazzoni
2017/02/17 00:21:50
I think you can simplify this now, just (accessibi
| |
| 2508 ACCESSIBILITY_MODE_COMPLETE; | 2508 AccessibilityMode::COMPLETE; |
| 2509 if (matches_accessibility_mode_complete) | 2509 if (matches_accessibility_mode_complete) |
| 2510 return false; | 2510 return false; |
| 2511 | 2511 |
| 2512 // The touch_rect, target_rects and zoom_rect are in the outer viewport | 2512 // The touch_rect, target_rects and zoom_rect are in the outer viewport |
| 2513 // reference frame. | 2513 // reference frame. |
| 2514 gfx::Rect zoom_rect; | 2514 gfx::Rect zoom_rect; |
| 2515 float new_total_scale = | 2515 float new_total_scale = |
| 2516 DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor( | 2516 DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor( |
| 2517 touch_rect, target_rects, GetSize(), | 2517 touch_rect, target_rects, GetSize(), |
| 2518 gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(), | 2518 gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(), |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2720 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 2720 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
| 2721 } | 2721 } |
| 2722 | 2722 |
| 2723 std::unique_ptr<InputEventAck> ack( | 2723 std::unique_ptr<InputEventAck> ack( |
| 2724 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(), | 2724 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(), |
| 2725 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); | 2725 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); |
| 2726 OnInputEventAck(std::move(ack)); | 2726 OnInputEventAck(std::move(ack)); |
| 2727 } | 2727 } |
| 2728 | 2728 |
| 2729 } // namespace content | 2729 } // namespace content |
| OLD | NEW |