summaryrefslogtreecommitdiffstats
path: root/src/core/renderer
Commit message (Collapse)AuthorAgeFilesLines
* Fix printing PDF filesSzabolcs David2022-01-191-5/+20
| | | | | | | | | | | | Delegate printing task down to the guest WebContents if any is present. Also update PrintWebViewHelperDelegateQt to find the plugin element properly for printing. Task-number: QTBUG-98941 Change-Id: I81004a2275e0870a17565af527b1450472afb24b Reviewed-by: Michael Brüning <michael.bruning@qt.io> (cherry picked from commit 455efe7ef204c6cd8de72b9b1f922f1681f58589) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Cleanup code and clang build warningsKirill Burtsev2022-01-042-3/+0
| | | | | | | | | | Fix build noise as reported by clang for issues like api deprecation, unused variables, sign/unsigned mismatch and other non critical issues. Change-Id: I4fba25406eea8170e3283c42e908ae86bd512e3a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 02d58a067fb5f0db32c254e783170f9f283aeb9d) Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix race condition on layout (take2)Michal Klocek2021-12-092-26/+10
| | | | | | | | | | | | | | | | | | | | | Even if layout is 'meaningful' it can still require update before toPlainTextSync call can proceed. Simply wait for frame being loaded in stead of tracking layout update. Depending on DidLoadFinish will brake default toHtml call for empty not loaded page, therefore return expected value if there is no load. This fixes crashes/asserts on certificateError (stacktrace in bug report). Remove blacklist on certificateError as bad certificate is back on line and toPlainTextSync works without issues. Fixes: QTBUG-97414 Change-Id: Ib702bbe813f6061eef446e2d87d7e9e455d715c5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 1cf45eed088bd1ef1c89a9812c6f69d16bce56f7)
* Fix race condition on layoutMichal Klocek2021-12-012-5/+35
| | | | | | | | | | | | | Calling some methods without 'meaningful' layout when render frame is visible tiggers at the best some DCHECKS. Therefore if frame is visible wait for 'meaningful' layout. This fixes some flaky tests on toPlainTextSync call. Change-Id: I746a1c436798b440c59f9b8b4a1d297e3fa7e56d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 1b8aa58a618eee23c4fd23b4fb51667fd8a3f2b8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Get rid of TODOs in WebChannel GIN codeAllan Sandfeld Jensen2021-10-141-14/+9
| | | | | | | | | | The nodiscard values can be Check()ed. Change-Id: I9ee38ca3404c4013c6cda6d3d0833529c2b59105 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io> (cherry picked from commit 4443d0e27c4b989b4f8394125abc7d3170cfaf8f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix WebChannel when JavaScript is disabledSzabolcs David2021-09-272-9/+9
| | | | | | | | | | | | | | WebChannel was not working in ApplicationWorld with JavaScript disabled in MainWorld, because WebChannelIPCTransport::DidClearWindowObject() is called only when the window object was cleared in the main world. Moving the WebChannelTransport installation logic to DidCreateScriptContext() works in other worlds, so fixes the problem. Task-number: QTBUG-88875 Change-Id: Ia75613b66a1e049f617f0664684b153b6875e9de Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 70abc0b2eebc777309d372203df5ca1e785402d8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove IPC message loggingPeter Varga2021-07-233-4/+0
| | | | | | | | | | Doesn't seem to be useful, chromium community doesn't maintain it anymore. Change-Id: I24071d6319c258f2d88f3bde5c38dd9fddeec9a8 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit b6c57f4eeeca503e643cf8b3ddc1ec70bfe75886) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Adaptations for 90-basedAllan Sandfeld Jensen2021-07-1310-38/+36
| | | | | | Change-Id: I8402b044d8e12d75e144a00984b856f3de10bffd Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> (cherry picked from commit 1d988d971bc4270ba3d148e8e2c143bf8f625b6e)
* Remove QRC->file special caseAllan Sandfeld Jensen2021-07-021-9/+0
| | | | | | | | | It was marked as to be removed for Qt6 Change-Id: I059c450aa6e5cad6d48ecdd2667abff21217d7e0 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> (cherry picked from commit 01f45d0b536ac2dad7493c826907ded7a76f59d6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-05-121-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webenginewidgets/printme/printhandler.cpp src/3rdparty src/core/api/qwebenginepage_p.h src/core/content_browser_client_qt.h src/core/web_contents_adapter_client.h src/core/web_contents_delegate_qt.cpp src/core/web_contents_delegate_qt.h src/webenginequick/api/qquickwebengineview_p_p.h tests/auto/quick/qmltests/data/tst_download.qml tests/auto/quick/qmltests/data/tst_viewSoure.qml tests/auto/widgets/loadsignals/tst_loadsignals.cpp tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp Change-Id: I9c1819ec15e13d4f8e244defe860e26274b5d4be
| * Fix application locales againSzabolcs David2021-04-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Different countries (with the same language) can have different number formatting and navigator.language should report not only the language, but also the country. Locale normalization often falls back by cutting the country off, because we have common .pak files for countries with the same language. This patch: - Uses the locale resolvation only for concatenating .pak file paths and reports the full locale everywhere else. - Properly sets default ICU locale for JS number formats and prevents l10n_util::GetApplicationLocale() to set it sneakily to some resolved one. - Fixes the crashing --lang command line argument and always prefers its value over QLocale. Task-number: QTBUG-91225 Change-Id: I1c09798abdb523b80f0b7a3d69fa8d7a08c7c09a Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* | Make script execution order deterministicAllan Sandfeld Jensen2021-05-062-5/+6
| | | | | | | | | | | | | | Task-number: QTBUG-77765 Change-Id: I8680a46c62e6a915cbf10c3ae48573cb95f612a5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Adaptations for Chromium 88Allan Sandfeld Jensen2021-04-155-586/+5
| | | | | | | | | | Change-Id: Ie66e95dbb9fbcafe961bb98d5c277f8c32d66b96 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-04-134-155/+1
|\| | | | | | | Change-Id: Ia01415e5a44b1df9ed8b3966ff3b39a414b1563c
| * Fix embedded PDFs when plugins are disabledSzabolcs David2021-04-084-155/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cover all cases from https://pdfobject.com/static - Plugin placeholder is generally broken: displays garbage and crashes on interaction. Fix it and show when PDFs are included by <embed> or <object> tags. - Do not start an automatical download when the disabled PDF plugin was requested by an iframe. Show a clickable placeholder and let the end-users start it manually. - Remove unused class PluginPlaceholderQt Task-number: QTBUG-76314 Change-Id: I01a0c93ab23f54e4272f5aeb30578de0dcf18932 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-03-165-26/+64
|\| | | | | | | Change-Id: I0dd7c64669f4b130047a4a3836f62f7ee5b5f8d9
| * Show PDF viewer in a guest viewSzabolcs David2021-03-065-26/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the basic support of guest views, implemented based on Chrome. - Embed PDF as a child frame instead of navigating to its extension WebUI. Keep the original URL (pointing to the file) to extend functionality of PDF viewer with URL parameters. - Make RenderWidgetHostInputEventRouter to work and modify most of the event forwarding logic to use that. This way WebEngine supports pages with multiple RenderWidgetHost and guest views can be interactive with user input. [ChangeLog] PDF files are opened as embedded objects, WebEngine will not navigate the content away from the requested file to present it. PDF viewer can accept URL parameters (e.g. to control zooming or fitting to view). Also, PDF viewer is interactive when displayed in a subframe. Task-number: QTBUG-80463 Task-number: QTBUG-86152 Task-number: QTBUG-90712 Change-Id: Ib1591fbd9a594891cdeace8e9dae0d3cc21a9f8e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-02-172-0/+36
|\| | | | | | | Change-Id: Idee0142b0e33fdf8ca663f1ef1bcd8b932985043
| * Enable webrtc logging and the corresponding WebUIPeter Varga2021-02-092-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The corresponding WebUI is chrome://webrtc-logs It only makes sense with the hangout services extension. It seems to be only useable with meet.google.com. The behavior is same for Chrome. Uploading logs to Google is disabled in the Chromium patch. It is an extension API functionality. The WebUI only lists the previously generated logs. Pulls in the following changes: 1dda5314b02 Enable webrtcLoggingPrivate extension API for hangout extension 7d71aca116d FIXUP: Enable webrtcLoggingPrivate extension API for hangout extension Change-Id: I455fce7c8081e71967e55ab1f889df6ef91ed253 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-01-2511-117/+52
|\| | | | | | | | | | | Including update to 87-based Change-Id: I36b6054e00de97ab055d0bc800cff08d0408fac6
| * Enable hangout services extensionPeter Varga2021-01-203-2/+12
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog] Enable hangout services extension and implement its WebRTC desktop capture extension API dependency. Fixes: QTBUG-85731 Task-number: QTBUG-51185 Task-number: QTBUG-61676 Change-Id: I7a659c2b0039243ac8d8c58685716ffc55265e3b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Adaptations for Chromium 87Allan Sandfeld Jensen2021-01-136-83/+27
| | | | | | | | | | Change-Id: Ic4ffd98e02f986dbaf986405360e727c813e696e Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
| * Adaptations for Chromium 86Allan Sandfeld Jensen2021-01-135-18/+5
| | | | | | | | | | Change-Id: I7e0ebecdbb68cfff0b574c966f3fa80d28680e1c Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
| * Adaptations for Chromium 85Allan Sandfeld Jensen2021-01-133-11/+6
| | | | | | | | | | Change-Id: I33c1af7c431055d95e0fb540246765cce684de15 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
| * Adaptations for Chromium 84Allan Sandfeld Jensen2021-01-132-2/+2
| | | | | | | | | | Change-Id: I359805d0bea84147fca6de2e2c7b17b4dcb17bc7 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Merge branch '5.15' into devAllan Sandfeld Jensen2021-01-1911-232/+257
|\| | | | | | | | | | | Last commits before 87 update. Change-Id: Id156b0199a8fd354c946cfe604ae8541ba554658
| * Migrate render_view_observer_qt to mojoMichal Klocek2020-12-114-55/+62
| | | | | | | | | | | | | | | | | | | | | | | | Since mojo interface no longer works on render view, but on render frame rename the class to be WebEnginePageHost and WebEnginePageRenderFrame Keep SetBackgroundColor render message, since it is required to things work. Change-Id: I4d6b70dd448926f8ac2d75d2b87f3d490a4cfefb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Cache mojo interface bindings for WebChannelIPCTransportMichal Klocek2020-12-112-7/+16
| | | | | | | | | | Change-Id: Ica6b794e16aecc60dc2c39d31750acc6b25410df Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Remove RenderViewObserverHelper from UserResourceControllerMichal Klocek2020-12-113-72/+35
| | | | | | | | | | | | | | | | | | | | | | After site isolation we observe render frames and we do not need render view observer any longer. Remove RenderViewObserverHelper and track user script per render frame. This approach is more intuitive since we run those scripts on frames, subframes and not on render views, which can span over few frames. Change-Id: Ife02d8a4dbecc884cfdc667b1a16dfbdd866367a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Minor. RenderThreadObserverQt is really a RenderConfigurationMichal Klocek2020-12-115-28/+32
| | | | | | | | | | | | | | | | Follow same naming as in UserResourceController, which also implements RenderThreadObserver. Change-Id: I8a8386e6fb9fcc52826da1d0eef6efa97fd475e9 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Minor. Fix namespace for user resource controllerMichal Klocek2020-12-113-5/+9
| | | | | | | | | | Change-Id: If9a6b2ceca41534f28ec1d87093778f16fc31ff0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Fix crashes in user resource controller when single processMichal Klocek2020-12-115-32/+52
| | | | | | | | | | | | | | | | | | Mojo interface when running in single process was not correctly destructed, since we used user resource controller as global static object. Move user resource controller to content render client. Change-Id: I219510c9bc382545174aa5aae99ac8282a2049e6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Migrate user script IPC to mojoMichal Klocek2020-12-113-63/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use mojo instead of old IPC, keep current design and use two interfaces one global and one per frame for now, also use in both cases associated interface with ipc channel otherwise script can be added during the page load, which will radomly brake tests. This change moves UserDataScript to chromium since mojo binding generation did not work correctly. Use StructTraits when serializing the class. Change-Id: I7073fb831c96849e47864382188300db3c9137d9 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-09-222-0/+6
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/core/certificate_error_controller.cpp src/core/compositor/display_gl_output_surface_qsg.cpp src/webengine/doc/src/webengine_certificate_error.qdoc tests/auto/quick/qmltests/data/tst_certificateError.qml Change-Id: I976958a0833030bfd7c3ed762585eb12031306b0
| * Fix PDF viewer pluginSzabolcs David2020-09-172-0/+6
| | | | | | | | | | | | | | | | Add the missing implementation of ContentRendererClient::IsOriginIsolatedPepperPlugin(). Change-Id: Ic4157da6b373450e620ff46faedad213a69adfec Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-09-144-12/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty src/core/certificate_error_controller.cpp src/core/certificate_error_controller.h src/core/compositor/compositor.cpp src/core/compositor/compositor.h src/core/compositor/display_gl_output_surface.cpp src/core/content_browser_client_qt.cpp src/core/core_chromium.pri src/core/delegated_frame_host_client_qt.cpp src/core/ozone/gl_share_context_qt.h src/core/ozone/surface_factory_qt.cpp src/core/permission_manager_qt.cpp src/core/render_widget_host_view_qt.cpp src/core/render_widget_host_view_qt.h src/core/web_engine_context.cpp src/core/web_engine_settings.cpp src/core/web_event_factory.cpp tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp Change-Id: Ice14c3c350b139e800c7c7011b7cef1fc7010669
| * Chromium 81-based adaptationsAllan Sandfeld Jensen2020-09-094-12/+6
| | | | | | | | | | Change-Id: Ie422b327025da084bc8038c7a0aadee2db801f29 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-09-071-3/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/core/compositor/display_gl_output_surface_qsg.cpp src/core/web_engine_context.cpp tests/auto/quick/quick.pro Change-Id: Iaf03434696788c89f5d3b524969513a89cb0a235
| * Disable WebComponentsV0Allan Sandfeld Jensen2020-08-101-3/+1
| | | | | | | | | | | | | | | | It appears we are no longer presented with pages using these, so match Chrome and Chromium 80 defaults. Change-Id: Ie270c2bee9b81f898c7dab9e6d4dad02636c17cc Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Switch from binary JSON to JSON for QWebChannel messagesJüri Valdmann2020-07-232-21/+10
| | | | | | | | | | | | | | | | | | | | | | Qt's binary JSON has been deprecated in favor of CBOR. However, since we have to convert to/from JSON anyway in order to pass messages to/from Chromium, there's not much point to use a binary intermediate format in the first place. So, let's just use JSON. Fixes: QTBUG-85688 Change-Id: I9c3e4608bee38d460eaf87843c339d5037ed9888 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add ; to Q_UNUSEDLars Schmertmann2020-06-271-1/+1
| | | | | | | | | | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: Id948c173695923a1ea83a2098bafc10cfd4dc22b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-04-275-37/+56
|\| | | | | | | | | | | | | | | Conflicts: configure.pri src/pdf/api/qpdfpagerenderer.h Change-Id: I7e68277080e29238bbfe8511539ea75b2db89489
| * Use SetBaseBackgroundColorOverride for setting background colorJüri Valdmann2020-04-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The normal WebViewImpl::SetBaseBackgroundColor expects to be called only during certain lifecycle states, otherwise a DCHECK will be triggered. Whereas the *Override version forces a lifecycle update. Needs 3rdparty change to stop RenderWidgetHostViewBase::SetBaseBackgroundColor from clearing the override color when switching between opaque and transparent colors though. Change-Id: If4c1e22886d7ebc7d87ca880dd9c6a659855a931 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
| * Adaptations for Chromium 80Allan Sandfeld Jensen2020-04-074-36/+55
| | | | | | | | | | Change-Id: Icaf68648cbc2c13a61fc3b208ff1e64ca36c90b6 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-03-1720-266/+601
|\| | | | | | | | | | | | | | | | | | | | | Blacklists tst_Accessibility::focusChild() for now. Conflicts: src/core/api/core_api.pro src/core/net/plugin_response_interceptor_url_loader_throttle.h src/process/process.pro Change-Id: I95821a3851120dc16673f4c760e802952eae5c41
| * Add plugin placeholder when ppapi can't be loadedTamas Zakor2020-03-056-0/+389
| | | | | | | | | | | | Task-number: QTBUG-82012 Change-Id: I66f70f879203e8fba585caa472256dde06984a04 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Adaptations for Chromium 79Allan Sandfeld Jensen2020-02-286-19/+16
| | | | | | | | | | | | | | | | Fixes: QTBUG-80737 Fixes: QTBUG-81556 Fixes: QTBUG-81614 Change-Id: Ie6a69cdbf46d0508bff226f1b8fed28a618e1949 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Adaptations for Chromium 78Allan Sandfeld Jensen2020-02-282-35/+10
| | | | | | | | | | | | | | | | | | | | Including removal of renderer service. [ChangeLog][QWebEngineSetting] XSS Auditing has been removed, and XSSAuditingEnabled no longer has any effect. Change-Id: I0835e2a76551057f3eea30a343e0373b642192f0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Style cleanup in renderer/Allan Sandfeld Jensen2020-01-2116-222/+196
| | | | | | | | | | | | | | Selective application of clang-format. Change-Id: Ied39e0bcf842219b789354bd14ff8f8f18e8fb60 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2019-11-254-7/+4
|\| | | | | | | | | | | | | Conflicts: src/core/api/qtbug-60565.cpp Change-Id: Iaad05aa248fb57a69033013161e10e3acddd48f6