diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2017-06-19 11:35:43 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2017-07-11 09:35:51 +0000 |
commit | ef09ea48c36e00dc2a03188936887caf95c2307e (patch) | |
tree | 923578365f885b99d09d4bb05916c91ab9059819 /src/webengine/doc | |
parent | c2f786d59c8171c05cc7ff8c98b8a85175e5e5a2 (diff) |
Take into account the value of the --touch-events Chromium switch
In Chromium 56 the --touch-events switch controls both the availability
of the Touch Events API in JavaScript (presence of 'ontouchstart' in
'window' object), and whether touch events are dispatched at all.
In Chromium 57, the switch controls only the Touch Events API
availability, and touch events are always dispatched.
In Qt 5.9.0 which is based on Chromium 56, we always dispatched touch
events, ignored the value of --touch-events, and determined the
availability of the Touch Events API by checking if QTouchDevice lists
any touch screen devices (essentially Chromium's --touch-events=auto
option).
This commit changes the behavior of WebEngine to match that of Chromium
57, so that users can choose to enable or disable the Touch Events API
via the --touch-events switch, whereas the default will be 'auto' mode.
Touch events will always be dispatched as usual. Users that wish to
stop dispatching touch events can install an event filter on
WebEngine's view focus proxy.
Task-number: QTBUG-61045
Change-Id: I07404af3336619869aa87a90a1b426036548dd55
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/webengine/doc')
-rw-r--r-- | src/webengine/doc/src/qtwebengine-features.qdoc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/webengine/doc/src/qtwebengine-features.qdoc b/src/webengine/doc/src/qtwebengine-features.qdoc index 11d3a4ca1..b80ad6a35 100644 --- a/src/webengine/doc/src/qtwebengine-features.qdoc +++ b/src/webengine/doc/src/qtwebengine-features.qdoc @@ -45,6 +45,7 @@ \li \l{Pepper Plugin API} \li \l{Print to PDF} \li \l{Spellchecker} + \li \l{Touch} \li \l{View Source} \li \l{WebRTC} \endlist @@ -312,6 +313,22 @@ Support for this feature was added in Qt 5.8.0. + \section1 Touch + + Qt WebEngine supports touch devices for navigating and interacting with web pages. + + Applications can prohibit the use of touch events in the following ways: + + \list + \li Passing the flag \c --touch-events=disabled on the command line will disable touch event + support in JavaScript API (meaning \c ontouchstart and related handlers will not be present + in the \c document.window object). Touch events will still be delivered to web pages. + + \li Installing an event filter object using \l {QObject::installEventFilter} on the WebEngine + view focus proxy object, and filtering out all touch events. + + \endlist + \section1 View Source Qt WebEngine supports viewing the HTML source of a web page. |