summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets
Commit message (Collapse)AuthorAgeFilesLines
* Support Quota Management APISzabolcs David2017-09-136-0/+193
| | | | | | | | | | | | | | | Expose navigator.webkitPersistentStorage.requestQuota() calls to the API layer as a permission API. It allows the users to accept these requests and specify a quota for persistent storage. https://developer.chrome.com/apps/offline_storage#managing_quota [ChangeLog] navigator.webkitPersistentStorage.requestQuota() calls were rejected by default and now they will emit signal quotaPermissionRequested in both WebEngineView and QWebEnginePage. Task-number: QTBUG-56354 Change-Id: Id192577ffb403694d3051414744ded89bbfd2aa8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add https to list of internal schemesViktor Engelmann2017-08-301-1/+2
| | | | | | | | | | | | | Since https is an internal scheme, it should be in this list of internal schems. This also prevents custom custom QWebEngineUrlSchemeHandlers to register "https". Although it is debatable whether this is necessary, https should be held to at least the same security standards as http, which is also in that list. Task-number: QTBUG-56894 Change-Id: I83d0130541fe3b5831bf29d429bad89a8fc5408c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devAllan Sandfeld Jensen2017-08-141-2/+1
|\ | | | | | | | | | | Includes sha1 bump of src/3rdparty to head of 58-based. Change-Id: I37743c3979c1b6fb21f71eab7048e82f7aa5d78b
| * Doc: Align QtWebEngineWidgets overview with the one for the QtWebEngine moduleKai Koehne2017-07-191-2/+1
| | | | | | | | | | Change-Id: If4db465b9764be80df7fe953be63fc1a40b60d75 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Remove support for building with Qt versions < 5.8.0Allan Sandfeld Jensen2017-08-044-45/+0
| | | | | | | | | | Change-Id: I2f2ba754111e198298b7d1a595343fcd773e05e5 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Reorder documentation for QtWebEngine dictionary discoveryFlorian Bruhin2017-08-041-28/+2
| | | | | | | | | | | | | | | | | | | | This also adds documentation for QTWEBENGINE_DICTIONARY_PATH from my previous change. Change-Id: I85cd7476c095d5427e2db3a909449838a2362b81 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Add HideScrollbars settingPeter Varga2017-08-023-1/+7
| | | | | | | | | | | | | | [ChangeLog][Settings] Added setting to hide scrollbars. Change-Id: I17695bb54a460621358345d303302b93eb342696 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Remove DemoBrowserJüri Valdmann2017-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | [ChangeLog][Examples] Removed WebEngine Demo Browser example, which got superseded by the improved WebEngine Widgets Simple Browser. Task-number: QTBUG-59819 Change-Id: I214e6f5f3a946ed617a9f4d628d3259a69874ca1 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add method for triggering downloadsFlorian Bruhin2017-07-193-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | The method download(const QUrl &url, const QString &suggestedFileName) already exists in WebContentsAdapter. It is now accessible through a corresponding method in QWebEnginePage. [ChangeLog][QtWebEngineWidgets][QWebEnginePage] New QWebEnginePage::download() method to start custom downloads for a web page. Task-number: QTBUG-55944 Change-Id: I185ec69c1668b377a129bc9fc09963278e52de1e Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Cleanup support for desktop captureJüri Valdmann2017-07-173-38/+70
| | | | | | | | | | | | | | | | | | - Use feature permissions system instead of hard-coded dialog. - Add QML test for getUserMedia() and extend existing widgets test. Task-number: QTBUG-60832 Change-Id: I533bed5021b3b0ee199b8abc6ddbd516cbd14ff6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devKai Koehne2017-07-111-0/+2
|\| | | | | | | Change-Id: Idffd0c603f7925b8b9b037ce2d63cb13e964c20e
| * Call stopFinding, when navigating awayViktor Engelmann2017-07-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | When one searches for text on one page and then navigates away, results for the search-term are also highlighted on the new page. To stop this from happening, we now call adapter->stopFinding() when we navigate away from a page. Task-number: QTBUG-61506 Change-Id: I09e064d7788b12eae0a67c01e4f5872d94924617 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devAllan Sandfeld Jensen2017-07-057-65/+29
|\| | | | | | | Change-Id: Ida702fd5fa05a32d6cd7fc737aa061da74b675a0
| * Always compile QWebEnginePage::printJüri Valdmann2017-06-262-16/+2
| | | | | | | | | | | | | | | | | | | | | | - Remove two out of five layers of ifdefs around and inside this method. - Now always compiled but will yield an error if printing is disabled. - Remove printing-related ifdefs from demobrowser. Task-number: QTBUG-61510 Change-Id: I79781189d3d3fb62db0a2216b2b989e3fa1d1f86 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Rolf Eike Beer <eb@emlix.com>
| * Merge remote-tracking branch 'origin/5.9.1' into 5.9Liang Qi2017-06-242-4/+0
| |\ | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/functions.prf Change-Id: I53d65ea49f546c7d4aadfdaff178fd2f3f4cdf11
| | * 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>
| * | Doc: Describe size limit for QWebEnginePage::setHtml()Leena Miettinen2017-06-201-0/+6
| |/ | | | | | | | | | | | | | | | | | | The page content is used as a URL, which is limited to 2 MB by Chromium. Task-number: QTBUG-59369 Change-Id: Id0b81b577d1d997dd722c43e3b71b8979d86ee81 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Viktor Engelmann <viktor.engelmann@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>
* | Don't disable local storage for offTheRecord profilesFlorian Bruhin2017-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chromium has local storage enabled in icognito windows, and simply doesn't persist it to disk. QtWebEngine seems to do the same when local storage is enabled in an off-the-record profile, so there's no reason to disable it by default. This also matches the behavior in Chromium (and Firefox, but not Safari). [ChangeLog] HTML 5 local storage is now enabled by default (but residing in memory) in off-the-record profiles. Change-Id: I0cb7e946575a53471ffed9d3324b3ae4c2e80eee Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Implement pause and resume action in Download ItemsAllan Sandfeld Jensen2017-06-235-16/+82
| | | | | | | | | | | | | | | | | | Adds the ability to pause downloads, and resume paused or interrupted downloads. Task-number: QTBUG-56840 Change-Id: I018bd30c3a772a36d48e4154d94f69cb8d8319e4 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Navigation event adaptations for Chromium 58Allan Sandfeld Jensen2017-06-141-1/+0
| | | | | | | | | | Change-Id: Ieef29fa09c8b4733737840ce6260ac6e87e7dca0 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Adaptations for Chromium 57Allan Sandfeld Jensen2017-06-141-0/+1
| | | | | | | | | | Change-Id: Ia2756c1e9b13839c2330bd98cf953d47cbdac0dd Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Fix copying JavaScript URLsSzabolcs David2017-06-072-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Wire unfiltered link URL to the API layer. [ChangeLog][QtWebEngine] linkUrl member of QWebEngineContextMenuData and ContextMenuRequest was previously returning with "about:blank" in case of non-standard URLs. Now it contains the unvalidated URL and CopyLinkToClipboard action has been fixed to handle such URLs (like javascript:) correctly. Task-number: QTBUG-59307 Change-Id: I2e49767e1cc9ec8324d230c1bf346e21d7b8d9bb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devAllan Sandfeld Jensen2017-05-304-16/+12
|\| | | | | | | Change-Id: I962033871a1ef624807a4e1869fe869406aa73f7
| * 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>
* | Handle ViewHostMsg_Focus message from chromiumViktor Engelmann2017-05-244-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling the method window.focus() in javascript causes chromium to send a ViewHostMsg_Focus message, which is received by RenderViewHost, which then calls RenderViewHost::OnFocus. This calls WebContentsDelegate::ActivateContents, which does nothing in the default implementation. We now override this method in WebContentsDelegateQt::ActivateContents and call Focus() on the WebContents object IF the new WebEngineSettings value AllowWindowActivationFromJavaScript is true (by default, it is false). This in turn calls QWebEnginePagePrivate::focusContainer. The WebEnginePage now calls QWidget::activateWindow() in addition to QWidget::setFocus, to make sure the window is also activated (which it might not be, if multiple windows are open). For the QML side, a new boolean Property allowWindowActivationFromJavaScript was added. Task-number: QTBUG-58800 Change-Id: Iabf5d4d15236c77838a3886de81e9dafcaf49f5d Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-023-4/+38
|\| | | | | | | | | | | | | | | | | | | | | src/3rdparty used sha1 from 5.9, because both 5.9 and dev are using same branch now. Conflicts: src/3rdparty tests/auto/widgets/qwebenginepage/BLACKLIST Change-Id: I16a33e0f91779d1ee3a230070ff4248699c2e1bd
| * 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>
* | Put JavaScript commands for WebActions in QStringLiteralViktor Engelmann2017-04-281-12/+12
| | | | | | | | | | | | | | | | | | | | | | QWebEnginePage::runJavaScript and QQuickWebEngineView::runJavaScript have QString parameters. Passing raw strings causes them to be passed to the deprecated QString constructor, which causes warnings in the compilation. Change-Id: I072149ca85c94b2b94c7b5d9aa198eddd47460e8 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add several QtWebKit WebActionsViktor Engelmann2017-04-033-0/+129
|/ | | | | | | | | | | | | | | Add WebActions ToggleBold, ToggleItalic, ToggleUnderline, ToggleStrikethrough, AlignLeft, AlignCenter, AlignRight, AlignJustified, Indent, Outdent, InsertOrderedList and InsertUnorderedList. All use the javascript document.execCommand with parameters according to https://developer.mozilla.org/de/docs/Web/API/Document/execCommand Task-number: QTBUG-59221 Change-Id: Ife18d660fefa2073351c5ad959611ec47b680dc6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@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>