summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix crash with popups over transparent backgrounds6.7Moss Heim2024-09-242-0/+25
| | | | | | | | | | | | | | An earlier color update fix (dcc464b14c) caused color updates to be applied to views without owner delegates, in the case of combo box popups for example. We now guard this pointer dereference. Fixes: QTBUG-128241 Pick-to: 6.7.3 Change-Id: Ib086c7d544b29bf41101ff423160de2310890174 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit 9dae13cca7e06ea16db015aa35e61cc77e16951a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 12c02121d802b1314558afbf111153b55f121bca)
* Workaround for setCursor issue with embedded viewsMartin Negyokru2024-07-302-0/+64
| | | | | | | | | | | | | | | | | | | | | QQuickItem::setCursor maps the cursor position to the window while the Item's position is mapped to the View. If the View is moved inside its container, the offset is ignored on the Item. Ergo View.pos != Item.pos breaking hittesting of setCursor. Fix this by forwarding Item::setCursor calls to the View. It is safe since the Item shares its coordinate system with chromium and works as a proxy to the View. Fixes: QTBUG-111927 Fixes: QTBUG-123889 Fixes: QTBUG-115929 Pick-to: 6.6 Change-Id: Idee5ba043774952b554874ce654279cb5029ef1d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 5043f4ddff206d2ffcb4684fb791ec689c2538f0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 76b5ab01a93c64f8644b2e0bf2c6f0ead939c05e)
* Find text: Start new search when toggling case sensitivityKaloyan Chehlarski2024-07-242-0/+38
| | | | | | | | | | | | | | | Only toggling case sensitivity, without changing the text that's being looked up, would keep the helper in "find next" state, which in turn would keep otherwise invalid matches highlighted on screen. This change ensures that a new text search is initiated in cases like this. Fixes: QTBUG-127318 Change-Id: I95b410b123dc09851f5aaefc8470f0656a88bb0d Reviewed-by: Anu Aliyas <anu.aliyas@qt.io> (cherry picked from commit 7f47a253ba7bce2d76f41079c34bc9468ec142aa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit e23a577e15e72fc57b3972f8311ee43988429cf6)
* Partially stabilize QML favicon testsKaloyan Chehlarski2024-07-232-15/+7
| | | | | | | | | | | | | | | | | It seems that the pattern... 1. trigger action 2. start wait()-ing on a signal spy 3. continue after the signal is received ...is somewhat cursed in QML, since the signal may trigger inbetween steps 1 and 2, which will cause the wait() to never return true. This change removes that pattern from the favicon tests, which will hopefully reduce the tests' flakiness. Change-Id: I65cd3b8c8ae5fc855138eec94821eb932d999c3b Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> (cherry picked from commit 7cdcdb10915455c8ccb7f470158de0cc2fe66223) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d8cb9ae856e4fb03bc1f1dc0b7c65d4bc5187faa)
* Ensure deferred deletion of WebEngineQuickWidgetMartin Negyokru2024-07-011-0/+15
| | | | | | | | | | | | | | | In some cases the event loop exits before WebEngineQuickWidget::deletLater is called. In this scenario the object will not be deleted. Fixes: QTBUG-126401 Pick-to: 6.6 Change-Id: I9de8640c6f8d3b0f04665bce664f8b91523ddb69 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Anu Aliyas <anu.aliyas@qt.io> (cherry picked from commit a9357c72535b5e99f75b03af560badbb90dfa6f1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 1eb8f906a5bb0cb3ed12ff8d65d595ac46b1fced)
* Correct license for test filesLucie Gérard2024-06-28153-153/+153
| | | | | | | | | | | | | | | According to QUIP-18 [1], all test files should be LicenseRef-Qt-Commercial OR GPL-3.0-only [1]: https://contribute.qt-project.org/quips/18 Task-number: QTBUG-121787 Change-Id: I7ba480e5d9b9095ad6686c8b1c857f35caf17d04 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Kai Köhne <kai.koehne@qt.io> (cherry picked from commit a2d4c8a183e763b097e16f52172092cdb627b731) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit bcfb37c93850ae4bfc189d6d48835f4467e90159)
* Docs: fix the QML docs for the PdfSelection::text propertyAlexei Cazacov2024-06-271-0/+4
| | | | | | | | | | | | | | | | The QML docs described the "string" property, but the actual property name is "text". Add a selectAll() shortcut to the withdoc.qml manual test while we're at it, for easier checking of behavior. Fixes: QTBUG-126138 Pick-to: 6.5 6.2 Change-Id: Ieab6188661d4e9b1c1f4dc4faaf355b94bdc3f4c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 1caa4fd26b25d97507e916780e34e70720ceb0b2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 7338266ed2fc40941deef18f3c5c04d27699f695)
* Minor. Add missing target checksMichal Klocek2024-04-242-4/+12
| | | | | | | | | | | | | | We need to always add target checks as qt-camke can call configure on tests even if webengine is not built. Otherwise it prints more errors than it should. Pick-to: 6.6 Task-number: QTBUG-120247 Change-Id: I7e9c1ab9640b91addb8ad1b35889771fb3dd9569 Reviewed-by: Moss Heim <moss.heim@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io> (cherry picked from commit 5c2dcae95a9cb16e2a8f6730304c10397620b7a6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Handle empty uri-list in dropped MIME dataMoss Heim2024-04-241-0/+23
| | | | | | | | | | | | Previously WebContentsAdapter assumed that drag-n-drop MIME data with hasUrls() == true would also have a nonempty url list. This is not always the case. Instead, check directly if urls() is nonempty. Fixes: QTBUG-123765 Change-Id: I9e2189e3f0223f98bdd8be273adb96cf063f4be3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit fa8ff1bb933b02f61e406cb29d5c8d4294676a5a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Correct license for examples filesLucie Gérard2024-04-235-5/+5
| | | | | | | | | | | | | | Example takes precedence over build system file type. According to QUIP-18 [1], all examples file should be LicenseRef-Qt-Commercial OR BSD-3-Clause [1]: https://contribute.qt-project.org/quips/18 Task-number: QTBUG-121787 Change-Id: I558c6f409a480835d335101577ae633194b0559d Reviewed-by: Kai Köhne <kai.koehne@qt.io> (cherry picked from commit b816bf293dcc3acf39de8df58f2875cc9a361f80) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Correct license for build system filesLucie Gérard2024-04-224-4/+4
| | | | | | | | | | | | | According to QUIP-18 [1], all build system files should be BSD-3-Clause [1]: https://contribute.qt-project.org/quips/18 Task-number: QTBUG-121787 Change-Id: I2f13ceaa8eb68b7745cffc66651f892c1fbeeff2 Reviewed-by: Kai Köhne <kai.koehne@qt.io> (cherry picked from commit 3f68ff473adc558a54182c07fbb34abaca4323e8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix -no-opengl buildPeter Varga2024-04-191-1/+3
| | | | | | | Change-Id: Ibb6cb75a25f9b6d69ec03bc2c6734a869ab21899 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit e4632beaa2e7411595bc4398bba3882668cf3851) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Get tst_QPdfSearchModel working; check search results in rotated textShawn Rutledge2024-03-245-4/+246
| | | | | | | | | | | | | | API has changed since b6dd845ec4a6bfb6b620686681e20d38a2f24101, and this test wasn't included in CMakeLists so we haven't been running it. Now it checks search result rectangle bounds. The new test PDFs are from the pdfium repository https://pdfium.googlesource.com/pdfium and include different kinds of transforms (the Tm command apparently). Task-number: QTBUG-120764 Change-Id: I25cf5944dd227dd4d2c70cbbac470d1d0fcc181a Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit f99e5ccf03e1b8fa3dd9725cbd9992850b9e4159) Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Convert "page" <-> "view" coordinates for PdfSelection and LinkModelShawn Rutledge2024-03-245-1/+293
| | | | | | | | | | | | | | | | | Use FPDF_PageToDevice() rather than subtracting from page height, in all the remaining places where we were doing that. Also use FPDF_DeviceToPage() to convert coordinates coming from the view, for hit-testing links and for selecting ranges of text. Mark the private utility functions that we're modifying const while we're at it. Pick-to: 6.6 6.5 Task-number: QTBUG-100630 Fixes: QTBUG-106565 Change-Id: Ide4f73b80888a0e08381c6e4995f69ebeaa2d12f Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit b78c78349d786b294ee0845717ad5db38ae2565a) Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix flaky horizontalScrollbarTestMartin Negyokru2024-03-111-0/+94
| | | | | | | | | | | | Mouse events will miss the hittesting if they are sent before the page is drawn. Introduce new test page that listens for first paint events. Pick-to: 6.6 Change-Id: I4846ec1bde3805f5dd0098d490cb85c72cb0884f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 290d7462696664a1e035082793907d3c698bc987) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Don't crash when setting invalid cookieMoss Heim2024-01-311-0/+32
| | | | | | | | | | | | | | | | QWebEngineCookieStore::setCookie was incorrectly validating cookies after an API change in chromium; this would lead to cookies being considered always valid which could crash if validation failed. This commit updates the API call and adds a test to check that invalid cookies are no longer added. Pick-to: 6.6 Change-Id: I6fc4268a483c9495c19843f3a7b16b4f234633b4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit 82e3d79437a37761adaa716927b0dee9ab8ec7fb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update QWebEngineDesktopMediaRequest based on API reviewMartin Negyokru2024-01-301-3/+3
| | | | | | | | | | | | | | - Port the request's d-pointer to std::unique_ptr - Disable copy of the request - Remove QWebEngineMediaSourceModel from the header - Remove the NameRole definition - Update tests and documentation according to changes - Use forward declaration in qwebenginepage Change-Id: I972b3104a0bca5367a4bb63ac183a60d00a71776 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit a8325ce5cbd90d1eb5077b69b34820a19c5a5e87) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Delay PdfMultiPageView.goTo[Page|Location] if called too earlyShawn Rutledge2024-01-272-0/+30
| | | | | | | | | | | | | | | | | | PdfMultiPageView does not expose a property alias to TableView.rows; we could call it pageCount, but we don't want to mislead users into thinking that the view is the "source of truth" for how many pages it's going to show. The document's pageCount is populated earlier, and that's a problem only in such a case when it's too early to ask the view to go to a particular page. So we work around it in the view by treating these goTo functions as requests to be satisfied as soon as it becomes possible. Fixes: QTBUG-119416 Pick-to: 6.6 6.5 Change-Id: Ie2377fe6f2983b72e871b1be2afe4d0878f60841 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit e9a5b6e514996c059d52a857a5aef624afb80a0e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix discontinuity with successive pinch-zoom in PdfMultiPageViewShawn Rutledge2024-01-271-0/+75
| | | | | | | | | | | | | | | | | | | | | | pinch.persistentScale is settable since 6.5 (qtdeclarative a432970b258edb9ff041d221b2155df30cad4799): we need that to tell PinchHandler to start over from 1 after we have also set the rendered scale back to 1, because PinchHandler does not read the scale property for itself. This cherry-pick includes 48ebac59b1ec5bbafa1c64adbdbc44b0cf3f302a to avoid a crash on exit by waiting for the rendering to be done, and a4e64baef027fb407b8c1491c444ed58edd15529 to disable touch compression. Fixes: QTBUG-115502 Task-number: QTBUG-120245 Task-number: QTBUG-121502 Fixes: QTBUG-121564 Pick-to: 6.6 6.5 Change-Id: I21951c447bf33e5942b6a1635488d5474ec8f293 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit c0524da14d92a957b4607fb5867dba5d23eea6d9) Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Correct PrintedPageSizeId to match QPageSize::PageSizeIdMichael Brüning2024-01-241-4/+2
| | | | | | | | | | | | With Qt 6, QPageSize::PageSizeId enum was cleaned up and some values were reordered, but the WebEngineQuick part was not changed accordingly. Pick-to: 6.6 6.5 Fixes: QTBUG-120218 Change-Id: I7e4c419750d30a64193e68b0b217ebbccce07d87 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit 199730bd41219c5484fb1c4c61b637ab9ceec0c4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* doc: Add docs for the pdfviewer exampleShawn Rutledge2024-01-232-19/+19
| | | | | | | | | | | This example exists to show a simpler viewer using PdfScrollablePageView rather than PdfMultiPageView. Most users will probably prefer the latter, so we don't highlight this one. Task-number: QTBUG-81560 Change-Id: Ia601b8c8ec0cb9002aa118917720a37b4f8095a5 Reviewed-by: Kai Köhne <kai.koehne@qt.io> (cherry picked from commit eb5e85aaebd728670a6586894b3dd12775a47310)
* Fix cursor position during compositionAnu Aliyas2024-01-212-10/+59
| | | | | | | | | | | | | | | During input composition, the cursor is set to the starting position of the string being edited and refrain from updating it throughout the composition process. Once the string is committed, it is set to the last position of the committed string. The modified code is designed to exhibit the same behavior as the widget and quickwidget. Fixes: QTBUG-118746 Pick-to: 6.6 6.5 Change-Id: I9adb7a9bea9493457a1d9d4b32338cdba30920a1 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> (cherry picked from commit c9550388b9ab1d82454d0c59eaaf7e640d83d750) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update QWebEngineWebAuthUxRequest based on 6.7 API review commentAnu Aliyas2024-01-181-47/+47
| | | | | | | | | | | | - Modified WebAuthUXState as enum class - Renamed QWebEngineWebAuthUXRequest as QWebEngineWebAuthUxRequest - Renamed QWebEngineWebAuthPINRequest as QWebEngineWebAuthPinRequest - Replaced all occurrence of UX and PIN with Ux and Pin respectively Change-Id: Iaf0b4c93e0dfa3508a604f7d6562c4401ff800af Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 549ede011a36c947d67419a77bbdd2b8805647d5) Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Fix compilation if no qhttpserverMichal Klocek2024-01-181-1/+3
| | | | | | | | | | | This amends 8bedcaac01cd0a08031f42acfd7ebcc15f541964 Task-number: QTBUG-112142 Change-Id: I49891681a483f6e57354cfa51f045df8a12ca20a Reviewed-by: Martin Negyokru <negyokru@inf.u-szeged.hu> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> (cherry picked from commit d1b9391d0883d99ceef9d2a016f14f314f9d5785) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add test for Hangout services extensionMartin Negyokru2024-01-161-0/+47
| | | | | | | | | | Test chooseDesktopMedia extension API. Task-number: QTBUG-85731 Change-Id: I2479297b2ccd45bd28bdbe6e9157ad67d0a15739 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 0b53de1514562f4cf17f31cf4a23c6b2fbae8876) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add manual test for screen capturingMartin Negyokru2024-01-126-0/+346
| | | | | | | | | | | Add test for getUserMedia, chooseDesktopMedia and QWebEnginePage::desktopMediaRequested. Task-number: QTBUG-112142 Change-Id: Ie91838d0da05281cde8b316596ee74589af5581c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 8bedcaac01cd0a08031f42acfd7ebcc15f541964) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickPdfPageImage::load(): fall back to base class impl to avoid crashShawn Rutledge2024-01-075-0/+495
| | | | | | | | | | | | | | | | | | | | | | | | Plain Image is ok for loading one PDF page at a time, except that the pdf plugin has to create its own PDF document object if it cannot reuse an instance that is already open. So PdfPageImage was created just as an optimization, with the expectation that the document will be given to the document property. But in case someone doesn't understand and tries to set only the inherited Image.source property instead, fall back to QQuickImageBase::load() to avoid crashing. Amends 7b8832ca2b84d549c9d374550c3c46b3d4d42a38 If both the document and source properties are set, prefer the document (for the sake of performance). Add test coverage of other combinations of properties, while we're at it. Pick-to: 6.6 6.5 Fixes: QTBUG-104767 Task-number: QTBUG-77506 Change-Id: I1ee0d0bb2a6c5f399234ddddd969be02e7a6c020 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit b60c00f4adec9ea4b75af0226b04a7125e166ae2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add missing cmake includeMichal Klocek2024-01-061-0/+1
| | | | | | | | | | | | | | | Without the include module build with BUILD_TESTS=ON is broken as cmake function call for dictionary setup is not found. This commit amends 73d58b489e8f4f900042f0ab6c1104e6431752e1. Pick-to: 6.6 6.5 Change-Id: I2c02317b92e1b5726963d120bf97dff1a12c7375 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit b50731bffae31729b1c5c43ad7f869b5cc65e81b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix printing from PDF pluginSzabolcs David2023-12-201-0/+46
| | | | | | | | | | | | | | | Update the plugin finder logic everywhere to match with Chrome. This comes with a small cleanup: collect PDF-related helper functions scattered around WebEngine in one pdf_util_qt implementation. Add auto test to catch this recurring issue earlier. Pick-to: 6.6 6.5 Task-number: QTBUG-119878 Change-Id: I03b2bd62bebf5b38afc572e0629db106d024e89d Reviewed-by: Michael Brüning <michael.bruning@qt.io> (cherry picked from commit e09cf6e7a1f582d06f86ff2c166b7c2269fd4b47) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add WebEngineDriverPeter Varga2023-12-207-0/+715
| | | | | | | | | | | | | WebEngineDriver is a modified ChromeDriver and provides the same functionality. [ChangeLog][WebEngineCore] Added WebEngineDriver Pick-to: dev Fixes: QTBUG-82046 Task-number: QTBUG-86869 Change-Id: Ib8a40e1f6ca883efa6776c647a5b57d2930593ae Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add new API for screen capturingMartin Negyokru2023-12-181-0/+9
| | | | | | | | | | | | | [ChangeLog][WebEngineCore] Add QWebEnginePage::desktopMediaRequested() signal [ChangeLog][WebEngineQuick] Add QQuickWebEngineView::desktopMediaRequested() signal Fixes: QTBUG-112142 Task-number: QTBUG-70077 Change-Id: I4bfad88732b45fb68b77f7617440bcb50b248a11 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit de57e1b0b00be63e0647d864ff48b9c75742423d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Chromium 118 adaptationsAllan Sandfeld Jensen2023-12-093-3/+5
| | | | | Change-Id: I8eea99a472cc597ff9864b570c90b28b79b3751e Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Fix typo in test_window_openAllan Sandfeld Jensen2023-12-081-1/+1
| | | | | | | | Apparently didnt affect test results though Pick-to: 6.6 Change-Id: I86809e6287ba7ca80209146c73a0cc0d523756ac Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Fix compilation arm64Michal Klocek2023-11-291-1/+4
| | | | | | | | | | Add missing header include. Do not compile global setting tests as it tests so far only doh and requires ssl. Fixes: QTBUG-119525 Change-Id: I011cd3b0ed6e9d5e55e1fc80a102cc7a388681f1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* tst_QQuickWebEngineViewGraphics crash in Debug modeAnu Aliyas2023-11-241-0/+1
| | | | | | | | | | - DCHECK hit while running tst_QQuickWebEngineViewGraphics test. - Added qWaitForWindowExposed() to wait for the windows, and then perform the verification. Pick-to: 6.6 Change-Id: Ia5c2dba5f1c38ae06e7aac24f0f6d5f3d6f5859d Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix accessibility crash on elements with cell rolePeter Varga2023-11-101-0/+53
| | | | | | | | | | Not only tables can have cell as a child. Pick-to: 6.5 6.6 Fixes: QTBUG-119023 Task-number: QTBUG-113859 Change-Id: Ic997f752059f5ac3cac9a7d7cf1fefcecbc2ddd5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Let page interceptor process requests with extra headersSzabolcs David2023-11-071-1/+60
| | | | | | | | | | | | | | If a QWebEngineUrlRequestInterceptor has added extra headers to the request on profile level, later the request was not processed by the page interceptor. Relax this rule and only prevent the interception of blocked or redirected requests. Add auto test and extend documentation. Pick-to: 6.6 Task-number: QTBUG-117752 Change-Id: I503bfc256a5e874a678be64c597c74e04e7ce966 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Reinstall URLRequestInterceptors during new view adoptationSzabolcs David2023-11-021-0/+49
| | | | | | | | | | | The pointer to the page interceptor is stored in WebContentsAdapter and we lose it when recreating the adapter. Prevent this and add auto test. Fixes: QTBUG-117867 Pick-to: 6.6 Change-Id: I5e79cdcc5996bdf2bb53c3016d4133f978ccfb39 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Skip comboBoxPopupPosition* tests on apple m1Michal Klocek2023-10-281-6/+15
| | | | | | | | | | | | We have constant crashes on apple m1 with those test, skip it for now. Verify window in comboBoxPopupPosition* tests. Pick-to: 6.6 Change-Id: I4b9744fbcae556bc8d17e7602d003f306f54c62d Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Allow cancelling automatically accepted download requestsSzabolcs David2023-10-171-3/+22
| | | | | | | | | | | | | Calling QWebEngineDownloadRequest::cancel() had no effect if the download request was accepted by default. These downloads had no corresponding internal DownloadItem yet, but we tried to cancel them using the DownloadManager. The safest option is to always check if the DownloadItem exists in Chromium. Pick-to: 6.6 Task-number: QTBUG-117624 Change-Id: I8f92d45e00e088aea7d22d5b7271b5b09adf6cbb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Provide the correct type information for WebEngineViewAnu Aliyas2023-10-131-6/+6
| | | | | | | | | | | | -Duplicate entries in the QML type file are created when exporting the type as a value and its enums within a namespace. Resolved this by introducing a derived class, and using it for exporting the Enums. - Added namespace resolution to avoid type ambiguity Fixes: QTBUG-117031 Pick-to: 6.6 Change-Id: Ieea4492238843c3c781c8d9602ddc89207b61137 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Support auto accepting non-HTML saves when a path was specifiedSzabolcs David2023-10-011-0/+20
| | | | | | | | | | | | | | | Images and PDFs had to be explicitly accepted to download, even if a filePath was given as argument of QWebEnginePage::save(). This behavior was inconsistent with saving HTML pages (and the documentation). Adjust the corresponding test case with verifying the download result of an auto-accepted download, and add a new test case to make sure about downloads are not accepted by default when there is no desired filePath. Pick-to: 6.6 Task-number: QTBUG-117624 Change-Id: I90f4cfa485da2831327bcb25571a0b69499d9006 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Support filePath argument of save() when saving non-HTML filesSzabolcs David2023-10-011-0/+2
| | | | | | | | | | | | | | Currently the filePath argument of QWebEnginePage::save() is ignored when the user tries to download anything but HTML; and the requested download path is the Downloads folder of the OS. Fix this and adjust the corresponding test case with checking path and file name of the download request. Pick-to: 6.6 Task-number: QTBUG-117624 Change-Id: Ia1d3afc898b1aad223aab772b775724a50e88bd3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Do more WE processing before returning to the Qt event-loopAllan Sandfeld Jensen2023-09-293-13/+14
| | | | | | | | | Fix a race-condition in our tests that the change exposed Pick-to: 6.6 Task-number: QTBUG-116478 Change-Id: Id21c6b0bc9934fdcb69bd85350f5f263a9b96914 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Handle initial NavigationEntriesMartin Negyokru2023-09-282-8/+8
| | | | | | | | | | | | | | | | | Chromium introduced the Initial NavigationEntry that meant to represent the initial empty document at FrameTree creation time. It is just a placeholder entry put in the list of NavigationEntries that gets replaced on the next navigation. A side effect of this is that we have an extra entry in the list before we load any page. This change also reverts the history related tests modified by 106 Adaptations that introduced this behavior. Fixes: QTBUG-117489 Pick-to: 6.5 6.6 Change-Id: I2738591b681082792544bd884f8ecec54ce9d72d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add QWebEngineSettings::ForceDarkModeMartin Negyokru2023-09-284-0/+94
| | | | | | | | | Enable forcibly modifying content rendering to result in dark color scheme. [ChangeLog][Settings] ForceDarkMode added, disabled by default. Fixes: QTBUG-84484 Change-Id: I4b3512dc365c61da8f91d8dead0715dadce91f75 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Improve QWebEngineDownloadRequest::isSavePageDownload()Szabolcs David2023-09-281-0/+21
| | | | | | | | | | | | | | | | | | | WebContentsImpl::IsSavable() decides which file formats are saveable, but it allows this only for text-based files. All other files will go around on the code path of downloading. MHTML (multipart) and PDF files are saved like this, which means they aren't marked as isSavePageDownload. Just simply set this flag if the save was requested by the user even if it was a download. This fixes the flag for saving MHTML and PDF files from context menu, and leaves the flag false when a PDF download was initiated by the button of the web UI. Pick-to: 6.6 Task-number: QTBUG-114859 Change-Id: Id65f26a96952c5a43876338ad37f40570e544f3a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Try stablizing testsAllan Sandfeld Jensen2023-09-242-24/+12
| | | | | | | | | | qmltests::WebEngineViewSingleFileUpload::test_acceptSingleFileSelection and tst_QWebEngineView::textSelectionOutOfInputField Pick-to: 6.6 Change-Id: Ica3e91f109ae2a43bff9cd25e0da7d363823a762 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add ImAbsolutePosition input method queryPeter Varga2023-09-181-0/+5
| | | | | | | | | | cocoa qpa uses it. Pick-to: 6.6.0 6.6 6.5 6.5.3 Fixes: QTBUG-115994 Change-Id: Ie9556169add96946b71299066b8db92bee23066e Reviewed-by: Anu Aliyas <anu.aliyas@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Improve tst_QQuickWebEngineView::savePage auto testPeter Varga2023-09-141-3/+9
| | | | | | | | | | | | | | | | Use ScopedConnection to avoid "stack-use-after-return" address sanitizer error. Also reduce potential wait time in case of failure by waiting for accepted and finished states individually (same as tst_QWebEngineDownloadRequest tests). Pick-to: 6.6 Fixes: QTBUG-116738 Task-number: QTBUG-56093 Change-Id: I49a60c95a816ae1b4cb6b227501ff81ca9c6f82b Reviewed-by: Anu Aliyas <anu.aliyas@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>