summaryrefslogtreecommitdiffstats
path: root/src/webengine/api
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix issues with qml bindings accessing non-existing adapterMichal Klocek2018-09-125-76/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have currently two levels of initialization for WebEngineView: the profile initialization and the adapter initialization. The adapter initialization is delayed to first navigation request to pick the right initial site instance and avoid creating dummy/blank WebContents, which in turn would start unnecessary render process. Profile initialization is delayed to make sure we avoid unnecessary default profile creations. Created profiles use filestorage. Unfortunately qml will call QQuickItem::componentComplete() only when the root element is completed and the bindings can be already in use by that time. Profile initialization has to take place before adapter initialization. Construct adapter together with WebEngineView, but create and initialize profile before adapter initialization. Go through WebEngineView and fix emitting signals based on adapter initialization. Most of the signals are emitted on initializationFinished(). Task-number: QTBUG-70248 Change-Id: I2acd8bff761c692a360733cbf537de53e1295695 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Improve QWebEngineUrlScheme APIJüri Valdmann2018-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following feedback from 5.12 API review: - Use enum class for Syntax - Add Q_FLAG for Flags - Mark constructor from name as explicit - Rename Secure to SecureScheme - Rename Local to LocalScheme - Rename addScheme to registerScheme - Rename findScheme to schemeByName Task-number: QTBUG-70247 Change-Id: Iae332c8d9843349506e8a4b07d70f0d234597375 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Doc: Add missing . to property descriptionKai Koehne2018-08-291-1/+1
| | | | | | | | | | Change-Id: I694749ec57caa70ee5a6196684b196e84421ff6e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Return http status code for successfully loaded pagesErwin Kandler2018-08-291-2/+2
| | | | | | | | | | | | | | | | | | WebEngineView supports getting the http status code (error code) for failed loading requests only. This patch lets the user access the status code for successfully loaded pages as well. Change-Id: Ib8dbdfe94eed4d62e731c736c13f60ebd62a23fa Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Fix build without webchannelKai Koehne2018-08-281-0/+2
| | | | | | | | | | | | | | Amends c4cded3fd5ba64. Change-Id: Ie0e01440e071ca01c6677a793ce0cc5f3f640ec7 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Do not force default profile on WebEngineViewMichal Klocek2018-08-254-25/+58
| | | | | | | | | | | | | | | | | | Do lazy initialization for WebEngineProfile on WebEngineView. Fix unnecessary creation on default profile on destruction. Task-number: QTBUG-66068 Change-Id: I9a5889387ac64f0dc718a9e105c8d498aed47a43 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Michael Brüning2018-08-211-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf configure.json examples/webenginewidgets/markdowneditor/resources/3rdparty/marked.js examples/webenginewidgets/markdowneditor/resources/3rdparty/qt_attribution.json examples/webenginewidgets/markdowneditor/resources/markdowneditor.qrc mkspecs/features/platform.prf src/3rdparty src/core/media_capture_devices_dispatcher.cpp src/core/net/url_request_context_getter_qt.cpp src/core/net/url_request_context_getter_qt.h src/core/web_contents_adapter.cpp Change-Id: I467133ba455b1f85f6bb61793794c31cb1094541
| * Forward mouse and keyboard modifiers from QDropEventJüri Valdmann2018-07-131-1/+1
| | | | | | | | | | | | | | Task-number: QTBUG-69231 Change-Id: I35b503dae7e2d90b26b6e61a4c7c260e45df2b62 Reviewed-by: Filipe Azevedo <filipe.azevedo@kdab.com> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Make WebChannel an optional featureMichal Klocek2018-08-091-0/+18
| | | | | | | | | | | | | | Add webengine-webchannel feature. Change-Id: I600572180f8169aafe79cf0408527cc087d9a007 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Add printRequest()Michal Klocek2018-08-093-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Adds printRequested() signal for web content. This signal is emitted on javascript window.print(). This change updates also qt printview manager implementation, fixes a corner case and warnings about ipc unconsumed attachments. Task-number: QTBUG-69237 Task-number: QTBUG-53745 Change-Id: I0c47b732e27e929ac6db237fb562b7d5f9b959c2 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Fix running webengine without default profileMichal Klocek2018-08-031-1/+1
| | | | | | | | | | | | | | | | | | If default profile is not needed do not create by accident one in ~QWebEngineProfilePrivate. Task-number: QTBUG-66068 Change-Id: Ib4131268686178560f3a89dce41e59eb57613e17 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add QWebEngineUrlScheme classJüri Valdmann2018-08-021-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Public API for the new url/url_util_qt extension to Chromium, which allows to integrate custom schemes into Chromium's url parsing library and security model. Previously custom schemes would be treated as 'unknown' schemes and rely on fallback behavior in Chromium. [ChangeLog][Custom Schemes] Added the QWebEngineUrlScheme class for configuring how custom schemes are parsed and which security restrictions should apply. Task-number: QTBUG-62536 Change-Id: I7d8b9da3ad742f568b82ccc6a2456ad35e84069b Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Add QWebEngineDownloadItem page/view accessorAllan Sandfeld Jensen2018-08-025-0/+25
| | | | | | | | | | | | | | | | | | | | To be able to determine where a download was triggered. [ChangeLog][DownloadItem] Added a page/view accessor to tell were the download was triggered. Change-Id: I21843a545a3e0eb66f5e5fa8a50e77564f2118a7 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Introduce WebEngineAction in Quick APIValentin Fokin2018-08-026-46/+606
| | | | | | | | | | | | | | | | | | | | | | Also implement QQuickWebEngineView::action() method similar to the Widget API to access the WebEngineActions. [ChangeLog][QtWebEngine] Introduce WebEngineAction in Quick API Task-number: QTBUG-56117 Change-Id: I758cd4703db4c111c1ed9187e091d4c845486c46 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Add DNS prefetchingAllan Sandfeld Jensen2018-08-012-0/+26
| | | | | | | | | | | | | | | | | | | | | | Turns out we did no have DNS prefetching. It requires an extra component. The same component can also do pre-connect, but we do not enable that, as it requires a predictive browsing backend. [ChangeLog][Settings] DnsPrefetchEnabled added, but disabled by default. Change-Id: Ieb036435b9f1a72a7be302e38e89e0c347c7176b Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Create WebContents with initially_hidden = trueJüri Valdmann2018-07-161-0/+3
| | | | | | | | | | | | | | Task-number: QTBUG-69360 Change-Id: Ia17ce79a8221aa339c72763a984bf1958935ef96 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Rename BrowserAdapterClient to ProfileAdapterClientMichal Klocek2018-07-094-44/+44
| | | | | | | | | | Change-Id: I1f8c0d2e59c2565b24c8c636553f1b70bcd31774 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Rename BrowserContextAdapter to ProfileAdapterMichal Klocek2018-07-096-88/+94
| | | | | | | | | | | | | | | | | | Follow change of BrowserContextQt to ProfileQt. Fix wrong naming usage of browserContext instead of browserContextAdapter. Change-Id: I75fdac685d9bffd44f0144921d3e87305d6d44c9 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Enable client certificate storeAllan Sandfeld Jensen2018-07-082-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Creates the default client cerficate store for the platform and when given a choice of client certificates forwards to the choice to the application. Only a Widgets API for now. Task-number: QTBUG-54877 Change-Id: Ie15152398d5769579fa0c07e3e3035c2374e9940 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Finalize change from BrowserContext to ProfileMichal Klocek2018-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | Changes 6c319ce and af313cb splited BrowserContextQt into ProfileQt and ProfileIODataQt. Finalize the change and rename leftover browserContext references to follow the initial change. Change-Id: I845142b1edb67ec4b94439be1e6cfc841dd3f55c Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devAllan Sandfeld Jensen2018-06-261-1/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf configure.json src/3rdparty tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp Change-Id: Id79ff6cf01c2db3a2044881ddcbf044abdf84936
| * Doc: Add missing dots (qtwebengine)Paul Wicking2018-06-221-1/+1
| | | | | | | | | | | | Task-number: QTBUG-68933 Change-Id: I395157a9931a0e0789b3791cc9b4d55dbcf8a4c2 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Fine tune configure and clean up header includesMichal Klocek2018-06-1216-33/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously configure was generating two config headers qtwebengine-config.h and qtwebengine-config_p.h, however those headers were never installed or included as dependency in Makefiles. Moreover, due to the name clash all features were included into qt_lib_webengine_*.pri which is QtWebEngine QML module. Move configure to core so all features belong now to qt_lib_webenginecore*.pri. Fix global includes to include qtwebenginecore-config*.h. Drop all DEFINES and use QT_CONFIG instead. Cleanup all evil looking includes in headers for webengine and webenginewidgets. Change-Id: Iddbc8bf4487d9a5f0c19a71a9569535083507756 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Use range-based for instead of Q_FOREACHJüri Valdmann2018-06-062-3/+4
| | | | | | | | | | Change-Id: Ibf016b795ff98fddfa29fb5dc63924a2d2159d71 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Unify and simplify profile constructorsMichal Klocek2018-05-281-1/+1
| | | | | | | | | | | | | | Use one constructor for private profile creation. Change-Id: I57a227b6344b6e308cfd4931986fa1dede75cfce Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Michal Klocek2018-05-182-0/+8
|\| | | | | | | refs/staging/dev
| * Disable drag&drop on eglfs for qml appMichal Klocek2018-05-042-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The drag creates raster window, which on eglfs platform can be problematic. In case of running qml based browser without backing store, this will try to create a backing store during drag event, which will abort on eglfs. Therefore avoid the drag in qml in case the platform does not support multiple windows. This patch has the side effect of disabling drag even when qml runs with backing store, i.e. using QQuickWidget and therefore creating another raster window is not an issue. [ChangeLog][Behavior Changes] Drag&Drop is now disabled for QML based applications, when platform does not support multiple top-level windows (like EGLFS). Task-number: QTBUG-57516 Change-Id: I0c2685ba90914fe1f7168c79744c55e07e589488 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Change BrowserContextAdapter to be QPointerMichal Klocek2018-05-184-21/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BrowserContextAdapter is living and accessed only in UI thread, remove QSharedPointer usage and change QWebengineProfile to use QPointer. Prevent BrowserContextAdapter outliving WebEngineContext by setting globalObject as a parent to track WebEngineContext destruction. This commits tries to simplify the life cycle handling of browser context, it removes profile shutdown methods and QWebEngineBrowserContext, which was used to track profile destruction. Task-number: QTBUG-62147 Change-Id: I79f2c38a123cd053e3a59f4900afbdc759a396fe Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Remove keeping browser context as shared pointer in web context adapterMichal Klocek2018-05-184-5/+36
|/ | | | | | | | | | | | | | | | | | | In widgets we document that web contents can not out live browser context ie. WebEngineProfile can not be deleted before WebEnginePage which uses it. In qml we can not be sure the order in which objects are garbage collected. We used shared pointers to keep order of destruction. Unfortunately shared pointers do not work well with corner cases, and we added more and more code to deal with that (shutdown methods + qpointers wrapping qsharedpointers). In order to remove growing complexity remove usage of shared pointers to keep strict deletion order. Remove shared pointer from WebContentsAdapter and simply track the WebContents, that is used by the given BrowserContext. Force deletion of webcontents first. Change-Id: I05f886a0094d971b03f9a35e12c4b4672f0fe4ce Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Make sure we can build with -no-feature-draganddropJoerg Bornemann2018-04-172-0/+11
| | | | | | Change-Id: Ib6763a8a3e1ac1ac98caef39f7e6e75c18344424 Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix crash on launching and quitting nanobrowser with devtools openAllan Sandfeld Jensen2018-04-171-6/+7
| | | | | | | | | Make sure it is opened after initialization of the inspected content, and deleted when the inspected content is closed. Task-number: QTBUG-67642 Change-Id: Ie7218bc437e8c529205ceb7744c4aa0c9ffe6c75 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Use wrappers in QtWebEngineCore public interfaceJüri Valdmann2018-04-132-6/+4
| | | | | | | | Stop exporting quota / RegisterProtocolHandler request controller classes, and use the public wrapper classes in WebContentsAdapterClient instead. Change-Id: Iaa380b6ceb4f9464fc05dd012ee5df219f11f189 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Shorten names of permission classesJüri Valdmann2018-04-133-14/+14
| | | | | | | | | | | Remove 'permission' from class and signal names, so e.g. QWebEngineQuotaPermissionRequest becomes QWebEngineQuotaRequest and quotaPermissionRequested becomes quotaRequested. Rename the internal controller classes to public name + "Controller". Change-Id: I247714ab0a2880adbf4ed8ee68f1b78838ae7a14 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Avoid creating temporary blank WebContentsJüri Valdmann2018-04-063-148/+92
| | | | | | | | | | | | | | | | | | | | | - Avoid creating a blank WebContents for new QWebEnginePages only to replace it with a different blank WebContents moments later. This problem is already solved in QQuickWebEngineView by lazy initialization, therefore the patch moves this lazy initialization into WebContentsAdapter itself so that it can be applied to both QQuickWebEngineView and QWebEnginePage. - Try to delay WebContents creation until the first navigation so that we have enough information available to pick the right initial SiteInstance when calling WebContents::Create. This is done by triggering WebContents creation from the first call to a WebContentsAdapter::load* method. - Use the SiteInstance from WebContentsDelegate::OpenURLFromTab. This method gets a SiteInstance pointer which we should give to WebContents::Create. Task-number: QTBUG-65561 Task-number: QTBUG-67163 Change-Id: Id7b351998adefb810cf27c61a1447b61d7f4c606 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Replace deprecated Q_FLAGS macroKai Koehne2018-04-052-5/+3
| | | | | | | | | | | | | Q_FLAGS is deprecated, and is replaced by the more powerful Q_FLAG macro. Anyhow, Q_FLAG and Q_FLAGS only makes sense if used inside a QObject or Q_GADGET. The patch therefore makes QWebEngineContextMenuData a Q_GADGET. Change-Id: Icccb373846a645272a7bf29397b930ae80be9b85 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Valentin Fokin <fokinv@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove MediaNone, CanDoNone flags from QWebEngineContextMenuDataValentin Fokin2018-03-222-10/+0
| | | | | | Task-number: QTBUG-66994 Change-Id: I8e5ce23e2326fff078e11cadc70274641eeef132 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Adaptations to form validationAllan Sandfeld Jensen2018-03-153-79/+2
| | | | | | | | Form validations messages has moved entirely to being done by Blink. Change-Id: I6742c111fc59f0baba75b8b37f5d0ec9ae2fb920 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Doc: Remove broken link from web engine download item docsLeena Miettinen2018-03-131-1/+1
| | | | | | | | The doucmented enumerations are obsolete, so the link is not really useful anymore. Change-Id: I9902ed18caa2e8a7a9bbb7935cbd9bb9ae6a88c8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Expand docs for WebEngineDownloadItemJüri Valdmann2018-03-121-6/+69
| | | | | Change-Id: I82619627b7dd1fbb86d8f0363de2f6e9666b44d4 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Move quota and registerProtocolHandler permission classes to coreJüri Valdmann2018-03-082-104/+8
| | | | | | | | | | | | | | | | | | | | | | | - Move QWebEngineQuotaPermissionRequest and QWebEngineRegisterProtocolHandlerPermissionRequest to QtWebEngineCore. - Delete QQuickWebEngineQuotaPermissionRequest and QQuickWebEngineRegisterProtocolHandlerPermissionRequest. Miscellaneous cleanup: - Mark QWebEngineQuotaPermissionRequest constructors as internal for QDoc. - Remove superfluous Q_DECLARE_METATYPEs (implied by Q_GADGET). - Remove Q_UNREACHABLE from default constructor. For some reason QML seems to default construct an unused temporary object before throwing it away and copy constructing the actual object. This triggers Q_UNREACHABLE. Change-Id: Icf9f4e34996e4c64aec65b734bcb3bbd22b4dc51 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove unused QQuickWebEngineView::setDevicePixelRatioJüri Valdmann2018-03-062-9/+0
| | | | | Change-Id: Ia202d41907bd7e5925f8995a2ca373ffe5ef03e8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Replace accessibility private API usage with QQmlPropertyv5.11.0-beta1Alexandru Croitor2018-02-221-8/+10
| | | | | | | | | | | | Previously enabling accessibility for the QtQuick WebEngineView was done by calling QuickAccessibleAttached::qmlAttachedProperties() which is a private API call. Instead of that, set the Accessibility attached properties by using QQmlProperty. Task-number: QTBUG-63098 Change-Id: Ibc927c1fce121dee56d8a21af412056d98c82c4d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fixup merge of downloadType from 5.10.1Allan Sandfeld Jensen2018-02-213-9/+22
| | | | | | | | | | | | | In 5.11 we deprecated downloadType and at the same time ripped out most of the faulty logic. Later we partially fixed the logic in 5.10.1, but kept the 5.11 version during the merge. This restores the improved logic from 5.10.1, while keeping the property deprecated since it is still misleading at times. Change-Id: I12ee09a2b212506f7ba1a336c9c2e88aa3b1de24 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-181-0/+4
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I230e21638604fe75b6f1d6b7877f9bc4b2d2c020
| * Fix crash on accessing WebEngineView properties too earlyPeter Varga2018-02-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | WebContentsAdapter is not created together with the QQuickWebEngineView. Thus querying a view property can lead to a crash if it uses the adapter. This fix adds the missing guards for contentSize and scrollPosition as it is done for similar WebEngineView properties. Task-number: QTBUG-65942 Change-Id: I9c2668a059b08325629f5730608280ba7f3669cf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Allow disabling cache of off-the-record profilesAllan Sandfeld Jensen2018-02-151-3/+4
| | | | | | | | | | Change-Id: Ib319f46465e9f330ef5f2c7a5b2f6a3d50c33c00 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Fix javascriptCanPaste NOTIFY signalJüri Valdmann2018-02-131-1/+1
| | | | | | | | | | Change-Id: Ic3f1e11f42f26e7800524dd88f707200ef3b7705 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add support for registerProtocolHandlerJüri Valdmann2018-02-133-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend initialization of URLRequestContextGetterQt to create a content::ProtocolHandlerRegistry for each content::BrowserContext and add the registry's URL request interceptor to the front of the interceptor chain. Implement methods in WebContentsDelegateQt to add/remove protocol handlers to/from the ProtocolHandlerRegistry. Add permission request signal and classes for core, quick and widgets. Add widgets autotest. Add signal handlers to quicknanobrowser and simplebrowser. Task-number: QTBUG-62783 Change-Id: I808e7eb9a1cb4d7216686deed4895de14fe46310 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge dev into 5.11Oswald Buddenhagen2018-02-062-25/+27
|\ \ | | | | | | | | | Change-Id: Iad50b7865d6861bb15b85e6abe455aae2802ea4b
| * \ Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Allan Sandfeld Jensen2018-02-062-25/+27
| |\ \ | | | | | | | | | | | | refs/staging/dev