Changeset 64245 in webkit


Ignore:
Timestamp:
Jul 28, 2010 4:45:53 PM (14 years ago)
Author:
kim.1.gronholm@nokia.com
Message:

2010-07-28 Kim Grönholm <kim.1.gronholm@nokia.com>

Reviewed by Antonio Gomes.

[Qt] Decouple QTouchEvent's accepted flag from JS prevent default
https://bugs.webkit.org/show_bug.cgi?id=42892

Added comments to the touch event handling code.

  • Api/qgraphicswebview.cpp: (QGraphicsWebView::sceneEvent):
  • Api/qwebpage.cpp: (QWebPagePrivate::touchEvent): (QWebPage::event):
  • Api/qwebpage_p.h:
  • Api/qwebview.cpp: (QWebView::event):
Location:
trunk/WebKit/qt
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/qt/Api/qgraphicswebview.cpp

    r64118 r64245  
    320320                || event->type() == QEvent::TouchUpdate)) {
    321321        d->page->event(event);
     322
     323        // Always return true so that we'll receive also TouchUpdate and TouchEnd events
    322324        return true;
    323325    }
  • trunk/WebKit/qt/Api/qwebpage.cpp

    r64208 r64245  
    14001400        return false;
    14011401
     1402    // Always accept the QTouchEvent so that we'll receive also TouchUpdate and TouchEnd events
    14021403    event->setAccepted(true);
     1404
     1405    // Return whether the default action was cancelled in the JS event handler
    14031406    return frame->eventHandler()->handleTouchEvent(PlatformTouchEvent(event));
    14041407}
     
    28452848    case QEvent::TouchUpdate:
    28462849    case QEvent::TouchEnd:
     2850        // Return whether the default action was cancelled in the JS event handler
    28472851        return d->touchEvent(static_cast<QTouchEvent*>(ev));
    28482852#endif
  • trunk/WebKit/qt/Api/qwebpage_p.h

    r64118 r64245  
    133133
    134134#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     135    // Returns whether the default action was cancelled in the JS event handler
    135136    bool touchEvent(QTouchEvent*);
    136137#endif
  • trunk/WebKit/qt/Api/qwebview.cpp

    r64118 r64245  
    827827                   || e->type() == QEvent::TouchUpdate) {
    828828            d->page->event(e);
     829
     830            // Always return true so that we'll receive also TouchUpdate and TouchEnd events
    829831            return true;
    830832#endif
  • trunk/WebKit/qt/ChangeLog

    r64208 r64245  
     12010-07-28  Kim Grönholm  <kim.1.gronholm@nokia.com>
     2
     3        Reviewed by Antonio Gomes.
     4
     5        [Qt] Decouple QTouchEvent's accepted flag from JS prevent default
     6        https://bugs.webkit.org/show_bug.cgi?id=42892
     7
     8        Added comments to the touch event handling code.
     9
     10        * Api/qgraphicswebview.cpp:
     11        (QGraphicsWebView::sceneEvent):
     12        * Api/qwebpage.cpp:
     13        (QWebPagePrivate::touchEvent):
     14        (QWebPage::event):
     15        * Api/qwebpage_p.h:
     16        * Api/qwebview.cpp:
     17        (QWebView::event):
     18
    1192010-07-26  Steve Block  <steveblock@google.com>
    220
Note: See TracChangeset for help on using the changeset viewer.