summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Test for webenginewidgets, not widgetsLaszlo Agocs2014-05-191-1/+1
| | | | | Change-Id: Icecb6b716a45b4682ddd9b16383f3aa4a5acb312 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fix up tabbed browser code.Michael BrĂ¼ning2014-05-192-7/+8
| | | | | Change-Id: Ia1a92a7eb9b3568e8cb7ccf6c7056abba647fd8d Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fix the quicknanobrowser example's import versionJocelyn Turcotte2014-05-191-1/+1
| | | | | Change-Id: Ib1d855bab6c764c0341b39b374b00425645903ff Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Prepend the namespace for ElideMiddle.Zeno Albisser2014-05-161-1/+1
| | | | | Change-Id: If2ac075f095c83fd53c939d3494c7807328ed2dc Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Add linkHovered support for Widgets APISzabolcs David2014-05-151-6/+2
| | | | | | | | Drop hovered title and link text parameters, as we did in the Quick API. Change-Id: Ia1a38e0d728afbcbb6858a890486772da74aa813 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Add linkHovered signal to the QQuickWebEngineViewSzabolcs David2014-05-051-0/+32
| | | | | | | | I dropped hovered title support from the QtWebKit API, it seems we don't need that logic. Change-Id: I5617c295344512a35aa526a6f1307f0b21f866d6 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Add a feature permission bar to the demo browserPierre Rossi2014-04-295-0/+209
| | | | | Change-Id: Ib2deac6099c37f1e112821fb3398586269e05f22 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Cleanup the QtWebEngineWidgets public headers and APIJocelyn Turcotte2014-04-1513-9/+58
| | | | | | | | | | | | | Headers were left intact to leave a trace of the evolution compared to the QtWebKit API and to make it easier to work until we had a basic subset of the API implemented. With the upcoming release, this patch removes this convenience in the aim of starting polishing the headers and the documentation for the upcoming release. Change-Id: Iae436b4ec041d771a7002575e122835802bc9f3e Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Update QWebEnginePage::WebWindowTypeJocelyn Turcotte2014-04-151-3/+2
| | | | | | | | | | | Expose the same values as currently available in QQuickWebEngineView::NewViewDestination. Rename the WebModalDialog to WebDialog, which actually replaces the tool/status/menuBarVisibilityChangeRequested signals. Change-Id: Icc103f434fb3eca49f1a53e476e101c3d6fffd36 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix typo in widget browserPeter Varga2014-04-101-2/+2
| | | | | Change-Id: I8a805feb1893f2e4b08944e2fc987d0a8fbbc89a Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Render the widgets view using the scene graph into a QOpenGLWidgetJocelyn Turcotte2014-04-083-1/+10
| | | | | | | | | | | | | | | This means that widgets application now need to setup the GL context sharing as well. QWebEngineWidgets::initialize() must be called, which has the same effect as QWebEngine::initialize(). The QtWebEngineWidgets now depends on the QtWebEngine module to make this happen. Since QOpenGLWidget is only available in Qt 5.3, this patch also disables the webenginewidgets module completely when building using Qt 5.2. Change-Id: I0e99a779d1eb080f2ccf5a338ff0763ad64e6eba Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Centralize OpenGL initializationSimon Hausmann2014-03-312-9/+3
| | | | | | | | | | We now require the user to use QWebEngine::initialize() in main (preferably) and print out an error message if this wasn't set up accordingly. This limits the use of private scene graph API to inside QWebEngine and offers public API for users of the API. Change-Id: I787c176a85ab7784dbc8787d9876960b4872959e Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Rough port of the documentation to QtWebEngineJocelyn Turcotte2014-03-313-20/+19
| | | | | | | | | | | | | | | This is a gross mechanical modification of the documentation, along with build system bindings to allow it to generate. This should allow doing iterative improvements to the documentation from now on. This fixes project-related qdoc warnings but we still need to do some serious work to get the documentation better fitting QtWebEngine. All the documentation is ported to match the current state of our headers (without trying to adapt to modified APIs yet) and we should clear the part of the documentation that we don't need at the same time that we clean up our public headers. Change-Id: I6fb4e10e8b4c1c53be7bc7c581286248ac04d4da Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix typo in quicknanobrowser.proPeter Varga2014-03-261-2/+1
| | | | | | | | | Remove ContextMenuExtras.qml entry from the project file of the quicknanobrowser. It is unnecessary after the quicknanobrowser fork. Change-Id: I87055413392e14817429678f29b520e55cafbbd1 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fork the quicknanobrowser as tests/quicktestbrowserJocelyn Turcotte2014-03-195-129/+1
| | | | | | | | | | | | | | This also removed experimental API uses from the quicknanobrowser example, which should be used mainly for documentation purposes. The quicktestbrowser should be the one that we use from now on as a raw testbed of new APIs. As with other targets in the tests directory, it will only be built by default if Qt is configured with -developer-build (and without -nomake tests). Change-Id: Ib4461c898cd3227bbb810493daac4d841d0d8f3e Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Uncomment the binary install of the fancybrowser exampleJocelyn Turcotte2014-03-191-2/+2
| | | | | | | | Its sources are going to be installed and the binary should end up at the same place. Change-Id: Iad7c732ba9f49cb0f02eb2c10b797298034ef38d Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Rename example directories to match the source install destinationJocelyn Turcotte2014-03-1989-6/+6
| | | | | | | | | | | | | To match other modules example directory structures we should deploy our examples in a directory matching the module name, webengine and webenginewidgets in our case. qmake uses the relative directory of each example up to the upper "examples" directory to decide where they will be deployed when running the sources install target. Change-Id: I59ce7ff8a30f98fad20064c7eecf72b784f1d275 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Remove the widgetsnanobrowser exampleJocelyn Turcotte2014-03-1914-279/+10
| | | | | | | | | This example hasn't been touched since we imported QtWebKit examples. If we need to have a more test-purpose widgets browser in the future, we can dig it back from the history. Change-Id: Icee9bd7f09827a97b33c6783b87311e331d963b1 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix forced exit from fullscreen and reload action in quicknanobrowserAndras Becsi2014-03-061-3/+6
| | | | | | | | The tabs.currentView property was probably removed in some earlier change and is undefined, use the currentWebView property instead. Change-Id: I0fc31b0cc7191f2ed2f57c27306387f062cff2e1 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Add HTTP and proxy authentication signals directly to QWebEnginePageJocelyn Turcotte2014-02-284-56/+56
| | | | | | | | | | | | | | | | | | This allows handling calls that would be signaled by QNetworkAccessManager in QtWebKit. This pulls QtNetwork as a dependency of the QtWebEngineWidgets module to be able to use QAuthenticator, but isn't required otherwise. Only the request URL is available in the case of HTTP authentication (no access to HTTP request headers that the QNetworkReply would allow) and only the proxy host name in the case case of proxy authentication. This keeps the API synchronous the same way, as QtWebKit did, in favor of source compatibility at the cost of requiring a modal dialog, even though the implementation doesn't require it. Change-Id: I9e021def38e6107c9e66d2de8f86bd0328d543df Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Make Qt 5.2 a minimum requirementPierre Rossi2014-02-141-2/+0
| | | | | | | | Cleanup version ifdefs and v8-private dependencies. Change-Id: Iac393c06dfba02499e60d713d9f4d04ef0c9e617 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Implement QWebEnginePage::findTextJocelyn Turcotte2014-02-132-10/+8
| | | | | | | | | | | | | | | | | | | A few changes to the API: - Return the success result asynchronously. - FindWrapsAroundDocument and HighlightAllOccurrences are enabled by defaults and cannot be disabled. - Found text isn't updating the selection on the page like QtWebKit did, but triggers a separate state not available. A find count and current index could be exposed, but isn't in this case to keep the API delta lower. This also adds the possibility to pass bool results through the CallbackDirectory and add a new tst_QWebEnginePage::findTextResult test since the old test relied on the selection to be updated when the searched text is found. Change-Id: I8189b5aea8d832df183c6c1ae03e3f08198a9c45 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update the invoke wrapper to allow bool argumentsJocelyn Turcotte2014-02-132-6/+6
| | | | | | | | Forcing that arguments to be const references isn't necessary and prevents base types to be passed by value. Change-Id: I53ace8cf731ecaeee0b997af72d37843ef54e38f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* QQuickWebEngineView new window API refactoringJocelyn Turcotte2014-02-131-20/+19
| | | | | | | | | | | | | | | | | | | | Improve the code and API in a few ways: - Expose a more discoverable "request" argument in the signal. - Use the request as the carrier of the backend WebContentsAdapter and get rid of our handle. - Put the adoption method (renamed to openIn) on the request object and keep the view API clean of a context-specific adoptHandle method. - Use an enum instead of strings for the new view destination. - Do not let JavaScript own the request object since it won't be necessary until we want to support asynchronous view attachment. We can create the request object on the heap and let the JavaScript engine own the object once we want to support it. - Move the request class to its own header. - Replace tabs.currentView by currentWebView in the quicknanobrowser qml code since we now need this property on the root object anyway. Change-Id: I40d7d15255f516ead9f3e414dd587bf345e6ca4b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Implement requestFullscreen for QQuickWebEngineView.Zeno Albisser2014-02-111-0/+46
| | | | | | | | | | | | | | This patch adds a property isFullScreen and a signal fullScreenRequested to QQuickWebEngineViewExperimental. The signal fullScreenRequested is emitted when some web content requests fullscreen through the javascript API. The property isFullScreen is supposed to be set programmatically when the view is being shown fullscreen. This information is then available to the WebContentsDelegateQt when checking if the fullscreen request has been accepted. Change-Id: I04cbb45f263a188d26cc87d70ac53b0fbab63936 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Add TakeFocus in WebContentsViewQt for passing on tab focus.Zeno Albisser2014-02-101-0/+10
| | | | | | | | | | Chromium calls RenderViewHostDelegate::TakeFocus when the last focusable item within the page was reached. We then have to move the focus on to the next/previous QQuickItem. Change-Id: Id0128053602ff1220c1bced1b218050b66fef659 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Add Ctrl+R shortcut for reload.Zeno Albisser2014-02-061-0/+4
| | | | | Change-Id: Ia7bb688e3ace174da7fd5957a35f47f9b886952f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fix reload button in the QuickNanoBrowserAdam Kallai2014-01-281-1/+1
| | | | | Change-Id: I3670380d76d014a33e0112631bdb42927b67b9d9 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Get rid of tr1/functionalJocelyn Turcotte2014-01-272-20/+32
| | | | | | | | | | This header requires rtti in libstdc++ on Mac, which we can't recommend since Qt itself is usually built without rtti. Replace its uses with simpler hand-made template functors. Change-Id: Ic020dcceaf262f77d92b31a8318a513fa200428d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Implement QWebEnginePage::toHtml and toPlainTextJocelyn Turcotte2014-01-222-13/+25
| | | | | | | | | | | | | | | | Those methods are now made asynchronous and need to be given a callback to handle the result. Update the code in the browser and fancybrowser examples using std::bind when using C++11 or tr1::bind with C++03 (which should be available with compilers on platforms that we support). Add a (currently failing) earlyToHtml test to make sure that an empty page doesn't crash because of a possibly incomplete attachment of the QtRenderViewObserver. Change-Id: I3ab7cb6f25b91b584dd80df5e4e9ad1e3214348e Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Pave the way for our UI delegation strategy.Pierre Rossi2014-01-154-6/+71
| | | | | | | | | | | | | | | | | | | Starting with the context Menus for QtQuick. Add default UI delegates as a subproject. We allow ourselves to use Qt Quick Controls there for in order to get a nice "out of the box" experience for things like context menus, dialogs, etc while leaving the door open for system embedders to override this. Opting out of the deployment of these QML files is still very primitive but can be done by passing WEBENGINE_CONFIG+=no_ui_delegates at qmake time. Customization of context menus could be done via a qml component, which is probably best kept in experimental for now while we address its shortcomings. Change-Id: I0705b20d5ddd3bb010f9371b65a181c6b02a03e1 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fix installation of most examplesSimon Hausmann2014-01-153-1/+6
| | | | | | | | | | * Make sure the example source code is installed * Make sure the installation path is consistent with the path within the module, to ensure that the sources end up next to the compiled binary. * Skip the widgets nano browser from the installation, as it's a developer tool. Change-Id: I35b421e12f8e6ddd3f2045e318b21543ff929cd8 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Disable currently unsupported features in browser example.Zeno Albisser2014-01-141-6/+24
| | | | | Change-Id: I09ce8ad0372a80a2f19b95a2ba0a6fa8635debea Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Disable viewSourceAction in fancybrowser for now.Zeno Albisser2014-01-141-0/+2
| | | | | | | | This should be enabled again as soon as we have toHtml() implemented. Change-Id: I843112aa2778c05bbac9ab51f5427850a862f247 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* quicknanobrowser: reset progress bar when reaching 100%Zeno Albisser2013-12-231-1/+1
| | | | | Change-Id: I146df83948017b5ad72e40d16a8cc7105691c309 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* createWindow QML API for QQuickWebEngineViewJocelyn Turcotte2013-12-232-18/+70
| | | | | | | | | | | | | | | | | | | | | | | | | This implements adoptNewWindow for QQuickWebEngineView. The API is only intended to be used through QML to avoid delegating the QQuickWebEngineViewHandle ownership through a signal parameter. Another limitation of the implementation is currently to fail the handle adoption unless it is done synchronously within the adoptNewWindow call. To support this we would need to delay the call to WebContentsAdapter::initialize which will leave the adapter without a client when returning to the event loop and would require putting null checks everywhere it is used. So I would prefer to keep the API limited and avoid potential crashes. If we want to support asynchronous Loader elements or QML files fetched from the network in the future, the API should be able to scale to the task once we've adjusted the implementation. This also adds basic tabs support in the quicknanobrowser example. The url property is now set imperatively to avoid overwriting the adopted WebContentsAdapter's loading URL. Change-Id: Iba5c5dc3ffa21045f356be131ca15c01b9aee7c8 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Fix the build with Qt 5.1Andras Becsi2013-11-261-0/+2
| | | | | | | | We are still able to build with Qt 5.1 if we disable the hardware acceleration codepaths. Change-Id: Ic748dac0a7f25bbd79f2f711a18431872cebd917 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Remove the need for application to set an RPATH.Jocelyn Turcotte2013-11-184-4/+4
| | | | | | | | | | | | | The WebEngineWidgets module and the WebEngine QtQuick plugin libraries already have the RPATH set properly in their headers and the application won't need to link any symbol directly to the Core library. Remove the RPATH directive for examples and tests and fix the build issue by making sure that the link directive isn't passed to dependencies through the prl or pkgconfig file. Change-Id: Id1f5efb8c9823613e804e8e6356d711d561d72ec Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Make fancybrowser build and linkPierre Rossi2013-11-124-44/+45
| | | | | | | Also update references in the doc. Change-Id: Ica4d77cb1db040b466c739e4fc1bfd37df544589 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Import fancybrowser examplePierre Rossi2013-11-129-0/+523
| | | | | Change-Id: Ia61fbe3ef6b76c7530d10d4a3305d4208b3469ef Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Delegated renderer: Put textures on those quads.Jocelyn Turcotte2013-11-112-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few changes are necessary to allow fetching textures provided by the render processes through IPC and bound to their respective GL context in the GPU process and use them in the QtQuick scene graph. - Remove the plain color test textures. - Allow setting the QtQuick QOpenGLContext's handle as the share context for all context set as shared in the Chromium GPU process. We do this by letting the GpuChannelManager ask us for a ShareGroup instance responsible for returning a sharing GL context handle. - Fetch texture IDs from the MailboxManager used by the GPU process using the Mailbox given to us in the DelegatedFrameData. This is the same mechanism used by Chromium to share textures between "client" GL contexts. - Keep the QtQuick scene graph threads and Chromium in-process GPU thread separate. The complicated part of merging those two rendering pipelines on the same thread is that it would force Qt to also use only one thread for rendering. For the moment we will try to synchronize those threads together instead. - Lock the Qt SG thread while waiting for resource sync points. Do so by posting a callback to the Chromium GPU thread and wait until the sync point of every resource has been retired by the producing contexts. - Acknowledge the delegated from once QtQuick swapped the GL buffers instead of right after we added the frame to the scene graph. This fixes some issues where the textures for the previous frame would already be released as Chromium was producing the new frame. There are still a few issues regarding synchronization that have to be fixed, especially when Qt triggers the rendering of a new frame while Chromium is starting to produce the next frame. Note: To enable it we still need to pass the following command switches: --enable-delegated-renderer --enable-threaded-compositing --in-process-gpu Change-Id: I2d4f7fac603b1808ed1495a8d689cb48e9ed41b9 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Give the demo browser prettier popupsPierre Rossi2013-10-291-4/+56
| | | | | Change-Id: Ia8052bffc7be18c4d8f81c3a89ac4a64b1c589af Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Pimp up our QtQuick browserPierre Rossi2013-10-111-10/+26
| | | | | Change-Id: I48c0ed54cd946f223dc050b8a1f26282b02964a2 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Fix typo in quickwindow.qmlArvid Nilsson2013-10-041-1/+1
| | | | | | | | | Set favicon image source to the value of the icon property, not the url. D'oh! Change-Id: I411f787f4f19fbeb2db9a61e4aada79b3527dcfb Reviewed-by: Arvid Nilsson <anilsson@blackberry.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Add loadProgress APIArvid Nilsson2013-10-041-26/+34
| | | | | | | | | | | | | | | | This exposes loadProgress in both widget and quick webengineviews. However, the progress will not change until we get an upstream change in Chromium where the content LoadProgressChanged API is exposed to all ports, not just Android. The upstream change is https://src.chromium.org/viewvc/chrome?revision=221010&view=revision Once we get that change, you'll see the widget example browser start to paint a blue progress rectangle in the background of the URL bar. Also, a progress bar was added to the quicknanobrowser, but it will be stuck at 0 for now. Change-Id: Icbaa01b86c013e0052b3abb7672c38e57128f44a Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Quick: Add Favicon APIArvid Nilsson2013-10-031-0/+5
| | | | | | | | | | | | | | | | | | | Adds a favicon API modelled after the WebKit2 QQuickWebView API, but using an http(s) URL instead of a custom protocol, because there's no icondatabase yet. The icon URL lingers even when a new load is committed, until the load finishes. It might be more prudent to clear the icon when committing a new load, but I opted to let the app take care of that detail if desired. Many browsers show a spinner instead of the favicon while loading, for example. There's no widget API implementation for favicons yet, because that API only makes sense if we have a full-fledged icon database (case in point: QWebEngineSettings::iconForUrl()). Change-Id: I1e7b85104c80de2ae46a5fe9a273104d43a5c71f Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Widgets: implement zoomFactorPierre Rossi2013-10-011-6/+0
| | | | | | Change-Id: I7ef26e4a2e6c9eb228bcf5542ad272b998f8c6a3 Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Add Qt namespace macros QtWebEngine classes.Michael BrĂ¼ning2013-09-172-1/+6
| | | | | | This should enable namespaced builds of Qt and QtWebEngine. Change-Id: I4c9d506d864b42a346026b980dcf3777b9680957 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Implement the basic parts of QWebEngineHistory.Jocelyn Turcotte2013-08-201-7/+0
| | | | | | | | | | | | | | Mark the remaining methods as not implemented to allow enabling most of the dependent code in the demo browser and in API tests. Add two new tests to cover cases that might be problematic with the index-based implementation. This also renames WebContentsAdapter::navigateHistory to navigateToOffset in order to avoid confusion with navigateToIndex. Change-Id: I7c5cb9f5f878e34206fdfe48334a2dc7d9d95a1d Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Implement QWebEnginePage::action for basic navigation.Jocelyn Turcotte2013-08-202-8/+0
| | | | | | | | This imports code from qwebpage.cpp and QWebPageAdapter.cpp of WebKit into qwebenginepage.cpp and thus also restrict the license accordingly. Change-Id: Ic5da8f2b469109cb10132cbe6585f2d941b14403 Reviewed-by: Andras Becsi <andras.becsi@digia.com>