summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets
Commit message (Collapse)AuthorAgeFilesLines
* Fix crash when accessibility is disabledAllan Sandfeld Jensen2017-06-232-4/+0
| | | | | | | | | | | | | With the no-accessibility feature moved to qtgui-config, we don't always include it where web_content_apapter_client.h is included, which gives it an inconsistent binary layout. Solve it by making the optional method always defined as it doesn't rely on anything from accessibility. Task-number: QTBUG-61200 Change-Id: I65f34ab2b6763f3166b945e700994bd8d019a835 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix cancellation of UploadFolder dialogsSzabolcs David2017-06-161-1/+1
| | | | | | | | | | | Remove the extra "/" element from the list of results and pass an empty file list to the backend. Task-number: QTBUG-61186 Change-Id: Ib2c577c15502e8d1506948e9683921ed211b9c48 Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Doc: Mark globalSettings() obsolete in QWebEngineSettingsLeena Miettinen2017-06-092-26/+14
| | | | | | | | | Replace references to global settings with references to the profile that the page belongs to. Task-number: QTBUG-57349 Change-Id: I19a2bf999608f2d4f7b565ea50bac1cbf9690c46 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Override shortcuts only when an HTML input field has focusJoerg Bornemann2017-06-081-16/+3
| | | | | | | | | | | | | | | | Otherwise an application shortcut like Shift+Delete would no longer work when webengine has focus (e.g. "delete mail" in KMail) This removes unconditional calls to editorActionForKeyEvent for ShortcutOverride event handling. We can remove those, because the key sequences that are checked by editorActionForKeyEvent are a subset of the key sequences checked by isCommonTextEditShortcut. This amends commit 3902b27e. Change-Id: I12a98368381edef36f11457c8b864d843efb871a Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Store Target URL in WebContentsDelegateQt::WebContentsCreatedViktor Engelmann2017-05-302-2/+3
| | | | | | | | | | | | | | | | | | | | | | | When opening a new window, for example by using the JavaScript method window.open('...'), the requested url is not stored in the content::WebContents object we get in WebContentsDelegateQt::createWindow (at this point, it should at least be stored as pending request in the WebContents' NavigationController, but it is not). Because of this, the QQuickWebEngineNewViewRequest object in QQuickWebEngineViewPrivate::adoptNewWindow never contained the url. We have access to the target url in WebContentsDelegateQt::WebContentsCreated, so now we store it there in a new property m_initialTargetUrl, from where WebContentsDelegateQt::createWindow takes it and passes it to WebContentsAdapter::adoptNewWindow as a new parameter. [ChangeLog][WebEngine] Fix WebEngineNewViewRequest::requestedUrl being empty when opening window from JavaScript Task-number: QTBUG-57675 Change-Id: I7e2c7866899baade17ce2517e6be8b2b2709699e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.9.0' into 5.9Allan Sandfeld Jensen2017-05-293-13/+5
|\ | | | | | | Change-Id: Iba6114263488d6bf84b255b38182904dc5880386
| * Remove interruptReasonChanged signalKai Koehne2017-05-152-13/+1
| | | | | | | | | | | | | | | | | | | | Users should instead listen to stateChanged - we assume that the reason does not change independently of the state. Change-Id: I369f1c537013f0b9988c0d9bef4855d97e9b8736 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
| * Fix crash on exit with url-request interceptorsAllan Sandfeld Jensen2017-05-081-0/+4
| | | | | | | | | | | | | | | | | | | | If the interceptor is the child of the profile, they will be deleted with the API profile which is before the underlying browser-context, they should therefore be unset from the browser context first. Task-number: QTBUG-60236 Change-Id: I2954e8106863b8b421ef166f6bf8fa79240c95ee Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Show "Follow link" context menu item for links without textJüri Valdmann2017-05-171-1/+1
|/ | | | | | | | The standard context menu currently doesn't have the "Follow link" item for e.g. the image links on https://www.qt.io . Change-Id: I5b9d620135c7a8e65bd95a0ab07a76278e56cad0 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Doc: Add info to QWebEngineDownloadItem::downloadProgress docsLeena Miettinen2017-05-041-2/+6
| | | | | | | | | The documentation was not very informative when compared with the docs for the similar QNetworkReply::downloadProgress signal. Task-number: QTBUG-56979 Change-Id: Icade60317a7b3fd8aaa37770c60ce8f4f947382b Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Override shortcuts in HTML input fieldsJoerg Bornemann2017-04-251-2/+19
| | | | | | | | | | | | | | | | | | | When users defined a single-letter short cut it was not possible to type this letter in HTML input fields. Fix this by accepting ShortcutOverride events whenever the web page is editing text. Use QInputControl::isCommonTextEditShortcut for Qt 5.9 and later. For the case where QtWebEngine is built against an older Qt a duplicated code path is used. Also, ensure users do not override web action short cuts. Task-number: QTBUG-59053 Change-Id: Ic26cf2a040a72b118273c6645c00b2913b995b0b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Add class name to function signatureLeena Miettinen2017-04-251-1/+1
| | | | | Change-Id: I95547a19dfa4dc375f93b2c6c1bfdefc05d07a51 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Handle the case when printing result does not contain any dataMichael Brüning2017-04-041-0/+11
| | | | | | | | Failing to do so would trigger an assert in the PDFium wrapper's constructor. Change-Id: Iaa53b1baa54e6483a4e7e9985ad841ac3cfef940 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* [Doc] Add doc link between methods for request filteringMichael Brüning2017-03-301-0/+3
| | | | | | | | | | Adds a doc link between QWebEngineUrlRequestInterceptor and QWebEnginePage Task-number: QTBUG-54507 Change-Id: Ic9aa535fbf19c7c5ccf279ee660adf180057b56b Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Call javaScriptConfirm for unload dialogsFlorian Bruhin2017-03-282-1/+4
| | | | | | | | | | | | | This unfortunately means we lose the ability to customize the title with the default implementation, but it's still better than having a QMessageBox hardcoded without being able to customize this behavior at all. [ChangeLog][Qt WebEngineWidgets][QWebEnginePage] The javaScriptConfirm method is now also called for unload dialogs (onbeforeunload handlers). Task-number: QTBUG-58673 Change-Id: I82393da2593dc84e94d577ff28f5d6d8988df552 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Include Q_ENUM on QObject interface classesAleix Pol2017-03-272-0/+10
| | | | | | | | | | Adds useful metadata [ChangeLog][General] Use Q_ENUM on QtWebEngineWidgets interfaces Change-Id: Iac30298666b560f1ec62adde980d4eff25b49736 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Forward input method events to RWHV in widgetPeter Varga2017-03-271-0/+9
| | | | | | | Task-number: QTBUG-58362 Change-Id: Id4cf57c60da17538b224bb9bc91277c324c6a55d Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Rename WebCoreVisitedLinksManager to VisitedLinksManagerQtAllan Sandfeld Jensen2017-03-261-1/+1
| | | | | | | | Rename to follow our standard naming. This class was one of our oldest and probably predates our standard naming convention. Change-Id: I32dfbad9611b789ad13114d9692b07045806f7c0 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Michael Brüning2017-03-243-4/+6
|\ | | | | | | Change-Id: I8a281e308ec1a6e93dc9756ba6399ca1b50210d8
| * Delegate QWebEngineHistory::currentItem() to itemAt()Viktor Engelmann2017-03-211-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | Calling QWebEngineHistory::currentItem() before the first item is inserted, caused a segfault, due to accessing an illegal QList index. We now delegate the lookup to QWebEngineHistory::itemAt(), which checks the index first and returns a dummy element in case of an illegal index. Task-number: QTBUG-59599 Change-Id: I9cdd2533e33415a7b812c29fff5429eb005020dc Reviewed-by: Michael Brüning <michael.bruning@qt.io>
| * Remove stale parent connection when initializing delegate as a childMichael Brüning2017-03-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When clicking on a blank link target, the constructor of the RenderWidgetHostViewQtDelegateWidget instance for the newly created view is called with the originating QWebEngineView as its parent and will connect its removeParentBeforeParentDelete slot to the originating view's destroyed signal. This leads to the situation where the delegate's parent will be set to null when the originating view is closed, causing the view to display only an empty widget with the actual web contents remaining live in the background. This patch removes the connection to the old view when initializing the delegate as a child of the QWebEnginePagePrivate instance. The addition to the layout updates the parent and child relationship between the view and the delegate internally. Task-number: QTBUG-58381 Change-Id: I448380478c2bcfcfbddaee8a35caf46010e57972 Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Improve cross-links between QtWebEngine classes in docsFlorian Bruhin2017-03-081-1/+2
| | | | | | | | | | | | Change-Id: Iae853d4d3ab73306f90d93b62a419d1d440a3259 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-101-2/+3
|\| | | | | | | Change-Id: I6a39d1ec0ffc0394fbb472ab1df2963ed5c69ec7
| * Clarify JavascriptCanAccessClipboard documentationFlorian Bruhin2017-03-071-2/+3
| | | | | | | | | | | | | | | | | | Chromium always allows copying to clipboard (even when this is disabled) if it's resulting from an user interaction. Change-Id: I0363b892fef6ce015a2f8ae9b89423e1655b516c Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Remove erroneous CONSTANT attributes from the public widgets APIAlexandru Croitor2017-03-072-7/+7
| | | | | | | | | | | | | | | | Even though the touched properties don't have Q_PROPERY modifieds or changed signals, the values can still be changed by internal code. Change-Id: Idb235dde0466f819b9c78835a8d7ad36092d2623 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Allan Sandfeld Jensen2017-03-026-10/+19
|\| | | | | | | Change-Id: Iff6ab3c287c58d8ec84a1513460bfce5218e8a61
| * Fix crash on context menuAllan Sandfeld Jensen2017-02-222-1/+2
| | | | | | | | | | | | | | | | | | | | Instead of calling deleteLater, just tell close to delete the menu itself. Task-number: QTBUG-59080 Change-Id: I3eae382781f813ed3c6f27b78088b94ed1c486dd Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
| * Use Qt::ToolTip as window type for dropdown popusFlorian Bruhin2017-02-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 58467ed1950ee070d0907cbdabb8466aba277305, the window type for dropdown popups was changed from Qt::ToolTip to Qt:Tool to fix issues when using a QWebEngineView inside a modal dialog on macOS. However, this causes a separate window to pop up at least under Linux, so we use Qt::ToolTip again there. Task-number: QTBUG-58488 Task-number: QTBUG-58544 Change-Id: I951b91980be89a37ee07b19fca684d13b6098af0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
| * Abort findText when destroying QWebEnginePageViktor Engelmann2017-02-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | In the destructor of QWebEnginePage and QQuickWebEngineView, we now call adapter->stopFinding() to suppress callbacks that would cause segmentation faults if a findText request is still active at that point. Task-number: QTBUG-58563 Change-Id: I9d5d8407ee6c28cd76bf6ecf0b62808394e151cd Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
| * Fix empty dialogs on window.onbeforeunloadSzabolcs David2017-02-211-1/+1
| | | | | | | | | | | | | | | | | | Custom texts are not supported anymore in unload dialogs. Fill them with a better message. Task-number: QTBUG-58673 Change-Id: I820155452461db90bf1df2ae8a8ec10ee752aab1 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Fix QWebEngineView::setFocus to properly set internal QQuickItem focusAlexandru Croitor2017-02-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The widgets object hierarchy related to focus goes like this: QWebEngineView's focus proxy is -> RenderWidgetHostViewQtDelegateWidget, which has an internal QQuickRootItem defined by QQuickWidget, and the child of the item is -> RenderWidgetHostViewQuickItem. Previously when QWebEngineView::setFocus was called, the focus was set on the RenderWidgetHostViewQtDelegateWidget and the QQuickRootItem, but not on the RenderWidgetHostViewQuickItem. This caused for e.g. an active HTML text input not receiving focus. Make sure the RenderWidgetHostViewQuickItem is marked to have focus within its root item, so that if the root item receives active focus, so will RenderWidgetHostViewQuickItem receive it. Task-number: QTBUG-58515 Change-Id: I175610e3dfebc03733aefe26c16f47096df8ff5b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Doc: Fix stray 'is' in featurePermissionRequest documentationKai Koehne2017-02-101-2/+2
| | | | | | | | | | Change-Id: Ia5629808a274b2a551bdf70517b24e9be8deb748 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| * Doc: Fix \sa links in the docsLeena Miettinen2017-02-094-6/+6
| | | | | | | | | | | | | | | | - Leave out the class name for the members of the class - Add brackets in the end of method names Change-Id: I5429be5620c5c192aa872d94ab047eebe39a13da Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-252-0/+6
|\| | | | | | | | | | | | | | | Conflicts: src/3rdparty tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp Change-Id: I070173576fc4be53689ce0dd9e1fd4133f5814da
| * Make input method hints available via RWHV delegate widgetPeter Varga2017-01-202-0/+6
| | | | | | | | | | | | | | | | | | Moreover, set ImHiddenText hint for password fields and add back the corresponding widget auto test. Task-number: QTBUG-55766 Change-Id: I3f76e19c8c33e11f3d9f515b6dc7d6e998c3c9a4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add print and pdf feature to new configure systemMichal Klocek2017-01-164-20/+31
| | | | | | | | | | | | | | | | | | | | | | | | Currently printing and pdf are bounded together. Make compilation optional by adding it as a feature. Fix formatting of embedded_linux.pri Task-number: QTBUG-57731 Task-number: QTBUG-58108 Change-Id: I53a2baea656df0a5b6139365ed06385c9ebc5830 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add methods for textual description of DownloadInterruptReasonViktor Engelmann2017-01-122-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A method was added to get a textual description of a Q(Quick)WebEngineDownloadItem::DownloadInterruptReason. Basically returns the same description from the QDoc entry, but shortened where that was to long. Also moved the ASSERT_ENUMS_MATCHes from download_manager_delegate_qt.cpp to the newly created browser_context_adapter_client.cpp. Task-number: QTBUG-56839 Change-Id: I17c68987b7f12fcaeb71fd27f7ebb35c0ac87bac Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add methods to issue various types of HTTP requestsViktor Engelmann2017-01-115-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | Added class QWebEngineHttpRequest, which describes a GET or POST HTTP Request. Also added overloads of method "load" to QWebEngineView, QWebEnginePage and WebContentsAdapter, which issue such a request. These can be used for example to simulate form-submissions. Task-number: QTBUG-53314 Task-number: QTBUG-53372 Change-Id: I85ac8cdd3d1557905b35e3172b922aba356d1c41 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Emit a new signal when printing to a PDF file finishesMichael Brüning2017-01-103-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Important Changes] Printing to a PDF file will now emit signal the signal pdfPrintingFinished in both QQuickWebEngineView and QWebEnginePage. The boolean passed with the signal to indicate if the printing and saving of the PDF was successful. The path of the created file is also passed to enable the user to map the signal to a print request. Task-number: QTBUG-56677 Change-Id: Ifab5a20b048f33a8cd872165bd4d453b01708037 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | QML: Add FINAL, CONST to Q_PROPERTY declarationsViktor Engelmann2016-12-193-9/+9
| | | | | | | | | | | | | | | | | | Add FINAL and CONST declarations for every Q_PROPERTY where it is appropriate. This speeds up the execution in QML. Task-number: QTBUG-55912 Change-Id: I67d2223d87aee6bdc639fe6087e3364201f2b1c6 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.8' into dev" into refs/staging/devLiang Qi2016-12-076-19/+216
|\ \
| * | Merge remote-tracking branch 'origin/5.8' into devMichael Brüning2016-12-076-19/+216
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty Change-Id: Ie7b7c469aa24716816a23b8fe7a8df9f477a9f67
| | * Merge remote-tracking branch 'origin/5.8.0' into 5.8Michael Brüning2016-12-052-1/+9
| | |\ | | | | | | | | | | | | Change-Id: Ifa26409c722bd4eb373b9ced55f5a58132702ad5
| | | * Fix build when PDF support is disabledPeter Varga2016-12-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wrap unused parameters. Change-Id: Iac550783a55b3fc585db6f7b8241aa2ae89fdf2e Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | | * Fix build with -no-opengl configured QtMichael Brüning2016-12-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit e2541ebdfadea0fe43baac748cfa9e07f3b57215 introduced an unguarded reference to QOpenGLContext. Guard it with the appropriate flags. Task-number: QTBUG-57374 Change-Id: Ic9f0cc3c99aabd52813d8b828f1a51ca6871d4b4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * | Fix keyboard focus of RWHVQDW after popupPeter Varga2016-11-291-0/+7
| | |/ | | | | | | | | | | | | | | | Task-number: QTBUG-56652 Change-Id: I1a6655587a9104dd817332e2eb5f886c057d8f64 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Fix multiple copy handling while printingMichael Brüning2016-11-251-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both the printer code and the webengine printing code were producing the number of requested copies. So if n copies were requested, n*n copies of the document were printed. Task-number: QTBUG-56722 Change-Id: I34bce2d61041e1234139139dcd70b7b3d1c7cd7b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Move the QPrinter and QtWidgets related code out of the PDFium wrapperMichael Brüning2016-11-253-10/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the actual printing using QPrinter to the WebEngineWidgets part of the API. The printsupport module depends on the widgets module and therefore QtWebEngineCore also had a dependency to widgets. This is removed by this change. Change-Id: If6e5745709a59de18f2123b930cbe6e64390c867 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
| | * Merge remote-tracking branch 'origin/5.7' into 5.8Allan Sandfeld Jensen2016-11-254-9/+43
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty Change-Id: Ib9c9eca457c1c42dab948e6cb56d44b57d5da32a
| | | * Merge branch '5.6' into 5.7Allan Sandfeld Jensen2016-11-243-2/+31
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/core/api/qwebengineurlrequestinfo.cpp src/core/api/qwebengineurlrequestinfo.h src/core/core_gyp_generator.pro Change-Id: I5c78f0c86f6dcd61697148f0729d3d3a2cb2c76f