summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_context.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix default profile for single-process modeMichal Klocek2019-04-171-8/+15
| | | | | | | | | | | | In single process mode there is only one profile, and this profile is used for browser context. Fix the case where there is no 'default' profile created but only one user profile. In this case make the user profile 'default' so it is deleted in right moment in single process mode. Change-Id: I8ba3c2da2d93d53fa569c7971410a4a74753377e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Adaptations for Chromium 73Allan Sandfeld Jensen2019-03-231-4/+9
| | | | | Change-Id: I565d1e327852110a5abebed3388d7cd6986bef06 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Adaptations for Chromium 72Allan Sandfeld Jensen2019-03-231-3/+3
| | | | | Change-Id: Ic355257066c7c1433862cb41e6f2bfa831147e0d Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Fix detection of opengl supportMichal Klocek2019-02-271-20/+17
| | | | | | | | | | | | Clean up tryGL check and add missing check for platform capability so webengine tests can run on arm in ci. Note this change only fixes webengine with offscreen plugin wihtout xlib support, which is the case for coin ci. Task-number: QTBUG-63346 Change-Id: I66fe6457f98815dad0dcd02df4500dc0ff752958 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Try using authentication from QNetworkProxyMichal Klocek2019-02-191-0/+13
| | | | | | | | | Use credentials for QNetworkProxy if set. Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io> Task-number: QTBUG-58121 Change-Id: I9c7328af90f3c60144c5ecf385529f663f0e46b2 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Allan Sandfeld Jensen2019-02-151-5/+10
|\ | | | | | | Change-Id: I0822fb8a10945a252cfd1aacaf0b6d9902cc8831
| * Better error reporting for QWebEngineUrlSchemeJüri Valdmann2019-02-111-5/+10
| | | | | | | | | | | | | | | | Add warnings for late registration and invalid configuration. Fixes: QTBUG-72842 Change-Id: I2c103c3b3581112cc885c3a1b4f42c011c3510ab Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Merge remote-tracking branch 'origin/dev' into 5.13Michael Brüning2019-02-051-0/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/core/content_browser_client_qt.cpp src/core/content_browser_client_qt.h Change-Id: I3da791a82dab56fd7535ba1e4c0ab1d9ca74f547
| * | Add extension system and PDF viewer to Qt WebEngineMichael Brüning2019-02-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the Chromium extensiuon system to Qt WebEngine. Currently, it only exposes internal APIs to the internal PDF viewer extension. To load a PDF, simply navigate to it. This feature can be configured via the webengine-extensions flag and is turned on by default. Needs patch in Chromium 71-based to build. Adaptations to 71-based from 69-based include: * Flag out update installation, add crx file dependency * Move PostTask over to 71-based implementation * Move extensions API providers to 71-based implementaion * Don't use custom guest view and mime handler view delegates * Adapt the URLRequestResourceBundleJob to match new interface * Move extension system initialization to end of profile constructor Change-Id: I4fa5149057291bb5847f048534c11820cd7ff58c Fixes: QTBUG-50556 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Add proxy switches handlingMichal Klocek2019-02-041-20/+36
|/ / | | | | | | | | | | | | | | | | | | | | This change adds switches for proxy: https://www.chromium.org/developers/design-documents/network-settings [ChangeLog] Uses proxy switches for initial proxy configuration Fixes: QTBUG-71229 Change-Id: I1bc02f20c20d737234c650a18f0e0f7c1c63a464 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Adaptations for Chromium 71Allan Sandfeld Jensen2019-01-281-10/+24
| | | | | | | | | | | | | | Change-Id: Ib650113b05dfd4771240804f94e33c07aa317bf2 Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Fix Sandbox V2 to work on macOSAlexandru Croitor2019-01-281-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The renderer process crashed on macOS because sandboxing was not enabled. The patch does two things to fix that: 1) Initializes the Seatbelt Sandbox in processMain(). 2) Exposes a content::getQtPrefix() function that will be used by SetupCommonSandboxParameters in sandbox_parameters_mac.mm to pass the Qt Prefix path to the sandbox rules in chromium/services/service_manager/sandbox/mac/common_v2.sb The path will be used to allow file read access (required to read ICU data files and other resource files). To check which resources are denied access, start any QtWebEngine app with the "--enable-sandbox-logging" flag, and use Console.app to see the denied requests. Change-Id: I61c0a2d20d5e96c7cc9562fd203fd606dd25d36c Fixes: QTBUG-73089 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Adaptations for Chromium 70Allan Sandfeld Jensen2019-01-281-2/+4
| | | | | | | | | | | | | | Change-Id: I8bb77784dbc8a0b9debd96a4c49421bd34e6a0df Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devAllan Sandfeld Jensen2019-01-241-9/+25
|\| | | | | | | Change-Id: I040db21f90766827c84c48dc0ed2d2d623dc011a
| * Fix crash on exit with single processMichal Klocek2019-01-231-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | Shutting down the browser runner in single process mode requires the browser context to be present. Moreover single mode does not support multi browser context. For single mode move profile destruction to PostMainMessageLoopRun. Fixes: QTBUG-45722 Change-Id: I15b5aa17061b4dd7898d0ff9427fada44d2eff74 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devMichael Brüning2019-01-181-3/+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
| * Rename leftovers of BrowserContext to ProfileAdapterMichal Klocek2019-01-071-3/+3
| | | | | | | | | | Change-Id: Ia86459503be86eb9b0d97affe94b7ce82d5e29f1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Make AccessiblityActivationObserver separate of RWHVAllan Sandfeld Jensen2019-01-091-2/+9
| | | | | | | | | | | | | | | | It is a global control anyway, and with future Chromium headers, there are conflicts with qaccessibility.h. Change-Id: Ife43340684b8b9498b1f4cd3f6fbe450d88794ec Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Fix recursion in WebEngineContext constructorMichal Klocek2018-12-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Gpu process startup needs sync point manager and it can ask for current web engine context, while is being created. Moreover this call will take place from GPU thread, so it leads to race condition. Done-With: Kirill Burtsev<kirill.burtsev@qt.io> Fixes: QTBUG-72113 Change-Id: I43bf37da0cf28ccb5c5cee0d82ed541053016e2e Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Implement ContentGpuClient for WebEngineAllan Sandfeld Jensen2018-11-241-0/+6
| | | | | | | | | | | | | | | | | | This is the way we are supposed to share a sync point manager with the content layer. Change-Id: I595caa863f8b9c8b4f4bc17df76211416a027a12 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Merge "Merge branch '5.12' into dev" into refs/staging/devAllan Sandfeld Jensen2018-11-161-0/+2
|\ \
| * | Merge branch '5.12' into devAllan Sandfeld Jensen2018-11-161-0/+2
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/core/compositor/compositor.cpp src/core/compositor/compositor.h Change-Id: I8a4d73d728d93d95e499849f8778cc88dda2105e
| | * Implement CopyFromSurfaceAllan Sandfeld Jensen2018-11-081-0/+2
| | | | | | | | | | | | | | | | | | | | | Means we can get screenshots in devtools. Change-Id: I7b50d6ac5a54d236573bcf5f58ae872bd50dccad Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | | Move thread setup out of the web_engine_context.cppAllan Sandfeld Jensen2018-11-161-68/+4
|/ / | | | | | | | | | | | | | | This helps avoid conflicts between Qt and Chromium OpenGL headers. Change-Id: Ib77d0d985397ef2b9792b26df4bec69bbfbe4611 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Fix GPU compositing (and WebGL) to work with ANGLE on WindowsAlexandru Croitor2018-11-121-9/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given the changes that implement GPU compositing on the UI thread (and thus only a single thread accesses all OpenGL contexts) it is now possible to enable GPU compositing to work together with ANGLE, which did not work before due to ANGLE being thread-unsafe. This requires a couple of things: - Enable GPU compositing via kInProcessGPU switch when using ANGLE - A small fix in GLContextHelper::getEGLDisplay() to return a correct "egldisplay "handle - Improved logic when to pass the kDisableES3GLContext switch depending on which OpenGL ES version is requested (2 or 3) - Adjustments in RenderWidgetHostViewQtDelegateWidget() to set up a correct surface format which matches the shared context OpenGL ES major version - A recent enough version of ANGLE (due to bugs calling glTexImage2D with an unsupported internal texture format for GL_DEPTH_COMPONENT, from inside gpu::gles2::IsWebGLDrawBuffersSupported) By default if no special QSurfaceFormat is set as the default surface format, using ANGLE will create an OpenGL ES 2 context, and will thus provide support only for WebGL 1. To enable OpenGL ES 3 / WebGL 2 support, make sure to set a default QSurfaceFormat with major version set to 3, and enable ANGLE either via QT_OPENGL=angle or QGuiApplication::setAttribute(Qt::AA_UseOpenGLES). The default surface format must be set before the Q*App instance is created. Manual test "webgl" added. Task-number: QTBUG-53908 Task-number: QTBUG-55604 Task-number: QTBUG-69236 Change-Id: Ic31dfdff1ca22d4689db5cf64126d7d12790aa76 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Merge remote-tracking branch 'origin/5.12' into devAllan Sandfeld Jensen2018-11-051-10/+2
|\| | | | | | | | | | | | | | | | | 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
| * Allow --enable-webgl-software-rendering outside WindowsAllan Sandfeld Jensen2018-11-011-8/+2
| | | | | | | | | | | | | | | | While less useful, it still makes sense occasionally on other platform, if software OpenGL is used. At least for testing. Change-Id: I1371674aec58b4e9e4f848ab353d04a896137973 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
| * Remove some outdated Qt version checksAllan Sandfeld Jensen2018-10-231-2/+0
| | | | | | | | | | | | | | | | We can't not build with older than Qt 5.9 anyway due to QSG and qmake changes. Change-Id: Iff0247e70d9ffc1e045e2c571f0089d68df9a589 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Support running GPU service on UI threadJüri Valdmann2018-10-231-0/+68
|/ | | | | | | | Create content::GpuProcess on UI thread if threaded OpenGL is not supported. Fixes: QTBUG-71126 Change-Id: I7965dec66c8b8e9c92d292731d21ee0df5056a2e Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Clean up header includes in corev5.12.0-beta3Peter Varga2018-10-201-1/+0
| | | | | Change-Id: I3ffc92eacf30265ecb80061870d213e521e4f838 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix leak which arises on querying GLOzone instance in SurfaceFactoryQtKirill Burtsev2018-10-081-1/+0
| | | | | | | | | Ownership of GLOzone instance assumed to be hold by factory, no new instance should be created on each GetGLOzone call. Task-number: QTBUG-69088 Change-Id: I7eb8575f1f35bd30292a8b4fc5ab1334ccb8e2bb Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Remove old switches no longer used by AndroidAllan Sandfeld Jensen2018-09-281-3/+1
| | | | | Change-Id: Id2a50e7b133e9b32150f3fd248e9822e1668fc13 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Cleaner shutdownAllan Sandfeld Jensen2018-09-271-0/+9
| | | | | | | | | | The print-job manager was trying to recreate a notification service, so destroy it earlier, and at the same time kill the content runner before existing WebEngineContext::destroy() to catch any other late recreations of singletons. Change-Id: Ifaa333386248c3dbc6d4f828c727a0a17d5f5c90 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* General adaptations for Chromium 69Allan Sandfeld Jensen2018-09-221-3/+11
| | | | | Change-Id: Ifeaf0ee13213dc5a24d2f2b4655cf7f405cddef7 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Adapt to forced scroll-wheel latchingAllan Sandfeld Jensen2018-09-221-2/+0
| | | | | | | | Handle that Chromium now requires all wheel events to be phases despite them not being phased on the majority of platforms. Change-Id: Iabd5630652c0d8fd67563db3d63ef1f2f528c35c Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Adaptations for Chromium 68Allan Sandfeld Jensen2018-09-221-2/+2
| | | | | | Together-with: Tamas Zakor<ztamas@inf.u-szeged.hu> Change-Id: I805246b6f01cb151fff48588744408c676d87c14 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Allan Sandfeld Jensen2018-09-171-1/+1
|\ | | | | | | | | | | | | | | Conflicts: src/3rdparty src/core/core_common.pri Change-Id: I36dc3a70aa653e6c8a610c787b615034180a6127
| * Fix no-opengl builds on windowsv5.11.2Allan Sandfeld Jensen2018-09-041-1/+1
| | | | | | | | | | Change-Id: I134876aa68bd42356c0b897a5d7d5881f27724a4 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Improve QWebEngineUrlScheme APIJüri Valdmann2018-09-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Michael Brüning2018-08-211-1/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 --enable-webgl-software-rendering with drivers that don't support OpenGLKai Koehne2018-08-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | --enable-webgl-software-rendering is supposed to be used together with mesa llvmpipe / opengl32sw.dll. However, Chromium did still use the built-in GPU blacklist to disable features based on the hardware GPU driver. Avoid this by always passing --ignore-gpu-blacklist for this mode. Task-number: QTBUG-69236 Change-Id: I430d101f6eac64478585de54f705e76859c80597 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Fix running webengine without default profileMichal Klocek2018-08-031-1/+6
| | | | | | | | | | | | | | | | | | 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-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Move last surface and context classes to ozoneMichal Klocek2018-08-021-1/+1
| | | | | | | | | | | | | | | | Moves last two remaining classes to ozone. Now all the context and surface handling is in ozone subdir. Change-Id: I87d4570f866b905e8f79a73d70f04bd8b21f6e1b Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Use ozone for x11Michal Klocek2018-08-021-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to use ozone also for x11/glx. This way we have a more elegant approach to hook in our gl surface classes and we use ozone for all linux qpa backends. Moreover, we have now also more fine grain control to reimplement gl surface handling logic. This also aims to fix currently broken wayland backend, but instead of patching the broken x11 calls, we simply reuse ozone which does not use x11 for ozone egl. Add webengine-x11 check to handle ozone glx plugin compilation. For ozone egl backend reimplement missing functions. Task-number: QTBUG-65682 Task-number: QTBUG-51631 Change-Id: I8b45c6f4d09a1c703efb12b6452d78ab385371ab Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Rename BrowserContextAdapter to ProfileAdapterMichal Klocek2018-07-091-18/+18
| | | | | | | | | | | | | | | | | | 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>
* | Migrate from BUILDFLAG to QT_CONFIGMichal Klocek2018-07-021-8/+8
| | | | | | | | | | | | | | | | | | | | | | During configuration we mapped qt webengine fetures to chromium ones and passed them to gn. We used BUILDFLAG to optionally compile code in core. Use QT_CONFIG directly for qt files and add config sanity checks to make sure requested features are present. Change-Id: I930df114ac9aec8e73139ea9135925fc3ad8e39c Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Adaptations for Chromium 67Allan Sandfeld Jensen2018-06-261-3/+3
| | | | | | | | | | Change-Id: I13cedba56012f74651a044d6fa8f0957487bf3eb Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Adaptations for Chromium 66Allan Sandfeld Jensen2018-06-261-3/+0
| | | | | | | | | | Change-Id: Iee88721a50036d4ef85a23dd1708d4fb84218708 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Fix bogus check for GL_ARB_ES2_compatibilityMichal Klocek2018-06-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | We check for GL_ARB_ES2_compatibility on wayland when shared context is created for opengl and we want to check if es2 compatibility is possible. However check should be done on OpenGL renderableType surface and not the other way around. This was currently working due to bug in qtwayland, which returned here OpenGL context instead of requested OpenGLES. Change-Id: I47ab02cb9128670bfb02096d5911c4dcd24284d2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>