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

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

Issue 23453011: [Android WebView] Disable disambiguation popups (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add TODO Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 6382 matching lines...) Expand 10 before | Expand all | Expand 10 after
6393 6393
6394 #if defined(OS_ANDROID) 6394 #if defined(OS_ANDROID)
6395 bool RenderViewImpl::didTapMultipleTargets( 6395 bool RenderViewImpl::didTapMultipleTargets(
6396 const WebKit::WebGestureEvent& event, 6396 const WebKit::WebGestureEvent& event,
6397 const WebVector<WebRect>& target_rects) { 6397 const WebVector<WebRect>& target_rects) {
6398 // Never show a disambiguation popup when accessibility is enabled, 6398 // Never show a disambiguation popup when accessibility is enabled,
6399 // as this interferes with "touch exploration". 6399 // as this interferes with "touch exploration".
6400 if (accessibility_mode_ == AccessibilityModeComplete) 6400 if (accessibility_mode_ == AccessibilityModeComplete)
6401 return false; 6401 return false;
6402 6402
6403 // Disable disambiguation popups in Android WebView.
jamesr 2013/08/27 22:45:54 Not only is this abuse, it just looks wrong. We a
6404 // TODO(boliu): Add a setting to control this explicitly instead of abusing
6405 // UsingSynchronousRendererCompositor. Tracked in crbug.com/280301.
6406 if (UsingSynchronousRendererCompositor())
6407 return false;
6408
6403 gfx::Rect finger_rect( 6409 gfx::Rect finger_rect(
6404 event.x - event.data.tap.width / 2, event.y - event.data.tap.height / 2, 6410 event.x - event.data.tap.width / 2, event.y - event.data.tap.height / 2,
6405 event.data.tap.width, event.data.tap.height); 6411 event.data.tap.width, event.data.tap.height);
6406 gfx::Rect zoom_rect; 6412 gfx::Rect zoom_rect;
6407 float new_total_scale = 6413 float new_total_scale =
6408 DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor( 6414 DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor(
6409 finger_rect, target_rects, GetSize(), 6415 finger_rect, target_rects, GetSize(),
6410 gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(), 6416 gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(),
6411 device_scale_factor_ * webview()->pageScaleFactor(), &zoom_rect); 6417 device_scale_factor_ * webview()->pageScaleFactor(), &zoom_rect);
6412 if (!new_total_scale) 6418 if (!new_total_scale)
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
6531 for (size_t i = 0; i < icon_urls.size(); i++) { 6537 for (size_t i = 0; i < icon_urls.size(); i++) {
6532 WebURL url = icon_urls[i].iconURL(); 6538 WebURL url = icon_urls[i].iconURL();
6533 if (!url.isEmpty()) 6539 if (!url.isEmpty())
6534 urls.push_back(FaviconURL(url, 6540 urls.push_back(FaviconURL(url,
6535 ToFaviconType(icon_urls[i].iconType()))); 6541 ToFaviconType(icon_urls[i].iconType())));
6536 } 6542 }
6537 SendUpdateFaviconURL(urls); 6543 SendUpdateFaviconURL(urls);
6538 } 6544 }
6539 6545
6540 } // namespace content 6546 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698