Changeset 126061 in webkit
- Timestamp:
- Aug 20, 2012 1:48:52 PM (12 years ago)
- Location:
- trunk/Source/WebKit/chromium
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/chromium/ChangeLog
r126057 r126061 1 2012-08-20 Leandro Gracia Gil <leandrogracia@chromium.org> 2 3 [Chromium] detectContentIntentAround has a misleading name 4 https://bugs.webkit.org/show_bug.cgi?id=94349 5 6 Reviewed by Adam Barth. 7 8 The current WebViewClient API exposes a method named detectContentIntentAround. 9 However, this is not designed to detect any "content intent", but to allow the embedder 10 to detect content around a position and fire Android intents if appropriate. 11 12 This patch also disables content detection if the touched node listens to events 13 that consume the tap action like clicks, touch events or mouse events. 14 15 * public/WebViewClient.h: 16 (WebViewClient): 17 (WebKit::WebViewClient::detectContentAround): 18 * src/WebViewImpl.cpp: 19 (WebKit::WebViewImpl::detectContentOnTouch): 20 * src/WebViewImpl.h: 21 (WebViewImpl): 22 1 23 2012-08-20 Hans Wennborg <hans@chromium.org> 2 24 -
trunk/Source/WebKit/chromium/public/WebViewClient.h
r125219 r126061 38 38 #include "WebFileChooserCompletion.h" 39 39 #include "WebFileChooserParams.h" 40 #include "WebHitTestResult.h"41 40 #include "WebPageVisibilityState.h" 42 41 #include "WebPopupType.h" … … 65 64 class WebGeolocationService; 66 65 class WebHelperPlugin; 66 class WebHitTestResult; 67 67 class WebIconLoadingCompletion; 68 68 class WebImage; … … 375 375 // Retrieves detectable content (e.g., email addresses, phone numbers) 376 376 // around a hit test result. The embedder should use platform-specific 377 // content detectors (e.g., from the Android intent system) to analyze the 378 // region around the hit test result. 379 virtual WebContentDetectionResult detectContentIntentAround(const WebHitTestResult&) { return WebContentDetectionResult(); } 377 // content detectors to analyze the region around the hit test result. 378 virtual WebContentDetectionResult detectContentAround(const WebHitTestResult&) { return WebContentDetectionResult(); } 380 379 381 380 // Schedules a new content intent with the provided url. -
trunk/Source/WebKit/chromium/src/WebViewImpl.cpp
r126057 r126061 130 130 #include "WebFrameImpl.h" 131 131 #include "WebHelperPluginImpl.h" 132 #include "WebHitTestResult.h" 132 133 #include "WebInputElement.h" 133 134 #include "WebInputEvent.h" … … 3853 3854 } 3854 3855 3855 bool WebViewImpl::detectContent IntentOnTouch(const WebPoint& position, WebInputEvent::Type touchType)3856 bool WebViewImpl::detectContentOnTouch(const WebPoint& position, WebInputEvent::Type touchType) 3856 3857 { 3857 3858 ASSERT(touchType == WebInputEvent::GestureTap || touchType == WebInputEvent::GestureLongPress); … … 3867 3868 // FIXME: Should we not detect content intents in nodes that have event listeners? 3868 3869 3869 WebContentDetectionResult content = m_client->detectContent IntentAround(touchHit);3870 WebContentDetectionResult content = m_client->detectContentAround(touchHit); 3870 3871 if (!content.isValid()) 3871 3872 return false; -
trunk/Source/WebKit/chromium/src/WebViewImpl.h
r125339 r126061 392 392 void mouseDoubleClick(const WebMouseEvent&); 393 393 394 bool detectContent IntentOnTouch(const WebPoint&, WebInputEvent::Type);394 bool detectContentOnTouch(const WebPoint&, WebInputEvent::Type); 395 395 void startPageScaleAnimation(const WebCore::IntPoint& targetPosition, bool useAnchor, float newScale, double durationInSeconds); 396 396
Note: See TracChangeset
for help on using the changeset viewer.