Changeset 147909 in webkit


Ignore:
Timestamp:
Apr 8, 2013 4:13:20 AM (11 years ago)
Author:
abecsi@webkit.org
Message:

[Qt][WK2] WebView's interactive property is not fully respected
https://bugs.webkit.org/show_bug.cgi?id=113066

Reviewed by Jocelyn Turcotte.

WK2 sign-off by Benjamin Poulain.

The QML WebView inherits the "interactive" property from Flickable
which is true by default, and disables the interaction with the
Flickable if set to false.
Resulting from the design of the WebView panning and flicking is
disabled by Flickable but to be consistent we also need to disable
double-tap gestures and pinch gestures since they would trigger
scale and position changes.

  • UIProcess/qt/PageViewportControllerClientQt.cpp:

(WebKit::PageViewportControllerClientQt::pinchGestureStarted):
(WebKit::PageViewportControllerClientQt::pinchGestureRequestUpdate):
(WebKit::PageViewportControllerClientQt::pinchGestureEnded):

  • UIProcess/qt/QtWebPageEventHandler.cpp:

(WebKit::QtWebPageEventHandler::handleDoubleTapEvent):

Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r147878 r147909  
     12013-04-08  Andras Becsi  <andras.becsi@digia.com>
     2
     3        [Qt][WK2] WebView's interactive property is not fully respected
     4        https://bugs.webkit.org/show_bug.cgi?id=113066
     5
     6        Reviewed by Jocelyn Turcotte.
     7
     8        WK2 sign-off by Benjamin Poulain.
     9
     10        The QML WebView inherits the "interactive" property from Flickable
     11        which is true by default, and disables the interaction with the
     12        Flickable if set to false.
     13        Resulting from the design of the WebView panning and flicking is
     14        disabled by Flickable but to be consistent we also need to disable
     15        double-tap gestures and pinch gestures since they would trigger
     16        scale and position changes.
     17
     18        * UIProcess/qt/PageViewportControllerClientQt.cpp:
     19        (WebKit::PageViewportControllerClientQt::pinchGestureStarted):
     20        (WebKit::PageViewportControllerClientQt::pinchGestureRequestUpdate):
     21        (WebKit::PageViewportControllerClientQt::pinchGestureEnded):
     22        * UIProcess/qt/QtWebPageEventHandler.cpp:
     23        (WebKit::QtWebPageEventHandler::handleDoubleTapEvent):
     24
    1252013-04-07  David Kilzer  <ddkilzer@apple.com>
    226
  • trunk/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.cpp

    r146356 r147909  
    431431    ASSERT(m_touchInteraction.inProgress());
    432432
    433     if (!m_controller->allowsUserScaling())
     433    if (!m_controller->allowsUserScaling() || !m_viewportItem->isInteractive())
    434434        return;
    435435
     
    443443void PageViewportControllerClientQt::pinchGestureRequestUpdate(const QPointF& pinchCenterInViewportCoordinates, qreal totalScaleFactor)
    444444{
     445    if (!m_controller->allowsUserScaling() || !m_viewportItem->isInteractive())
     446        return;
     447
    445448    ASSERT(m_scaleChange.inProgress());
    446 
    447     if (!m_controller->allowsUserScaling())
    448         return;
    449 
    450449    ASSERT(m_pinchStartScale > 0);
    451450    //  Changes of the center position should move the page even if the zoom factor does not change.
     
    465464void PageViewportControllerClientQt::pinchGestureEnded()
    466465{
     466    if (m_pinchStartScale < 0)
     467        return;
     468
    467469    ASSERT(m_scaleChange.inProgress());
    468 
    469     if (!m_controller->allowsUserScaling())
    470         return;
    471 
    472470    m_pinchStartScale = -1;
    473471
  • trunk/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp

    r146914 r147909  
    272272void QtWebPageEventHandler::handleDoubleTapEvent(const QTouchEvent::TouchPoint& point)
    273273{
     274    if (!m_webView->isInteractive())
     275        return;
     276
    274277    deactivateTapHighlight();
    275278    QTransform fromItemTransform = m_webPage->transformFromItem();
Note: See TracChangeset for help on using the changeset viewer.