summaryrefslogtreecommitdiffstats
path: root/src/core/api
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge remote-tracking branch 'origin/5.12' into devMichael Brüning2019-01-181-0/+3
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/core/net/network_delegate_qt.cpp src/core/profile_io_data_qt.cpp src/core/web_engine_context.h tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.cpp Change-Id: Id98e3f52f548ceb5b68abd80aedd6ae59db72cc0
| * Lock profile mutex during interceptRequestJüri Valdmann2019-01-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes setRequestInterceptor take effect atomically, so it's always safe to delete the interceptor after unsetting it from the profile. On the other hand, we run into a deadlock if the user code tries to wait for a profile operation on the UI thread to finish. It seems quite unlikely though that user code would do that and it would probably still be easier for users to understand and debug than the current non-deterministic use-after-free problems. Task-number: QTBUG-72260 Change-Id: I1784a9d9f00029d440508f0bb076d1081a326758 Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devMichael Brüning2018-12-182-4/+45
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/core/compositor/delegated_frame_node.cpp src/core/profile_adapter.cpp src/core/profile_io_data_qt.cpp src/webengine/api/qquickwebengineprofile.cpp src/webenginewidgets/api/qwebengineprofile.cpp Change-Id: I35ec8480e758bbcb6c5942a5401cb1b6dbdcc428
| * Document and safeguard usage of custom schemesAlexandru Croitor2018-12-122-4/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change improves the documentation of QWebEngineUrlSchemeHandler to notify the requirement of registering a custom scheme before installing a custom scheme handler. Also start showing warnings when QWebEngineProfile::installUrlSchemeHandler() is called before a scheme is registered. Also show warnings when installing the handler using QML. Task-number: QTBUG-72079 Change-Id: If249592ea43fe2f9ad587a6ff4e8c9dedcc5d3d3 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devAllan Sandfeld Jensen2018-11-052-2/+28
|\| | | | | | | | | | | | | | | | | Conflicts: src/core/render_widget_host_view_qt.cpp src/core/web_contents_adapter_client.h src/webenginewidgets/api/qwebenginepage_p.h Change-Id: Ibd011c40839c09469218ac4c71a13d0a0b1c9778
| * Merge remote-tracking branch 'origin/5.11' into 5.12.0Allan Sandfeld Jensen2018-11-011-1/+2
| |\ | | | | | | | | | Change-Id: Id54a452d04438147e541ff9978c59db27269f694
| | * Fix thirdParty setting for first party requestAllan Sandfeld Jensen2018-10-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some first party requests has no site_for_cookies yet, and thus returns an empty string. The logic matches that of StaticCookiePolicy. Change-Id: I10caf978dc410639cd21fc2aa01eb2bf6dc67c1f Fixes: QTBUG-71393 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
| * | Merge remote-tracking branch 'origin/5.11' into 5.12.0Michael Brüning2018-10-301-1/+26
| |\| | | | | | | | | | Change-Id: I319ea175f9d95a3ffea9cc3140696976348a5238
| | * Trigger disabling offline renderers on late 2013 Mac ProsMichael Brüning2018-10-231-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reads the hw.model string through sysctlbyname and sets the environment variable QT_MAC_PRO_WEBENGINE_WORKAROUND to tell the Cocoa platform plugin to not enable offline renderers upon creation of the platform OpenGL context. Task-number: QTBUG-70062 Change-Id: I986d9d76a80f96a215f3fcd08b3d47e546682e35 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | | Move the profiles' url scheme handler API to coreJüri Valdmann2018-10-312-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implementation of the url scheme handler API in QWebEngineProfile and QQuickWebEngineProfile is exactly identical, so move it to the ProfileAdapter instead. Change-Id: I01baf1c4e5b3c393675adefb0470def90b8b2813 Task-number: QTBUG-71215 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devJüri Valdmann2018-10-221-2/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/core/net/network_delegate_qt.cpp Changed to src/3rdparty: 156c2b70 Disable "some invariants violation checks" for Qt 52bf8b45 Support non-base::Thread GPU thread ba4a51bc [Backport] Speculative fix for mac DCHECK failure 508fda09 Add support for static-libraries to our GN integration Change-Id: If0205ce032ce86b5759b321b6d907b0431b6a978
| * | Use common Qt settings instead of setting C++14 explicit in core APIAllan Sandfeld Jensen2018-10-161-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | Makes it unnecessary for us to try match Qt settings. Only done for API, due to the rest of core being built by GN. Change-Id: Ib9f8acb7e99ae22dd2d7281c9082d822f1d238eb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Add setRequestInterceptor to QWebEnginePageAllan Sandfeld Jensen2018-10-172-3/+26
|/ / | | | | | | | | | | | | | | | | | | | | | | Makes it possible to make page specific intercepts, and is at the same time safer by running in the UI-thread. [ChangeLog][QtWebEngineWidgets][QWebEnginePage] Added setRequestInterceptor, similar to the same call on profile except it operates on a per-page basis and on the UI-thread. Change-Id: Id5a7173156c25d0f030f00b6ef314d283c7c8cdd Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Improve QWebEngineUrlScheme APIJüri Valdmann2018-09-122-32/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Fix QWebEngineUrlScheme::operator== constnessJüri Valdmann2018-09-042-4/+4
| | | | | | | | | | | | Task-number: QTBUG-70247 Change-Id: Ic0898966d9a88a0bbcdf749c6ea7e80e054d68a3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Michael Brüning2018-08-211-5/+21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Fix bougs documentation for QWebEngineUrlRequestJob::replyMichal Klocek2018-07-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | IODevice::close and therefore aboutToClose is called by io thread, connecting it to deleteLater will register deferred delete on event loop of IODevice instance, which is on ui thread. This could be racy since deletion on ui thread can happen before job is done. Change-Id: I895e6a71649ba65944d069f254d119cc60aada6c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * QWebEngineUrlRequestJob: QUrl("null") for unique initiator originsJüri Valdmann2018-07-201-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | The empty URL is used both for representing a missing origin (browser-initiated navigation request) and a unique/opaque origin. This is problematic since the security implications are very different in these two cases: browser-initiated requests usually should have high security clearance, while requests from unique origins should be restricted. Task-number: QTBUG-69372 Change-Id: Iff73fd1c9a29f1c5c281a8945536333081ff2d6b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Unfriend NetworkDeleagte from ProfileIODataMichal Klocek2018-08-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Directly accessing IOProfileData's m_requestInterceptor from NetworkDelegateQt is not thread safe, unfriend the class. This change does not fix the issue of thread safety of accessing the requestinterceptor from NetworkDelegateQt, it is just a cleanup for following commit. Task-number: QTBUG-69844 Change-Id: I488f8968b38ad200178cea2cb0304e1c93aec711 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Revert "Add HTTP request headers to custom URL schemes"Michal Klocek2018-08-092-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a5bdc6236ad52586579a9a3da6a059835ed60761 and 04355f4d6f311adebfc354b094a5f79c6327e86f. CI still crashes on tst_QWebEngineProfile::urlSchemeHandler tests, issue is not reproducible locally and it will take time to investigate. Task-number: QTBUG-69844 Change-Id: I7ddb6a32383400d553fe692c24effb6dfb7b6102 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Add HTTP request headers to custom URL schemesAllan Sandfeld Jensen2018-08-032-0/+10
| | | | | | | | | | | | | | Makes it possible to read extra headers added to the request. Change-Id: I4af0ba8a5b28488b8f12a2cff29807575c24f026 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Add QWebEngineUrlScheme classJüri Valdmann2018-08-023-0/+491
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Rename BrowserContextAdapter to ProfileAdapterMichal Klocek2018-07-091-2/+2
| | | | | | | | | | | | | | | | | | 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>
* | Adaptations for Chromium 67Allan Sandfeld Jensen2018-06-261-0/+2
| | | | | | | | | | Change-Id: I13cedba56012f74651a044d6fa8f0957487bf3eb Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Update export symbols for webenginecore moduleMichal Klocek2018-06-1512-13/+13
| | | | | | | | | | | | | | | | | | | | | | Use own WEBENGINECORE_EXPORT define, mark most headers private and use WEBENGINECORE_PRIVATE_EXPORT for it. For sanity, add "WARNING" as for private headers even though they are never installed. Change-Id: I523d28c1d00217f48bc63dabf138dd3a7eb482d4 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Fine tune configure and clean up header includesMichal Klocek2018-06-123-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-061-1/+1
| | | | | | | | | | Change-Id: Ibf016b795ff98fddfa29fb5dc63924a2d2159d71 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Michal Klocek2018-05-182-2/+14
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.11' into devAllan Sandfeld Jensen2018-05-182-2/+14
| |\| | | | | | | | | | Change-Id: Id171407c17533846e8efe0e586d6793a61543438
| | * Add reserved fields to the cookie filter requestAllan Sandfeld Jensen2018-05-012-2/+14
| | | | | | | | | | | | | | | | | | | | | Makes it cleaner to expand it later. Change-Id: I2ccbcf143ca676c3fb89641b40e0848b6dd4bae8 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | | Change BrowserContextAdapter to be QPointerMichal Klocek2018-05-183-158/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 superfluous Q_D macros for webenginecookiestoreMichal Klocek2018-05-141-23/+15
| | | | | | | | | | | | | | | | | | Since aa527a2e553 we do not inherit QObjectPrivate any longer for webenginecookiestore, remove leftover macros. Change-Id: Ife277ef0cd727a0e25867564bf90b29838303772 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Remove superfluous Q_D macros for qwebengineurlrequestinfoMichal Klocek2018-05-141-21/+12
|/ | | | | Change-Id: I21f8e14e879e733e6427d0092aab50ca94258dd2 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Private constructors for permission classesJüri Valdmann2018-04-132-5/+9
| | | | | Change-Id: I55b033a03ec581841e1cea55c3d707067ee5ef42 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Shorten names of permission classesJüri Valdmann2018-04-135-69/+65
| | | | | | | | | | | 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>
* Stop using type_conversion.h from src/core/apiAllan Sandfeld Jensen2018-04-042-4/+11
| | | | | | | This caused an unnecessary dependency on skia Change-Id: Ic3f109f985632c3f3cb4c8681e9a8290f463bb53 Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io>
* Tie worker rights to cookie policy like Chromium doesv5.11.0-beta3Allan Sandfeld Jensen2018-04-031-0/+4
| | | | | | | | | | | Instead of always allowing all workers, disallow when similar cookies would have been disallowed. This is following the same logic as Chromium is using. Change-Id: I6b9d6c63b894287f64171b138fe03ec080af5115 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Doc: Replace type by class in QWERPHPRequestKai Koehne2018-03-231-1/+1
| | | | | | | | | qdoc has magic to remove the 'This XXX class' in the class overview, but not type. See e.g. http://doc-snapshots.qt.io/qt5-5.11/qtwebengine-modules.html Change-Id: Idd38a860ae08c7199c322d16c3ccc737972131a0 Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io>
* Doc: Fix argument name in QWebEngineCookieStore::setCookieFilter()Leena Miettinen2018-03-221-1/+1
| | | | | | | | The argument "filter" was renamed to "filterCallback", but the docs were not updated accordingly. Change-Id: I8a45a0ea8074a854ac72df652921b3c895752f97 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Improve QWebEngineCookieStore documentationKai Koehne2018-03-221-3/+3
| | | | | Change-Id: If11154d716b2ea98cc6b0b07c4fe2501fe27dcdb Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Doc: Describe use of QWebEngineQuotaPermissionRequest classLeena Miettinen2018-03-201-1/+4
| | | | | | | | | | It is only used by the QWebEnginePage::quotaPermissionRequested signal. Task-number: QTBUG-66779 Change-Id: I265cc1787a5470080706fee548c41624c741e540 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Cleanup file locationsAllan Sandfeld Jensen2018-03-202-3/+3
| | | | | | | | Move printing and network specific classes to subdirectories so we have fewer files in the main dir. Change-Id: I675b1b8b8fd1588061104cec181087f305b44f98 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Doc: Add documentation for parameters to fix QDoc errorsLeena Miettinen2018-03-182-4/+8
| | | | | | | | | | | In QWebEngineRegisterProtocolHandlerPermissionRequest::operator==(), QWebEngineRegisterProtocolHandlerPermissionRequest::operator!=(), QWebEngineQuotaPermissionRequest::operator==(), and QWebEngineQuotaPermissionRequest::operator!=(). Change-Id: I0eaf1136b67396b678cc743dffd1e35f585f0c0c Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Switch cookie-filter API to std::functionAllan Sandfeld Jensen2018-03-163-24/+27
| | | | | | | | | Allows us to use return value instead of magic properties Task-number: QTBUG-66825 Change-Id: I55202a7aca2e662bc214b05caf767d2da496f026 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Rename protocol() to scheme() in QWERPHPermissionRequestJüri Valdmann2018-03-082-5/+5
| | | | | | | | | Scheme refers to a part of a URL. Protocol refers to a formal standard for communication over a network. Therefore scheme is more accurate here, since registerProtocolHandler only defines simple aliases. Change-Id: I71a1511aa92e41c3e3aca4c0403f54af6d91c563 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Move quota and registerProtocolHandler permission classes to coreJüri Valdmann2018-03-085-0/+376
| | | | | | | | | | | | | | | | | | | | | | | - 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>
* Doc: Add code snippet to QWebEngineCookieStore::setCookieFilter() docsLeena Miettinen2018-03-081-1/+12
| | | | | | Task-number: QTBUG-66723 Change-Id: Ic59f2bea41d6f5a4b0a1ca2b27ed7cce79b4a6ce Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Doc: Fix docs for QWebEngineCookieStore::setCookieFilter()Leena Miettinen2018-03-052-5/+0
| | | | | | | | | By removing the Q_QDOC define and the \fn command. Required for the Clang doc parser to work. Task-number: QTBUG-66398 Change-Id: I7319e3966382a8f794b2c795f80b88b8129e5b3b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Adaptations for Chromium 63Allan Sandfeld Jensen2018-01-251-1/+1
| | | | | Change-Id: I551c7091bbc0463bed94180313eb2bfe92f0ad84 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Add initiator to QWebEngineUrlRequestJobAllan Sandfeld Jensen2018-01-222-0/+12
| | | | | | | Add a property that can be used to tell what is making the URL request. Change-Id: Ic7224382165e93d3c043c30e9a7cc5be9f29d9db Reviewed-by: Michal Klocek <michal.klocek@qt.io>