summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/api/qwebenginepage.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move QWebEnginePage to coreMichal Klocek2020-11-241-2454/+0
| | | | | | | | | [ChangeLog] QWebEnginePage is in QtWebEngineCore Task-number: QTBUG-74585 Change-Id: Id326c89c868e9e7d53488bbd12cb321e1a0b79b7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Move PrinterWorker to coreMichal Klocek2020-11-241-1/+1
| | | | | | Task-number: QTBUG-74585 Change-Id: I1968d5104d7d0d86d8f33879ed8c06f2a4846509 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Move QWebEngineHistory to coreMichal Klocek2020-11-241-0/+17
| | | | | | | | | | | Keep debug stream operators in page for now, since QWebEngineHsitory is accessible from page only. [ChangeLog] QWebEngineHistory is in QtWebEngineCore Task-number: QTBUG-74585 Change-Id: I5dfc13a0d59ac87f18fe4905ebcfd4a9ec5ad3a1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Drop dependency on QApplication in pageMichal Klocek2020-11-241-4/+4
| | | | | | | Use QGuiApplication instead. Change-Id: I2e1df98e3d12a3a40f0e5b4f026ecc8418aec271 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Drop dependency on QWebEngineView in pageMichal Klocek2020-11-241-31/+63
| | | | | | | Introduce temporarily PageView interface and DummyDelegate. Change-Id: I3a3d57435c98b31a15fb6d777045e141d007486f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Move default notification presenter setter to viewMichal Klocek2020-11-241-3/+0
| | | | | | | | | Default notification presenter depends on qsystemtryicon, so it depends on widgets, move setter when page is set on view. Change-Id: I379b083fe66a4b44e4b92e01a7e5270837fd645c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Move styled icons from page to viewMichal Klocek2020-11-231-10/+0
| | | | | | | | | Styles are bound to widgets, add styled action's icon on QWebEngineView::pageAction(). Change-Id: Ica7b1688c34c51e746a3b4707a6181c0d45c882a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Swap widgetCahgned with adapterClientChangedMichal Klocek2020-11-231-8/+0
| | | | | | | | This drops dependency on view delegate implementations in web contents adapter client. Change-Id: I73a0dda0a790b7afe3fa774b53db9aa263d48ef9 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Move page's view and widget bindings to viewMichal Klocek2020-11-201-87/+4
| | | | | Change-Id: Ia60a1b864bb173bfd12a94ac4791477a88ea0842 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove qwebengineview setter from qwebenginepageMichal Klocek2020-11-201-18/+6
| | | | | Change-Id: Ifaac7287d24e38e04e217cae65f6e5294e8bdd9e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Move dialogs from view to pageMichal Klocek2020-11-201-117/+18
| | | | | Change-Id: Ib0f0ccca0d94c6c8f19d7d359bbf79110ba04f3e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Drop dependency on page in profileMichal Klocek2020-11-181-0/+6
| | | | | Change-Id: Idbec1657522272c895dc1822e83e0d9592c33343 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Drop dependency on default notification presenter in profileMichal Klocek2020-11-181-1/+3
| | | | | | | [ChangeLog] Set default notification presenter on all profiles. Change-Id: Iec96f97fdaddfefd5bbc0cccc54e6918d8e7ea7e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Small refactor of startDraggingMichal Klocek2020-11-131-13/+3
| | | | | | | This is required to decouple 'view' logic from page. Change-Id: I84ef8cf729ef87d9339cae3f1bb1f0c709035ccf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Move QWebEngineFullScreenRequest to coreKirill Burtsev2020-09-151-2/+2
| | | | | | Task-number: QTBUG-74585 Change-Id: I953f46d01c1e4a82ab0d75b5f955e4f346f1c941 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Reuse qwebenginesettings from core in qmlMichal Klocek2020-09-111-2/+2
| | | | | | | | | | Drop duplicated enums. Use qwebenginesettings as private for qquickwebenginesettings. This can most likely be more optimized when profile is moved to core. Change-Id: I04bdc6c5a35556bf6d38a273cefeeee9d2a0a310 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove QT_NO_SSL checksMichal Klocek2020-08-281-6/+0
| | | | | | | They are not longer needed. Change-Id: I15967d3b4ffcb5c64ec64aedcf55069ccb7697b1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Improve QWebEngineCertificateError apiMichal Klocek2020-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | * remove const ref from QWebEngineCertificateError Q_GADGET is a value type, QWebEngineCertificateError is pass as const reference from api. This is not so useful since, in qml this will be anyway copied and for c++ this is not useful since reject, ignore, defer methods are all const. Therefore simply pass it by value. * make consistent naming defer(), acceptCertificate(), rejectCertificate() * remove properties 'differed', 'answered' which are use internally, user knows if he calls functions. * error.errorDescription -> error.description() * error.error() -> error.type() [ChangeLog] In QWebEngineCertificateError use acceptCertificate() instead of ignoreCertificiateError() Change-Id: I9ffa500a0a455d98445b066252dd283872740731 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Rename QWebEngineDownloadItem -> QWebEngineDownloadRequestMichal Klocek2020-08-181-2/+2
| | | | | | | | | | This fits better with other QWebEngine*Requests. [ChangeLog] QWebEngineDownloadItem is now QWebEngineDownloadRequest, also in qml. Change-Id: I506e9fac746b4f23ac0936c2fbe1c7472f4fda36 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Simplify WebEngineCertificateErrorMichal Klocek2020-08-141-8/+1
| | | | | | | | Removes certificateErrorControllerPrivate, moves error handling logic to core. Change-Id: I050f73f1e37eb9ae39ad471fe1673d2b6140cf89 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Move QWebEngineCertificateError to core and use it in QMLJüri Valdmann2020-08-141-1/+2
| | | | | | | | Update qml certificate error test. Task-number: QTBUG-74585 Change-Id: I9383052bd1e37160d03e3d66e8f2e4a749023736 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Unify certificate error handlingMichal Klocek2020-08-141-10/+5
| | | | | | | | | | | | Before we move the certificate error to core, unify error handling between qml and widgets. [ChangeLog] WebPage::certificateError does not return bool it is enough to call defer, ignoreCertificateError() or rejectCertificate(). Change-Id: I14be40f1ab6b4cbded550260d66152f51cf47de2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix api unfilteredLinkUrl -> linkUrlMichal Klocek2020-08-121-3/+3
| | | | | | | | | | | Before previous change unfilteredLink(private) was returned as linkUrl(public), however linkUrl(private) was also used, therefore when merging context menu data classes functions were refactored to unfilteredLink and filteredLink to prevent braking the logic, now fix the public api as it was before. Change-Id: I84e0444b32aa344ed0401b58b5a8144a6fb58441 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge all webenginecontextmenudata wrappers into one classMichal Klocek2020-08-121-64/+86
| | | | | | | | | | | | | | | | | | | | | | Introduce new class qwebenginecontextmenurequest in core which merges: * qquickwebenginecontextmenurequest * qwebenginecontextmenudata * implictly shared webenginecontextdata Unfortunately new class has to be QObject, since we want to reuse it qml. Q_GADGET can be used only as a value type, however we need to know if request is accepted or not in qml, therefore it must be passed as pointer. Since we use QObject now, class is no longer implicitly shared, however we only allocate request once and reuse the object for every new request (it is still copied in qml just to keep it aligned with other request handlers) [ChangleLog] QWebEngineContextMenuRequest is replacement for QWebEngineContextMenuData Change-Id: Ib387ec2065361a4bacc20675ca7352ab75a0e436 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Move QMenu handling from page to viewMichal Klocek2020-08-121-234/+6
| | | | | | | | [ChangeLog] createStandardContextMenu is moved from QWebEnginePage to QWebEngineView Change-Id: I08a7a1f7e55ca7396547006523cdec250a3ad117 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-06-271-3/+3
| | | | | | | | 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>
* Delete unused function editorActionForKeyEventJüri Valdmann2020-05-251-21/+0
| | | | | | | Change-Id: I5fe08380e297cdf8138df0b49b3c82e741f54dd1 Pick-to: 5.15 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 3472641433d0adab3caea008f047aac9637828c4)
* Add support for clearing the feature requestAllan Sandfeld Jensen2020-05-201-7/+23
| | | | | | Task-number: QTBUG-83476 Change-Id: I63ad9801e3e97f7fdac959600c69c04d0105be1f Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Revive Pointer Lock featureSzabolcs David2020-05-041-2/+2
| | | | | | | | | | | | | | | This change fixes several issues: - Accepting mouse lock permission from modal dialog was not working on Linux. XCB needs some time to activate the parent window after accepting the dialog and we expected to have immediate active focus. - Implementation of RenderWidgetHostViewBase::IsMouseLocked() was missing. - Fixed event.movementX/movementY by disabling ConsolidatedMovementXY feature. Calculate movement properties in WebEngine instead of blink. Task-number: QTBUG-83294 Change-Id: Ic03d05c1026a113cf5e8d22544fc508d9f285876 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.15.0' into 5.15Allan Sandfeld Jensen2020-04-301-20/+9
|\ | | | | | | Change-Id: I916838caf8c981d5dac876631a6e510ed2ffbe0e
| * Restore behavior of OpenURLFromTab if createWindow returns thisJüri Valdmann2020-04-261-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | Instead of using QSharedPointer's reference count to communicate adoption/non-adoption, change adoptNewWindow to return a adapter pointer, with null meaning non-adoption. Then change QWebEnginePage's implementation to reuse already existing adapters if possible, restoring previous behavior of OpenURLFromTab when createWindow returns this. Task-number: QTBUG-80596 Change-Id: I8ee7c31e4294aabd3207c504cba67d6171c66cb0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Fix crash if createWindow returns this for AddNewContentsJüri Valdmann2020-04-261-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For a QWebEnginePage subclass where createWindow returns the this-pointer, we get a crash in WebContentsDelegateQt::AddNewContents because AddNewContents expects the adapter to be adopted already, but QWebEnginePage delays adoption. Revert 3855015600 by getting rid of the delayed adoption code path. It's not needed anymore with the delayed initialization of the WebContentsAdapter. Revert 8a4091c210 by forcing adoption of the adapter even when it doesn't have contents. This no longer results in a crash since OpenURLFromTab ensures that the adapter is initialized before use. However, it does result in a behavior change since return-this now consistently overrides the adapter, so, e.g. navigation history is now always cleared whereas previously it was only cleared by the AddNewContents code path. Fixed with new approach in next patch. Fixes: QTBUG-80596 Change-Id: I4d2230c1bffcf2d77fa59ded9be51da49a820474 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* | Fix missing QWebEnginePage::audioMutedChanged signalJüri Valdmann2020-04-291-2/+4
|/ | | | | Change-Id: Ie02da939a37575dd2b0a43440978748fd79874e4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Move request interceptor to ui threadMichal Klocek2020-04-201-17/+1
| | | | | | | | | | | | | We use now network service avoid io-ui-io-ui hops, pipe proxying url loader factory directly to ui thread. This solves thread safty issues. Add deprecated request interceptor test cases. Task-number: QTBUG-83082 Task-number: QTBUG-82999 Change-Id: I38778cf1a70789c5e92e04c93d1c93e2cc4c765a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Join some features request and response functionsAllan Sandfeld Jensen2020-04-151-12/+20
| | | | | | | Will make it easier to expands with more features in the future Change-Id: Ic7c1aca23a543c95a4873471c918f74606be2053 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Allan Sandfeld Jensen2020-04-101-3/+14
|\ | | | | | | Change-Id: I75f7bbf5e5a4d4ed3bf7bfbfb76162de8a89e6fa
| * Avoid HTML encodings in default JS QMessageBox'es5.14Allan Sandfeld Jensen2020-04-081-3/+14
| | | | | | | | | | | | | | | | | | Escape any HTML encodings, as we have no convenient way to set formating to Qt::PlainText. Fixes: QTBUG-83338 Change-Id: I4d8cb05fe643eb018d3e40119c629e7304fe0813 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Allan Sandfeld Jensen2020-02-271-4/+3
|\| | | | | | | | | | | | | | | Conflicts: src/core/renderer_host/web_channel_ipc_transport_host.cpp tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp Change-Id: I47f2b893bc9f27cd9df641f76badc9e53b482ad4
| * Fix docs for page url request interceptorsMichal Klocek2020-02-211-4/+3
| | | | | | | | | | | | | | Profile interceptors run also on ui thread. Change-Id: Iacfce46549e7ffd821033308077ba5f4fa410575 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add getter/signal to get the render process PIDFlorian Bruhin2020-02-011-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | This can useful for e.g. implementing something like the "Task manager" in Chromium or otherwise interacting with the render process (e.g. to kill it for some reason while debugging). [ChangeLog] Add a renderProcessPid() getter to (Q)WebEnginePage which allows getting the process ID of the underlying render process. Change-Id: Id5d59be9b6bd46ffc3a6aa480cb5ff7bd3b8aa31 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix deprecation warningsKirill Burtsev2020-01-191-2/+2
|/ | | | | | | | | | | Suggested changes: * endl -> Qt::endl * {} for default QFlags * QString -> QStringLiteral for QStringList::join * QNetworkReply::error -> networkError Change-Id: I03919ab0675a9beb64bd176e6c681a338b08b51e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Rework url changed logicMichal Klocek2020-01-141-7/+11
| | | | | | | | | | | | | | | | | | | | | | Due security changes to prevent url spoofing, our implementation is getting extra invalidate url requests. Unfortunately, this breaks our url handling, which now gets lots of new back and fort url changed signals and make several unit test failures. After tedious investigation of Chromium omnibox handing and trying out different approaches, it seems that only sensible solution is to follow Chromium logic and make NavigationStateChanged to update 'ui' in asynchronous matter. This change tries not break any tests and simplify url handling. The only side effect of this change is that WebEnginePage::setContent will get extra 'url' signal of initial 'urlData' and later 'baseUrl' change is emitted. Fix one of qml tests which did not expect to have url on LoadStartedStatus. Task-number: QTBUG-63388 Task-number: QTBUG-48995 Change-Id: Id347f4325c036e16bfae7bf2f694905e0f21f8d7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix regression in alt attribute of copied image urlsAllan Sandfeld Jensen2019-11-301-7/+19
| | | | | | | | The linkText hasn't had the alt attribute for a long time, so instead add direct support for contextual title and alt text. Change-Id: I88e1c43374d855da7fb0d1ca42c0eb474012f0f2 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Support accept attribute of file inputSzabolcs David2019-11-291-5/+3
| | | | | | | | | Set name filters of QFileDialog and QML FileDialog to avoid presenting all file types. Task-number: QTBUG-76564 Change-Id: I321214a30bc7e875ad132b015c63282f4eb482bf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Allan Sandfeld Jensen2019-10-221-6/+3
| | | | | | | | | | | Conflicts: examples/webengine/minimal/main.cpp src/3rdparty src/core/net/url_request_custom_job.cpp tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp Change-Id: I33994024a4be5ed787800c5718a0a443b970c36d Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Move lifecycle docs to features pageJüri Valdmann2019-10-101-3/+3
| | | | | | | Also fix incorrect \since versions in QML API docs. Change-Id: I87b5899d4a55832dca2cd251aeb681e4bb2de2a2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Allan Sandfeld Jensen2019-09-241-6/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/glibc/glibc.cpp src/3rdparty src/core/configure.json src/core/profile_io_data_qt.cpp src/webengine/configure.json src/webenginewidgets/api/qwebenginepage.cpp tests/auto/widgets/qwebenginepage/BLACKLIST Change-Id: I3e1781048c3cb09bfbf7427dfc5dd1fec11a2b97
| * Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-09-121-4/+2
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty Change-Id: Ib1202bcce587f9614013105c6a836344c1727cb7
| | * Reject certificate error for non-overridable errorsKirill Burtsev2019-08-291-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On certificate validation error page load is just halted meaning that no progress or load result are reported and no default error page for certificate errors is shown. Even though documentation states that 'By default, an invalid certificate will be automatically rejected' and that aligns with default implementation of certificateError method within Page and non-deferred errors in quick View, page or view silently stays in an intermediate state for non-overridable errors. Fix this inconsistent behavior by automatically rejecting certificate for every invalid case (non-overridable error, not deferred or not implemented overridable method). Change-Id: Id1cee2ee5cc45bdcb5f262a6c99c84274e6ca374 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
| | * Fix reporting overridable flag for QML WebEngineCertificateError typeKirill Burtsev2019-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Also remove confusion inside CertificateErrorController constructor and overridable method by matching documentation for AllowCertificateError method of ContentBrowserClient api. Change-Id: I7e10ef71a4429dcf5acc4b714a8a45f67a2ec684 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>