Title: [126951] trunk/Source/WebKit/chromium
Revision
126951
Author
[email protected]
Date
2012-08-28 19:36:46 -0700 (Tue, 28 Aug 2012)

Log Message

Fix ASSERT in fast/events/touch/gesture/context-menu-on-two-finger-tap.html

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::detectContentOnTouch):

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (126950 => 126951)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-08-29 02:34:50 UTC (rev 126950)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-08-29 02:36:46 UTC (rev 126951)
@@ -1,3 +1,10 @@
+2012-08-28  Adam Barth  <[email protected]>
+
+        Fix ASSERT in fast/events/touch/gesture/context-menu-on-two-finger-tap.html
+
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::detectContentOnTouch):
+
 2012-08-28  Leandro Gracia Gil  <[email protected]>
 
         Content detection should not disrupt the page behaviour

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (126950 => 126951)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-08-29 02:34:50 UTC (rev 126950)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-08-29 02:36:46 UTC (rev 126951)
@@ -3991,7 +3991,10 @@
 
 bool WebViewImpl::detectContentOnTouch(const WebPoint& position, WebInputEvent::Type touchType)
 {
-    ASSERT(touchType == WebInputEvent::GestureTap || touchType == WebInputEvent::GestureLongPress);
+    ASSERT(touchType == WebInputEvent::GestureTap
+           || touchType == WebInputEvent::GestureTwoFingerTap
+           || touchType == WebInputEvent::GestureLongPress);
+
     HitTestResult touchHit = hitTestResultForWindowPos(position);
 
     if (touchHit.isContentEditable())
@@ -4004,7 +4007,7 @@
     // Ignore when tapping on links or nodes listening to click events, unless the click event is on the
     // body element, in which case it's unlikely that the original node itself was intended to be clickable.
     for (; node && !node->hasTagName(HTMLNames::bodyTag); node = node->parentNode()) {
-        if (node->isLink() || (touchType != WebInputEvent::GestureLongPress
+        if (node->isLink() || (touchType == WebInputEvent::GestureTap
                 && (node->willRespondToTouchEvents() || node->willRespondToMouseClickEvents()))) {
             return false;
         }
@@ -4014,7 +4017,7 @@
     if (!content.isValid())
         return false;
 
-    if (touchType == WebInputEvent::GestureLongPress) {
+    if (touchType != WebInputEvent::GestureTap) {
         // Select the detected content as a block.
         focusedFrame()->selectRange(content.range());
         return true;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to