summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_delegate_qt.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Adaptations for Chromium 77Allan Sandfeld Jensen2019-10-111-15/+15
| | | | | | Fixes: QTBUG-77267 Change-Id: I181e24cf80ebee6991b95dde6c636f0d169b40a4 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Adaptations for Chromium 76Allan Sandfeld Jensen2019-10-111-8/+11
| | | | | Change-Id: Id6d18a3854b572334dc1d65f1916b8991a740cd2 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Introduce findTextFinished signalPeter Varga2019-08-231-1/+1
| | | | | | | | | | | | | | | | | | This is a replacement for the callbacks. Also introduces QWebEngineFindTextResult class what is common for the Quick and Widget APIs. This makes possible to provide extra information about the match, eg. the number of matches and the index of the currently highlighted match. [ChangeLog][QtWebEngine][WebEngineView] Introduces findTextFinished signal and FindTextResult type to provide extra information about the result of a text search. [ChangeLog][QtWebEngineWidgets][QWebEnginePage] Introduces findTextFinished signal and QWebEngineFindTextResult class to provide extra information about the result of a text search. Task-number: QTBUG-50420 Change-Id: Icb9737d2f596e6bc0fc5733144eeeaf2a77aab02 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Refactor findText handlingPeter Varga2019-08-221-11/+8
| | | | | | | | | | | Move most of the findText logic to the QtWebEngineCore::FindTextHelper class. This change also separates findText callbacks in the new class for getting rid of the request ID conversion and make it easier to remove them in Qt6. Task-number: QTBUG-50420 Change-Id: I348cedd0f90a49f9b360165c46319aeed2c236c0 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Use RenderFrameMetadata for scroll position and contents sizeJüri Valdmann2019-08-221-7/+1
| | | | | | | | | | | Needed for using viz display compositor since SubmitCompositorFrame will not be called any more. Also move the loadVisuallyCommitted call to the Compositor's callback. Task-number: QTBUG-71885 Change-Id: I062b3466671cc6af35877f2ff6995ea290cdf9de Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devAllan Sandfeld Jensen2019-07-241-1/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty src/core/core_chromium.pri tests/auto/quick/qmltests/BLACKLIST tests/auto/quick/qquickwebengineview/BLACKLIST tests/auto/widgets/qwebenginepage/BLACKLIST tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp tests/auto/widgets/qwebengineview/BLACKLIST Change-Id: I11b26f5eebde29c4c62247b90e11e3ae40789fe4
| * Merge remote-tracking branch 'origin/5.12' into 5.13Allan Sandfeld Jensen2019-07-231-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/core/config/common.pri src/core/configure.json src/core/net/url_request_qrc_job_qt.cpp src/core/ozone/surface_factory_qt.cpp src/core/web_contents_adapter.cpp Change-Id: If679aa179123f793639da3d8ee4ab5d116707754
| | * Reset findText reply id on StopFinding to prevent callback laterKirill Burtsev2019-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Not updating lastReceivedFindReply caused next findText call after StopFinding to trigger redundant callback call on checking stale query. Fixes: QTBUG-77029 Change-Id: Iad4b71364ecb3ec3db3096b739e77620d12731f9 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Allan Sandfeld Jensen2019-07-101-0/+5
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/quick/qmltests/BLACKLIST tests/auto/quick/qquickwebengineview/BLACKLIST Change-Id: I29b68dec8692d0369a2dda56350ee62d3ad73e08
| | * Set custom user-agent manually on new windowsAllan Sandfeld Jensen2019-06-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chromium forgets to set ShouldOverrideUserAgentInNewTabs(), so we need to manually set the override. Fixes: QTBUG-76249 Change-Id: Id240ee525dacec3cd8389aca058a61d3af62b00a Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | | Adaptations for Chromium 75Allan Sandfeld Jensen2019-07-101-0/+1
| | | | | | | | | | | | | | | Change-Id: Idad08244e0c749a9f70f5eb9f8cd236039b941b3 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | | Merge remote-tracking branch 'origin/5.13' into devJüri Valdmann2019-07-021-0/+58
|\| | | | | | | | | | | Change-Id: I806417dd7a6d2594a86ee49feedc4ad9ee48add2
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Allan Sandfeld Jensen2019-06-111-0/+59
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/3rdparty src/core/configure.json src/core/profile_io_data_qt.cpp tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp Change-Id: Ie8ae4aa03881a0733ff497fff46e3f7040735650
| | * Disable edit actions when content has no focused framePeter Varga2019-05-271-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-75505 Change-Id: Ia1329ff554a86e307aa7995e9af1665ea6c5e64c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Implement page lifecycle APIJüri Valdmann2019-05-241-0/+133
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtWebEngine][WebEngineView] WebEngineView now supports lifecycle states that can be used for reducing CPU and memory consumption of invisible views. [ChangeLog][QtWebEngineWidgets][QWebEnginePage] QWebEnginePage now supports lifecycle states that can be used for reducing CPU and memory consumption of invisible pages. Fixes: QTBUG-74166 Fixes: QTBUG-55079 Change-Id: I7d70c85dc995bd17c9fe91385a8e2750dbc0a627 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Allan Sandfeld Jensen2019-03-281-0/+6
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/3rdparty src/core/render_widget_host_view_qt.cpp src/core/web_contents_view_qt.h src/core/web_engine_context.cpp Change-Id: I17f3a4814e88a5680dc61a6d734c171ccba00e8c
| * Fixup focus implementationAllan Sandfeld Jensen2019-03-211-0/+6
| | | | | | | | | | | | | | | | | | Follow the other implementation and pass TakeFocus to WebContents Delegate, and hook to our UI from there. Also fixes use of Blur instead of LostFocus, which means we now render unfocused more correctly. Change-Id: I34a1882489bc68b9ff36ed5139af0ee8a3a95b79 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Adaptations for Chromium 73Allan Sandfeld Jensen2019-03-231-5/+10
| | | | | | | | | | Change-Id: I565d1e327852110a5abebed3388d7cd6986bef06 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Adaptations for Chromium 72Allan Sandfeld Jensen2019-03-231-1/+3
| | | | | | | | | | Change-Id: Ic355257066c7c1433862cb41e6f2bfa831147e0d Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Remove hack with passing WebContentsAdapterClient as NativeViewAllan Sandfeld Jensen2019-02-181-1/+5
| | | | | | | | | | | | | | | | Instead delay creating our render view just a little bit further in WebContentImpl::OpenWindow until it calls delegate->WebContentsCreated() Change-Id: Idd911d208bbfe419a2567220933eccb2ba726347 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Web Notifications APIKirill Burtsev2019-02-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements API for end-user notifications. Co-authored by Allan Sandfeld Jensen [ChangeLog][Profile] Support for Web Notifications API for end-user notifications through QWebEngineNotification Task-number: QTBUG-50995 Fixes: QTBUG-51191 Change-Id: Icebaaa05275a713e801f1f8ecdaaec725fa264c8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Adaptations for Chromium 71Allan Sandfeld Jensen2019-01-281-8/+12
|/ | | | | | | 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>
* Stop showing speculative framesJüri Valdmann2018-10-291-0/+8
| | | | | | | | | | | | | | | | | | | | | Chromium creates "speculative" frames (RenderFrameHost and company) for pending cross-process navigations (and maybe other navigations too). For example, a redirect from http://qt.io to https://qt.io will trigger this, as described in the bug report. These speculative frames are loading in the background and only shown once they are officially ready (as decided by the RenderFrameHostManager and signaled to WebContentsObserver::RenderViewHostChanged). At least, this is how it's supposed to work and how it works in Chrome. In WebEngine, however, we actually show these speculative frames as soon as they are created and before they are ready. This runs into the problem that the if the speculative frame is dropped (instead of committed), then Chromium will not ask us to re-show the old frame (since it hasn't actually asked to us to show the new frame, it naturally assumes we are still showing the old one). Fixes: QTBUG-68727 Change-Id: I9d53035ce60e3a002d5412d4473d940a32644b5d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Unify updating navigation actionsSzabolcs David2018-10-231-9/+14
| | | | | | | | | | On the Quick side, navigation actions were dependent on the context menu. They were only updated when requesting a new context menu and this is obviously wrong if an action is tied to a button or another type of UI element. Change-Id: I5f14b019b66215f16d027fb57d76f052b1604365 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Disable error pages for external URLsv5.12.0-beta2Jüri Valdmann2018-10-121-6/+4
| | | | | | | | | | | | | Failing to launch an external URL triggers a navigation to "chrome-error://chromewebdata". Navigating to "chrome-error://chromewebdata" results in a failed attempt to launch it as an external URL. The cycle repeats until the computer becomes bored. Match Chromium and disable error pages for external URL load failures. Fixes: QTBUG-63378 Change-Id: I6c401532d658744edc56921b55efd0d040a12b1a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* General adaptations for Chromium 69Allan Sandfeld Jensen2018-09-221-10/+8
| | | | | Change-Id: Ifeaf0ee13213dc5a24d2f2b4655cf7f405cddef7 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Adaptations for Chromium 68Allan Sandfeld Jensen2018-09-221-5/+5
| | | | | | Together-with: Tamas Zakor<ztamas@inf.u-szeged.hu> Change-Id: I805246b6f01cb151fff48588744408c676d87c14 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Return http status code for successfully loaded pagesErwin Kandler2018-08-291-1/+5
| | | | | | | | | WebEngineView supports getting the http status code (error code) for failed loading requests only. This patch lets the user access the status code for successfully loaded pages as well. Change-Id: Ib8dbdfe94eed4d62e731c736c13f60ebd62a23fa Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Rename BrowserContextAdapter to ProfileAdapterMichal Klocek2018-07-091-6/+6
| | | | | | | | | 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>
* Enable client certificate storeAllan Sandfeld Jensen2018-07-081-0/+5
| | | | | | | | | | | | Creates the default client cerficate store for the platform and when given a choice of client certificates forwards to the choice to the application. Only a Widgets API for now. Task-number: QTBUG-54877 Change-Id: Ie15152398d5769579fa0c07e3e3035c2374e9940 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Finalize change from BrowserContext to ProfileMichal Klocek2018-07-061-1/+1
| | | | | | | | | | Changes 6c319ce and af313cb splited BrowserContextQt into ProfileQt and ProfileIODataQt. Finalize the change and rename leftover browserContext references to follow the initial change. Change-Id: I845142b1edb67ec4b94439be1e6cfc841dd3f55c Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Adaptations for Chromium 67Allan Sandfeld Jensen2018-06-261-2/+2
| | | | | Change-Id: I13cedba56012f74651a044d6fa8f0957487bf3eb Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Adaptations for Chromium 66Allan Sandfeld Jensen2018-06-261-3/+5
| | | | | Change-Id: Iee88721a50036d4ef85a23dd1708d4fb84218708 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devAllan Sandfeld Jensen2018-05-291-11/+0
|\ | | | | | | Change-Id: I9b1f2a0317290f0855da03eca9d26878b7faeb0a
| * Apply settings on pending RVH tooPeter Varga2018-05-251-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an improvement of: bab4abab Keep settings synchronized when RVH swaps Updating settings during RVH swap is flaky because it happens after the load start of RenderFrame thus it is not guaranteed the ViewMsg_UpdateWebPreferences message is received by the render process before the load finishes. This means that the setting might not be applied on the current page if it was set during the navigation. The new RVH is created at the very beginning of the navigation, so access it via the pending or speculative main frame of the page thereby make it possible to update its settings before the load of RenderFrame starts. Task-number: QTBUG-66656 Task-number: QTBUG-68424 Change-Id: I4fbba597579551bb3329936ccd7b357cf8daa4ea Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Rename BrowserContextQt to ProfileQtMichal Klocek2018-05-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Following commits are going to introduce ProfileIODataQt and to keep things self documented just rename the class so it reflects Chromium one. Fix minor style issues in profile_qt.h Presort include headers as requested on review. Change-Id: If58f5aec8ac64cfaf30642195838a77497b75244 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Michal Klocek2018-05-181-3/+21
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.11' into devAllan Sandfeld Jensen2018-05-181-3/+21
| |\| | | | | | | | | | Change-Id: Id171407c17533846e8efe0e586d6793a61543438
| | * Keep settings synchronized when RVH swapsPeter Varga2018-05-171-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There can be more than one RenderViewHost assigned to a single WebContents. This is the case when starting a page load results changing processes. When applying settings during the load it updates only the old RVH. This fix applies the settings to the new RVH too after the swap. Task-number: QTBUG-66656 Change-Id: I833415b2a34f58e2a9a18c209a025c82b73aa65a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Merge remote-tracking branch 'origin/5.11.0' into 5.11Qt Forward Merge Bot2018-05-091-3/+10
| | |\ | | | | | | | | | | | | Change-Id: Id41b0b07a934994471df40de884e1231ee1c0e8e
| | | * Fix invalid site instance when switching browser contextsJüri Valdmann2018-04-301-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All pages in a site instance should belong to the same browser context, an invariant which is violated by our WebContentsDelegateQt::OpenURLFromTab. Task-number: QTBUG-67900 Change-Id: I754180bb96de07448ee3058210391f7856f4caeb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | | Change BrowserContextAdapter to be QPointerMichal Klocek2018-05-181-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Reduce boilerplate code for FaviconManagerMichal Klocek2018-05-171-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove private implementation for FaviconManager Make FaviconManager non QObject since there no reason to do so. Change-Id: I8e341f9bd2dbc6f3fa977693383bbbf7349ab0b0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Reduce boilerplate code for WebContentsAdapterMichal Klocek2018-05-071-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | We do not need WebContentsAdapterPrivate. Remove it. This change also removes scoped ref to WebEngineContext in WebContentsAdapter. Change-Id: I0a9acec4d5500342ffa41865cfc775fdb0e68ac4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* / Test of data-url with anchor and base URLAllan Sandfeld Jensen2018-04-201-1/+1
|/ | | | | Change-Id: Ib63727794a794c20b1ca372ab6457c2a8a141762 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Use wrappers in QtWebEngineCore public interfaceJüri Valdmann2018-04-131-4/+5
| | | | | | | | Stop exporting quota / RegisterProtocolHandler request controller classes, and use the public wrapper classes in WebContentsAdapterClient instead. Change-Id: Iaa380b6ceb4f9464fc05dd012ee5df219f11f189 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Shorten names of permission classesJüri Valdmann2018-04-131-4/+4
| | | | | | | | | | | 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>
* Avoid creating temporary blank WebContentsJüri Valdmann2018-04-061-2/+7
| | | | | | | | | | | | | | | | | | | | | - Avoid creating a blank WebContents for new QWebEnginePages only to replace it with a different blank WebContents moments later. This problem is already solved in QQuickWebEngineView by lazy initialization, therefore the patch moves this lazy initialization into WebContentsAdapter itself so that it can be applied to both QQuickWebEngineView and QWebEnginePage. - Try to delay WebContents creation until the first navigation so that we have enough information available to pick the right initial SiteInstance when calling WebContents::Create. This is done by triggering WebContents creation from the first call to a WebContentsAdapter::load* method. - Use the SiteInstance from WebContentsDelegate::OpenURLFromTab. This method gets a SiteInstance pointer which we should give to WebContents::Create. Task-number: QTBUG-65561 Task-number: QTBUG-67163 Change-Id: Id7b351998adefb810cf27c61a1447b61d7f4c606 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Cleanup file locationsAllan Sandfeld Jensen2018-03-201-1/+1
| | | | | | | | 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>
* Adaptations to form validationAllan Sandfeld Jensen2018-03-151-32/+0
| | | | | | | | Form validations messages has moved entirely to being done by Blink. Change-Id: I6742c111fc59f0baba75b8b37f5d0ec9ae2fb920 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Michael Brüning <michael.bruning@qt.io>