summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Add link from QWEClientCertSelection to related signalLeena Miettinen2018-10-041-1/+5
| | | | | | Task-number: QTBUG-70496 Change-Id: I393001986714cd39dee2ac4fae8433cde1383ef8 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Cleanup scenegraph integrationAllan Sandfeld Jensen2018-10-022-4/+4
| | | | | | | | Get rid of old QSG type names, and also remove redundant setupTiledNode call. Change-Id: Ifbd83f6bdc0e029eb52899b20562ef6606f5562b Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Fix QWebEngineView changed properties emit on setPageKirill Burtsev2018-10-013-18/+65
| | | | | | | | | | QWebEngineView now also emits url, title, icon and selection changes on setPage in the save way when url changes. Before, those updates were only forwarded from current page. Fixes: QTBUG-69300 Change-Id: If827205094423bc00064a123ddb143b6002d2e7c Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-09-271-1/+8
|\ | | | | | | | | | | | | | | | | Conflicts: configure.json configure.pri src/3rdparty Change-Id: I2e0614b33596fe66999508556c464ed84acc8e2f
| * Doc: Mention that profile storage paths must be set before useLeena Miettinen2018-09-241-1/+8
| | | | | | | | | | | | Task-number: QTBUG-66871 Change-Id: I246d667dfe341a6bfe7a74b24286403bec4dde8b Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Fix QWebEnginePage emit zero loadProgress before loadStartedKirill Burtsev2018-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | Restore expected behavior for QWebEnginePage loading progress. This was missing after queuing progress notification signals change. Add missing state transition to loadSignalsOrder test. Change-Id: Id1d94f8391b83decc8057c5108d2d19c38258965 Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Allan Sandfeld Jensen2018-09-172-3/+5
|\| | | | | | | | | | | | | | | Conflicts: src/3rdparty src/core/core_common.pri Change-Id: I36dc3a70aa653e6c8a610c787b615034180a6127
| * Document world ID limitAllan Sandfeld Jensen2018-08-272-3/+5
| | | | | | | | | | | | | | | | | | The max was bumbed from 11 to 256, now document it. Task-number: QTBUG-69904 Change-Id: I6cbf64afe3409c4722d7a903d833124880b32bc0 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Correct cert to certificateAllan Sandfeld Jensen2018-09-125-29/+29
| | | | | | | | | | Change-Id: I7534aa6cd0c2a95403ad997095d5de76216f228e Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Fix issues with qml bindings accessing non-existing adapterMichal Klocek2018-09-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have currently two levels of initialization for WebEngineView: the profile initialization and the adapter initialization. The adapter initialization is delayed to first navigation request to pick the right initial site instance and avoid creating dummy/blank WebContents, which in turn would start unnecessary render process. Profile initialization is delayed to make sure we avoid unnecessary default profile creations. Created profiles use filestorage. Unfortunately qml will call QQuickItem::componentComplete() only when the root element is completed and the bindings can be already in use by that time. Profile initialization has to take place before adapter initialization. Construct adapter together with WebEngineView, but create and initialize profile before adapter initialization. Go through WebEngineView and fix emitting signals based on adapter initialization. Most of the signals are emitted on initializationFinished(). Task-number: QTBUG-70248 Change-Id: I2acd8bff761c692a360733cbf537de53e1295695 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Improve QWebEngineUrlScheme APIJüri Valdmann2018-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Avoid reattach of page before deleting itAllan Sandfeld Jensen2018-09-053-9/+10
| | | | | | | | | | | | | | | | | | Also fixes potential double delete if you do delete a view's implied page. Change-Id: Ib74128c0801f992694f4a5d8c148974039a6c7b2 Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Zakor Tamas <ztamas@inf.u-szeged.hu>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Michael Brüning2018-08-215-10/+28
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Clarify how key / mouse QEvents are propagated to a popup RWHVQD objectAlexandru Croitor2018-07-311-0/+6
| | | | | | | | | | | | Change-Id: I74f6a607d96733fa379526be40c6a13c31203d4e Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * Close popups when parent window is movedAlexandru Croitor2018-07-272-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an HTML select box was clicked inside of a QWebEngineView and the parent QWebEngineView window was moved using the mouse (via window decoration toolbar for example) the popup window would stay around instead of being closed. This happened because of the usage of the Qt:Tool window flag for the popup window, which implies a tool that floats near its parent window. The fix is threefold: 1) Use Qt::Popup instead, similarly to how QMenu does it. Whenever the parent window is moved, the popup will now get a CloseEvent. 2) Handle the CloseEvent by telling Chromium to close and destroy the popup. 3) On Windows the OS might send mouse move events to the popup RWHVQD instance after its parent QWebEngineView, RWHVQD, QWebEnginePagePrivate (client adapter) is destroyed. We need to guard the mouse forwarding code not to access the client adapter if it has already been destroyed. The second point is done by telling Chromium that its popup lost focus which it interprets as a sign to hide it, and automatically destroy it. This will destroy the underlying RWHVQtDelegateWidget and RWHVQt instances. Task-number: QTBUG-59891 Change-Id: I47f94a93c495a6caa5de92a6022eaca154994eda Reviewed-by: Michael Brüning <michael.bruning@qt.io>
| * Add threading and security note for print()Michal Klocek2018-07-201-0/+5
| | | | | | | | | | | | | | | | | | Adds note for QWebEnginePage::print(...) function. Change-Id: I52ec78ccfc5c4eeb98ee69f9aaab01b380f97a81 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Szabolcs David <davidsz@inf.u-szeged.hu> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * Forward mouse and keyboard modifiers from QDropEventJüri Valdmann2018-07-131-1/+1
| | | | | | | | | | | | | | Task-number: QTBUG-69231 Change-Id: I35b503dae7e2d90b26b6e61a4c7c260e45df2b62 Reviewed-by: Filipe Azevedo <filipe.azevedo@kdab.com> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * Doc: Mark \snippet entries with .pro filesVenugopal Shivashankar2018-07-031-0/+2
| | | | | | | | | | | | | | | | This should enable excluding such snippets from documentation in some cases. Change-Id: I46854412546e3774889e09831254828d18362f29 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Make WebChannel an optional featureMichal Klocek2018-08-091-0/+12
| | | | | | | | | | | | | | Add webengine-webchannel feature. Change-Id: I600572180f8169aafe79cf0408527cc087d9a007 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Add printRequest()Michal Klocek2018-08-093-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | Adds printRequested() signal for web content. This signal is emitted on javascript window.print(). This change updates also qt printview manager implementation, fixes a corner case and warnings about ipc unconsumed attachments. Task-number: QTBUG-69237 Task-number: QTBUG-53745 Change-Id: I0c47b732e27e929ac6db237fb562b7d5f9b959c2 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Fix running webengine without default profileMichal Klocek2018-08-031-2/+2
| | | | | | | | | | | | | | | | | | 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-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Add QWebEngineDownloadItem page/view accessorAllan Sandfeld Jensen2018-08-025-1/+23
| | | | | | | | | | | | | | | | | | | | To be able to determine where a download was triggered. [ChangeLog][DownloadItem] Added a page/view accessor to tell were the download was triggered. Change-Id: I21843a545a3e0eb66f5e5fa8a50e77564f2118a7 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Add DNS prefetchingAllan Sandfeld Jensen2018-08-013-0/+7
| | | | | | | | | | | | | | | | | | | | | | Turns out we did no have DNS prefetching. It requires an extra component. The same component can also do pre-connect, but we do not enable that, as it requires a predictive browsing backend. [ChangeLog][Settings] DnsPrefetchEnabled added, but disabled by default. Change-Id: Ieb036435b9f1a72a7be302e38e89e0c347c7176b Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Enable XSS auditing by defaultFlorian Bruhin2018-07-191-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chromium has XSS auditing enabled by default - it seems like a bad idea for QtWebEngine to disable a Chromium security feature by default. The Google design document for the XSS auditor also claims[1]: Processing costs are essentially zero unless the URL or POST body includes any of the four characters " > < '. When those characters are found, we only invoke heavy processing on those attributes that might be dangerous. This stands in contrast to the XSS Filter in Internet Explorer, which runs costly regular expressions. Thus, worries about performance issues are likely unsubstantiated. This can be tested using the first link on [2], where Chromium blocks loading by default but QtWebEngine did not. [1] https://www.chromium.org/developers/design-documents/xss-auditor [2] http://webdbg.com/test/xss/auditor.aspx [ChangeLog][QtWebEngine] The XSSAuditingEnabled setting is now enabled by default, to mirror Chromium's behavior. Change-Id: Id57177ec8183335bc94cc8c0c440ac1e10d2c74f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Konstantin Tokarev <annulen@yandex.ru> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Fix build with '-no-feature-action' configurationValentin Fokin2018-07-184-0/+58
| | | | | | | | | | | | Task-number: QTBUG-56117 Change-Id: Ia097db769d0914f989860048db4ba628737f39c7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Rename BrowserAdapterClient to ProfileAdapterClientMichal Klocek2018-07-094-44/+44
| | | | | | | | | | Change-Id: I1f8c0d2e59c2565b24c8c636553f1b70bcd31774 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Rename BrowserContextAdapter to ProfileAdapterMichal Klocek2018-07-095-64/+64
| | | | | | | | | | | | | | | | | | 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-086-1/+243
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Unset currentPrinter before triggering the callback of printing operationSzabolcs David2018-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | The printer is not in use here, but we are holding its pointer - preventing users from initiating other printing operations from the printing finished callback. Change this to allow chaining print() and printToPdf() calls. Task-number: QTBUG-69222 Change-Id: I1e6242627821d57f877b587c1d760fac16c97ae2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devAllan Sandfeld Jensen2018-06-262-51/+52
|\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf configure.json src/3rdparty tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp Change-Id: Id79ff6cf01c2db3a2044881ddcbf044abdf84936
| * Doc: Add missing dots (qtwebengine)Paul Wicking2018-06-221-1/+1
| | | | | | | | | | | | Task-number: QTBUG-68933 Change-Id: I395157a9931a0e0789b3791cc9b4d55dbcf8a4c2 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * Fix segfault in QWebEnginePage::triggerActionJüri Valdmann2018-05-301-50/+51
| | | | | | | | | | | | | | | | Calling triggerAction for a context-menu-specific action (like DownloadLinkToDisk), when no context menu exists, will crash. Change-Id: Ife647b7a7d8ab1a0d9dcb7d3566be130516e6e63 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Fine tune configure and clean up header includesMichal Klocek2018-06-124-39/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously configure was generating two config headers qtwebengine-config.h and qtwebengine-config_p.h, however those headers were never installed or included as dependency in Makefiles. Moreover, due to the name clash all features were included into qt_lib_webengine_*.pri which is QtWebEngine QML module. Move configure to core so all features belong now to qt_lib_webenginecore*.pri. Fix global includes to include qtwebenginecore-config*.h. Drop all DEFINES and use QT_CONFIG instead. Cleanup all evil looking includes in headers for webengine and webenginewidgets. Change-Id: Iddbc8bf4487d9a5f0c19a71a9569535083507756 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Use range-based for instead of Q_FOREACHJüri Valdmann2018-06-063-6/+6
| | | | | | | | | | Change-Id: Ibf016b795ff98fddfa29fb5dc63924a2d2159d71 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | RWHVQDW: Remove QGuiApplication::sync() callJüri Valdmann2018-06-041-9/+7
| | | | | | | | | | | | | | | | It is a workaround that is no longer needed. Task-number: QTBUG-64501 Change-Id: I51b7ad0a24cf80ee0c90be0c8c463ceeeee4239e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Michal Klocek2018-05-301-5/+0
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.11' into devAllan Sandfeld Jensen2018-05-291-5/+0
| |\| | | | | | | | | | Change-Id: I9b1f2a0317290f0855da03eca9d26878b7faeb0a
| | * Fix overeager disabling of QActions in QWebEnginePageJüri Valdmann2018-05-191-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some actions, like Copy, are never updated and therefore need to be always enabled. Task-number: QTBUG-68354 Change-Id: I6827ee719ddc55cad3e4359379d1f2980f4b9618 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | | Unify and simplify profile constructorsMichal Klocek2018-05-282-19/+3
|/ / | | | | | | | | | | | | Use one constructor for private profile creation. Change-Id: I57a227b6344b6e308cfd4931986fa1dede75cfce Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Test runJavaScript without JavascriptEnabledJüri Valdmann2018-05-181-1/+2
| | | | | | | | | | Change-Id: I5fef99d3674fe4dee43df79d740988853d144abd Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Michal Klocek2018-05-184-2/+16
|\| | | | | | | refs/staging/dev
| * Fix keyboard focus for speculative RenderFrameHostsJüri Valdmann2018-05-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When encountering a 301 redirect, one render frame/widget is created for the original URL plus one "speculative" render frame/widget for the new URL. Once the speculative frame commits, keyboard focus should switch to the corresponding widget. This doesn't work however, because QQuickItem::forceActiveFocus doesn't give focus to the containing QQuickWidget. Fixed by using QWidget::setFocus. Also changed simplebrowser to focus the QWebEngineView on startup. Task-number: QTBUG-68076 Change-Id: I8dc42ba89bfdcd46a86c7dca357fdf1e94f439d4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Remove old focusProxy widget from layout in RWHVQDW::initAsChildJüri Valdmann2018-05-151-0/+3
| | | | | | | | | | | | Task-number: QTBUG-68224 Change-Id: I317915f0c81531e5858dfa3a76365b16266ce919 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Cleanup pdfium_document_wrapper_qt.h includeAllan Sandfeld Jensen2018-05-151-1/+4
| | | | | | | | | | | | | | | | | | Do not make it depend on a define that could break precompiled headers, instead only included it when it is valid. Task-number: QTBUG-67977 Change-Id: I65f4de89de06d7a35c8dd97e4e9bd92d8c6dca54 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
| * Remove hardcoded size from QWebEngineView::sizeHint()Szabolcs David2018-05-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | 800x600 takes more space than expected when building a layout which contains QWebEngineView. Now this function does exactly the same as QWidget::sizeHint(). Add an auto test and update examples which were depending on this hardcoded size. Change-Id: I3b34b7d37cc99a8d6a49100d6c4b66b5b6a1c999 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Disable drag&drop on eglfs for qml appMichal Klocek2018-05-042-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The drag creates raster window, which on eglfs platform can be problematic. In case of running qml based browser without backing store, this will try to create a backing store during drag event, which will abort on eglfs. Therefore avoid the drag in qml in case the platform does not support multiple windows. This patch has the side effect of disabling drag even when qml runs with backing store, i.e. using QQuickWidget and therefore creating another raster window is not an issue. [ChangeLog][Behavior Changes] Drag&Drop is now disabled for QML based applications, when platform does not support multiple top-level windows (like EGLFS). Task-number: QTBUG-57516 Change-Id: I0c2685ba90914fe1f7168c79744c55e07e589488 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Change BrowserContextAdapter to be QPointerMichal Klocek2018-05-184-19/+43
|/ | | | | | | | | | | | | | | | | | | 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>
* Fix focus after hideAllan Sandfeld Jensen2018-04-181-2/+3
| | | | | | | | | | We are not supposed to set the QWidget as non-visible, this removes the widget from layout and focus, and no other QWidget does that on minimize, instead just set qquickitem as non visible. Task-number: QTBUG-65595 Change-Id: Iefb52243229d11879a7a38c641084c266eef2207 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Make sure we can build with -no-feature-draganddropJoerg Bornemann2018-04-173-0/+11
| | | | | | Change-Id: Ib6763a8a3e1ac1ac98caef39f7e6e75c18344424 Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>