summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Bump versionv5.5.15.5Christian Strømme2015-08-181-1/+1
| | | | | Change-Id: I144a2fc92fe6fc795529bf2ecb8aad741b4387e3 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* iOS: Enable zooming of web content.Christian Strømme2015-06-241-1/+1
| | | | | | | | We need to set scalesPageToFit to enable user zooming. Task-number: QTBUG-46211 Change-Id: Ibf114a6571fb7cf57564b8f22e044efc5ff32381 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Fix typo in QQuickViewControllerChristian Strømme2015-06-221-6/+6
| | | | | | | Changed liseners -> listeners Change-Id: I8d06866fe13a48280cda80f1f0b7757dc9a3b0cb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Import qml tests from WebEngineChristian Strømme2015-06-2215-0/+744
| | | | | | | Tests are taken from QtWebEngine and adjusted to test QtWebView. Change-Id: I0a8ed5b844beeec44043ff54145d45267321a7cf Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Fix item listenerChristian Strømme2015-06-221-1/+5
| | | | | | | | Remove the listener from the old parents when a new parent is set or when the controller item is destroyed. Change-Id: If4cf2bf1d2a209514f9f37028e5210335f418dc7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Android: Make sure we send a load request update when we start loading.Christian Strømme2015-06-221-0/+3
| | | | | | | | | We should always send the the starting request update, so we always transition from starting and go to finished or error even if the url is invalid or can't be reached. Change-Id: I4e917b95bf34e44bd8986bdccd2fb2f5aa183414 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Android: Fix load request state tracking.Christian Strømme2015-06-221-15/+22
| | | | | | | Fixes problems were isLoading() would return the wrong value. Change-Id: I0e0876551f9dcbd41523731dd51dce806680c10e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Add revison to the loading propertyChristian Strømme2015-06-221-1/+1
| | | | | Change-Id: I494097e6cf61ab46abc113422a5c250b529b4a3d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Reset progress to 0 when loading fails.Christian Strømme2015-06-221-0/+3
| | | | | Change-Id: Id046571bd3e115904491465f8693338b40a336ac Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Added a macro to conveniently check and skip tests on Android.Christian Strømme2015-06-221-0/+10
| | | | | | | | This makes it easier to skip test that won't run on older versions of Android. Change-Id: I994b56a5301d5125c1c7df6dd70db947b00d57b6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Initialize the progress value to 0 on creation.Christian Strømme2015-06-222-4/+5
| | | | | Change-Id: Iabddc9c1016626807a1860c76f0ebbc3170a7b7a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Remove inclusion of internal only module in the WebView auto test.Christian Strømme2015-06-221-1/+1
| | | | | Change-Id: I65f92cd220d4ed61a8a9512c9a81fd134a9aa23e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Android: Add protection against deadlocking and/or triggering ANR.Christian Strømme2015-06-151-4/+11
| | | | | | | | | | | | | We block the Android UI thread when we call into the native WebView which means it's possible to deadlock or cause the "Application Not Responding" handler to be activated, e.g., if the WebView or UI thread is unable to process the request quickly enough. This change makes sure we never block the UI thread for longer then 250ms. Anything beyond 200ms is and we can be certain the UI thread is overloaded or we're blocking both the Qt thread and the Android thread. Change-Id: I237674091e4d5db80209b5295f75b61e886f3db4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Doc: Updated the example screenshotVenugopal Shivashankar2015-06-093-1/+1
| | | | | Change-Id: I94af206a7e96bb13ca13ecdb0f1698a54f6ba2c1 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Fix crash on destruction of QWebView instances.v5.5.0Christian Strømme2015-06-035-10/+13
| | | | | | | | | | | The QWebView and QWebViewPrivate class are now in the object tree and will therefore be delete once their parent is destroyed. This change removes the QScopedPointers that used to manage the lifetime of the webview instances. Task-number: QTBUG-46286 Change-Id: I2d7f12b317770113e5b35c14b60df7442aa3e68e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Re-introduce the default WebView implementation.Christian Strømme2015-05-274-69/+12
| | | | | | | | | | | | | | The default WebView implementation is a non-functional implementation and its only purpose is to build the, internal only, module library when building with MSVC. Technically the module library could be skipped completely as the QtWebView module only provides a qml interface, however, that means additional changes would need to be done to the qml project recipes to make it possible for pure qml plugins to have jar dependencies. Task-number: QTBUG-46001 Change-Id: I1127c80902a53ad27c80d5ed86a43ab654ebd9a6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Hide the WebView when the scene is invalidated.Christian Strømme2015-05-222-0/+12
| | | | | | | | | | When the scene graph is invalidated the WebView should not stay visible. This change hides the WebView when the scene graph is invalidated and restores the visibility once the scene is initialized again. Change-Id: Ia74b4c015edb6788af2f15c3f9867203937d360c Task-number: QTBUG-43465 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Doc: Remove comment about supported platforms.Topi Reinio2015-05-201-2/+0
| | | | | | | | | Only iOS and Android were listed, but currently all major platforms are supported, either through a native WebView implementation or QtWebEngine. Change-Id: Ic379c8b579276cf8d8f3cd92f93a609cccaf9717 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Bump the qml revision number.Christian Strømme2015-05-063-21/+49
| | | | | Change-Id: I87c4a0eeaf01179ec347f5f3922aef48405f8ae0 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Fix linking on msvc2013Christian Strømme2015-05-061-3/+6
| | | | | | | | | Don't add WebView to the list of Qt modules when we are just redirecting to QtWebEngine. On Windows with msvc2013 it tries to link in the non-existing WebView library. Change-Id: Ia4f3f38ae4f882fea028aba67fe0c0eaf17cadde Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Move webengine details to the qml plugin.Christian Strømme2015-05-052-23/+14
| | | | | | | | Instead of wrapping the web engine view in c++, we can just export it under a different name in the qml plugin. Change-Id: I5543ea3ca883d70bd4d605f7cff180445d2bc928 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Clean-up webview-lib.priChristian Strømme2015-05-051-5/+0
| | | | | | | | | | There are only two ways QtWebView will work, either with a native WebView backend or by using QtWebEngine. The else clause, which is removed by this change, was assuming a third option and was therefore failing on platforms where neither options were available. Change-Id: I4220e8b6a1d451ce000d2d6b42162ba9654f86d4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* OS X: Fix header name.Christian Strømme2015-05-051-1/+1
| | | | | | | | The include for WebKit was wrongly typed and caused the build to fail on platforms with a case-sensitive file-system. Change-Id: Ibb6cbc85d53a5a46b4272f4437d6e74e01f56d91 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* Doc: Remove the line that list supported platforms.Christian Strømme2015-04-271-2/+0
| | | | | | | | | | The line was only listing Android, but currently all major platforms are supported, either through a native WebView implementation or QtWebEngine. Change-Id: I56de7eeffca81d13160381928979ed5e39589451 Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Make the geometryChanged() function protected.Christian Strømme2015-04-241-2/+1
| | | | | | | There's no need for it to be public. Change-Id: Icb3c2661b918ab59c3b139de0d58d474833c33a3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Android: Fix setting geometry and clip rect.Christian Strømme2015-04-242-2/+55
| | | | | | | | | | | | | | | All native views are considered top-level, that is, the view expects its geometry to be in the global coordinate system and therefore clipping and mapping from scene to global coordinates needs to be done manually. Previously some of this was handle in the foreign platform window implementation, but since there are no real child/parent relationship in the platform implementation, it made it impossible to handle the case where the scene was not covering the whole screen and/or if the scene could move or be re-sized (e.g., QQuickWidget). Task-number: QTBUG-43391 Change-Id: I019f76b6cec1841a480f901e14432800cb3da817 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Update the geometry of the native view when the scene changes.Christian Strømme2015-04-2411-3/+50
| | | | | | | | | | This is need to correctly position the native view when we have a scene that might change its position or size, e.g., in a Widget application where a QQuickWidget is the scene. Task-number: QTBUG-43391 Change-Id: I3dca2401ddae06d8c65e69fbfec20bdd205c0937 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Fix include in qquickwebviewloadrequest.hChristian Strømme2015-04-241-1/+1
| | | | | Change-Id: I71fd6504eb2501214c08476384fa8ef35b543965 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Add item change listenerChristian Strømme2015-04-153-1/+122
| | | | | | | | | | | | | The view controller item (QQuickViewController) didn't not update its geometry when the geometry of a parent item changed. With this change, geometry changes will be monitored by adding an item change listener to all ancestor of the view item. The item change listener will then notify the view controller when a ancestors geometry changes, by calling polish(). Task-number: QTBUG-43538 Change-Id: Ia83262254f37291b8ac10ee6c20cb4d57fa06fe2 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Fix the geometry source in QQuickViewController.Christian Strømme2015-03-311-2/+1
| | | | | | | | | | | | | | The controller item was using the rect it got from geometryChanged() and mapped it to scene coordinates, but then in its own coordinate system. The problem with this is that the rect we get, in geometryChanged(), is relative to the view-controllers parent and can therefore carry an offset that will give us the wrong scene coordinates. The easiest solution is to remove the offset and place the rect at (0, 0), e.g., by calling clipRect(). Change-Id: I29bf729e82498a2534425dc4c173f055305a1b2d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Fix visible property set incorrecly on iOSJacek Całusiński2015-03-141-1/+1
| | | | | | | | WebView on iOS uses native method setHidden to manipulate its visibility, so we have to negate setVisible argument for it to work. Change-Id: Ie4686136abb41e56f1590614801891271c99c594 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Fix license headersSergio Ahumada2015-03-026-36/+36
| | | | | Change-Id: I358aa222b2c357844763a2eb23d0d9e52121422e Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Return progress, title and url from the cached values in QWebView.Christian Strømme2015-02-241-6/+3
| | | | | | | | | | | | Returning the cached values for progress, title and url might be more accurate in some cases, e.g., on Android we might not get the correct url if we query the native WebView immediately after receiving the url-changed callback. Using the already cached values also removes the need to cache them again in the platform implementation. Change-Id: I3a9d362fe5e5a47a823da2d84fd638c409b1bcf3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devChristian Strømme2015-02-186-38/+41
|\ | | | | | | Change-Id: Ic6b7965ae297c462b2b89e5ba373ac204d3da6ad
| * Update FDL headersChristian Strømme2015-02-176-38/+41
| | | | | | | | | | | | | | The documentation (FDL) headers were not updated. Change-Id: I8809a2e9c908c5b195e45499d204a6a831cb99e4 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Update license headers.Christian Strømme2015-02-174-32/+32
| | | | | | | | | | | | | | | | This updates the license headers in the files that where added in 5.5 and therefore not covered by the license update in 5.4. Change-Id: I764d2391584d457c897a2298525cbc2eb4d9de51 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devChristian Strømme2015-02-1525-116/+1193
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/webview/qquickviewcontroller.cpp src/webview/qquickviewcontroller_p.h src/webview/qwebview_ios.mm src/webview/qwebview_ios_p.h src/webview/qwebview_p_p.h src/webview/qwindowcontrolleritem_ios.mm Change-Id: I0454a007bf8297064045d5d193e74a08c9703f12
| * Fix license headersChristian Strømme2015-02-1517-86/+86
| | | | | | | | | | | | | | | | | | | | This is an amendment to caae412c72266359d7fe5e17046e14d3c7879c1e where the copyright and license headers where first updated. This change updates the headers, also for the examples, based on the new templates in qtbase (83a5694dc21b8220bb0e5c85f24a53361b2fd478). Change-Id: Ie377e886ff823f60c8409296c7646b0ccfe81f3b Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
| * iOS: Fix url handling on iOS.Christian S2015-02-102-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We would always return the requested url, that is, the url we got from loadUrl(), this of course meant that url changes caused by clicking a link wouldn't cause the current url to be updated. In addition the following related fixes where done: - Don't retrieve the URL from js, get it from the NSURLRequest instead. - Don't emit pageStarted for each frame. Task-number: QTBUG-44220 Change-Id: Ib25e7f62180131dc6cd1db7802709e7bf93f3b07 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
| * Update license headers and add new licenses.Christian Strømme2015-02-1021-36/+951
| | | | | | | | | | | | | | | | Changed the copyright and contact details in the license headers and added the missing LICENSE.* files (.FDL, GPLv2 and LGPLv3). Change-Id: I836098231f97032b30f5eed431b313d17057e0fa Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Example: Made a few cosmetic changesVenugopal Shivashankar2015-02-099-4/+164
| | | | | | | | | | | | | | | | | | | | | | - Added a progress bar to indicate the WebView.loadProgress - Added a ToolButton to stop/reload the web page - Replaced the ToolButton text with tooltip to reduce the space used. Change-Id: I3447af9ad2469d6460b3a6acbadb8d733845980f Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com> Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* | Add common property checks in QWebView.Christian Strømme2015-02-126-17/+61
| | | | | | | | | | | | | | | | intercept signals from the private webview implementation and check if the property actually changed before forwarding the signal. Change-Id: I10e64a4d42ea9e81308125f4263e38ef31afa818 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | OS X Implementation.Morten Johan Sørvig2015-02-127-5/+361
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds implementation for the native WebView on OS X and removes the QtWebEngine as the fallback. The current implementation requires QT_MAC_WANTS_LAYER=1 QSG_RENDER_LOOP=basic [ChangeLog][WebView][OS X] Added OS X implementation. Change-Id: I2807a082c8aa519b8c3afe332996d3d454ff2383 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Add loadRequest item and necessary classes to enable status reporting.Christian Strømme2015-02-1016-17/+476
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to listen and check the load status through the loadingChanges signal. The new loadRequest type contains information about the load status (started, succeeded or failed) for a specific url and an error string if available. [ChangeLog][WebView] Improved status reporting through a new loadRequest item. Task-number: QTBUG-43767 Change-Id: I65ffb91524b2e0d57875d6728b0558087d91cc0f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Android: Fix isLoading() and progress tracking.Christian Strømme2015-02-102-16/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are no good ways to know if a WebView is loading or not. onPageStarted() is called for each frame, so it might be called multiple times while onPageFinished() is only called for the main frame, that is, resources and other frames might still be loading. To make it worse load status is handled in a different client then the progress, so to make sure we report progress and finished in the right order we need to sync them up and let the last call be responsible for reporting the loading succeeded status. Change-Id: Ibcf858bfa026c5b280c70b338801be9a1475b376 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Be consistent with the signal & slot syntaxChristian Strømme2015-02-091-5/+5
| | | | | | | | | | | | | | | | These where the last few connections that still used the old signal & slot syntax. Change-Id: I9622b5b0fbc0b96553b7898f44f2b984deb1d8a4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Add loadHtml() function on Android and iOS.Christian Strømme2015-02-0911-0/+77
| | | | | | | | | | | | | | | | | | | | | | | | This adds a loadHtml() function to the WebView, making it possible for the user to set the HTML content of the WebView. [ChangeLog][WebView] Added loadHtml() function. Task-number: QTBUG-42335 Change-Id: I8a044e4fb2c0fc4bacff049f02a8cb525d593e15 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Add runJavaScript() on Android and iOS.Christian Strømme2015-02-0913-1/+244
| | | | | | | | | | | | | | | | | | This is a rough implementation on both Android and iOS and both comes with certain limitations. On Android we require API level 19 or higher and on iOS the runJavaScript function is not asynchronous. Change-Id: Ia19782505e5e30d5517a4d627565e5432cc27bfa Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Fix auto tests on desktopChristian Strømme2015-02-091-0/+7
| | | | | | | | | | | | | | | | On desktop we use WebEngineView and before we can use it we need to call QtWebEngine::initialize(). Change-Id: I4c77e5e64c394bff1732fee154d3a02e969f18f7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Refactor QWebView code.Christian Strømme2015-02-0918-613/+948
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In an attempt to make the code more future proof, this patch tries to improve the abstraction between the native WebViews/View controllers and the public APIs. This should make it easier to add new platforms and alternative public interfaces, e.g., a Window/Widget API. It should also make it easier to implement a plugin system if needed. In addition the following changes were done: - reload() implementation in the android controller. - reload() calls the native reload function on both Android and iOS. - loadProgress() calls the native getProgress() directly on Android. - isLoading() calls loading() on the UIWebView (iOS) - runJavaScript() will now only pass the script and an id to the platform implementation to avoid creating a strong coupling to QJSValue. Change-Id: I3cbd81c7fd8d93bacf9134be32ad061d1f9e1183 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>