summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/api/qwebenginepage.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * Avoid default casesAllan Sandfeld Jensen2016-04-281-9/+10
| | | | | | | | | | | | | | | | | | Prefer to list all enums to handling defaults, this makes it easier to catch missing cases in the future. Change-Id: Idae2f445bd907f62202a6b68da0d030e21863afe Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * Add missing icon and text for ReloadAndBypassCacheAllan Sandfeld Jensen2016-04-271-0/+4
| | | | | | | | | | | | | | We were not handling this enum value. Change-Id: Ib44b9e42c8b9589513091d2f47c79623416ec358 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-04-251-1/+1
|\| | | | | | | Change-Id: I329397621f19ba3890be5daf44a6bb2d668ad2d8
| * Switch BrowserContextAdapter to QSharedPointerAllan Sandfeld Jensen2016-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | BrowserContextAdapter is not a form of shared data, and using QExplicitSharedDataPointer on it as always been a misuse of the class. Instead we should switch it to QSharedPointer, which also allows us to use QWeakPointer. Change-Id: I8eb489b4a12d3fdddcde55821be294814a156a9d Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
* | Update spellchecker APIsMichal Klocek2016-04-181-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * marks new properties in QQuickWebEngineProfile as FINAL * removes QT_NO_SPELLCHECK from API headers * renames spellCheckLanguages() to availableDictionaries() * removes "togle spellcheck" methods and actions * use WEBENGINE_CONFIG instead of CONFIG for disable the feature at compile time: WEBENGINE_CONFIG+=no_spellcheck Done-With: Peter Varga <pvarga@inf.u-szeged.hu> Task-number: QTBUG-52371 Change-Id: I8c8eff497b9e7afe0cec2edc97dec248151487f2 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Remove "Save Page" web action from the standard context menuJoerg Bornemann2016-04-131-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The SavePage web action is only useful if the user code reacts on the downloadRequested signal. Also, having SavePage available is not useful for e.g. hybrid applications. Extend the demobrowser example to show how to add the SavePage web action to the context menu. Change-Id: I979bcd9f5a25d2cae07ef819663afde17784440b Task-number: QTBUG-52370 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Remove default values for printToPdf callbacks and unify API.Michael Bruning2016-04-131-2/+2
| | | | | | | | | | | | | | Adds default QPageLayout values. Change-Id: Ibf2964ecd86350a51d682e385973f830ac4347a7 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Fix recentlyAudible Widgets and Quick API.Alexandru Croitor2016-04-081-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | Rename all uses of wasRecentlyAudible to recentlyAudible. Add missing recentlyAudible properties. Change QtQuick slots to simple functions. Change affected demobrowser example. Adjust documentation for the API. Change-Id: I5a6f7b8384c0b7e34afaa5c412a5543c210d3ef9 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
* | Fix disabling spell checker supportPeter Varga2016-04-061-0/+2
| | | | | | | | | | Change-Id: I46805d8956815e4d691afd05a69ff16d6a86ad6b Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
* | Add icon property and iconChanged signal to QWebEnginePagePeter Varga2016-03-311-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | The new API makes possible to access downloaded icons via QWebEnginePage. Thus the QNAM usage for downloading favicons and the corresponding workaround due to authentication are removed from the demobrowser. Change-Id: I9fdcc7ee7673f7caa239d932f20a51c74b24763f Task-number: QTBUG-51179 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Make ReplaceMisspelledWord web-actions more genericAllan Sandfeld Jensen2016-03-301-9/+21
| | | | | | | | | | | | | | | | | | Instead of using four numbered web-actions, use a generic method that can be called using the context data. Change-Id: If31c6f572c54d7ecfc7962edea2e27c555e6d79f Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* | Add API for context menu dataAllan Sandfeld Jensen2016-03-301-52/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For QWebEnginePage users to be able to make custom context menu or extend the default context menu, they need information about the context. This patch adds a QWebEngineContextMenuData class that contains contextual information when a context menu is being requested. This is also means we can finally generate a custom context-menu in the demobrowser the same way we did in QtWebKit. Task-number: QTBUG-51079 Change-Id: I695b8cbf648bdc7f119b0ed51ab685cf2f8de8e4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-211-0/+2
|\| | | | | | | | | | | | | | | Conflicts: src/3rdparty src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc Change-Id: I90728e965399e51b626d538924de955f9abab5fe
| * Doc: Mark renderProcessTerminated signal as new in 5.6Kai Koehne2016-03-111-0/+2
| | | | | | | | | | | | Change-Id: I54a9514451c04918faf55516881c9ca720d56dc5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* | Add callback to printing APIMichael Bruning2016-03-161-1/+32
| | | | | | | | | | | | | | Also corrects and updates the printToPDF docs to reflect recent changes. Change-Id: Iffe276a1046d6d55923939f9d72b97cd533017ff Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Move printToPDF to pageAllan Sandfeld Jensen2016-02-251-0/+6
| | | | | | | | | | | | | | | | | | The API needs nothing from view and view just forwards it to the page anyway. This is an page level API, this also makes it work without being shown. Change-Id: I3b8555ab472ec2c7632db3655bcc31925fcfa001 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge "Merge dev into 5.7" into refs/staging/5.7Oswald Buddenhagen2016-02-231-2/+5
|\ \
| * | Fix iconUrl getter and changed signalAllan Sandfeld Jensen2016-02-121-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | We should only emit iconUrlChanged when iconUrl changes, and the return value of iconUrl should match the value of the last emitted change. Change-Id: I70f4d6a11b96d83278dddc4d85e1c78ca82bf5cb Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | | Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-02-201-2/+10
|\ \ \ | |/ / |/| / | |/ Change-Id: If884b8b8bc087a6a726476b49cdb48a0efaa173e
| * Fix WebAction muteAllan Sandfeld Jensen2016-02-131-1/+1
| | | | | | | | | | | | | | | | | | WebAction mute was not working since it was setting its current state instead of the toggling mute. Change-Id: I9572c77e084e11b00f645845764fe13e0a603664 Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * Fix double LoadFinished on URL errorsAllan Sandfeld Jensen2016-02-101-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RenderFrameDeleted was called before DidFinishLoad, which meant m_loadingErrorFrameList was empty and wouldn't detect the page loaded was an error page. Instead this patch relies on the chromium error-page url which we already asserted. Additonally we delay emitting the loadFinished signal until the error page is also done loading, since the error-page can be considered part of the load, and we otherwise have a race condition on toPlainText. Finally we were not getting error-pages when blocking requests because we reported them as aborted them instead of blocked. Change-Id: I945eb838b7f080d4e146f18354e8986e1b88b5cd Task-number: QTBUG-50752 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Rename UserScriptController/Host to UserResourceController/HostSzabolcs David2016-02-101-1/+1
| | | | | | | | | | | | | | These classes can operate user stylesheets too. Change-Id: Ia283af92e52a822b26003ff65e0e7dc391b0904d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Added background tab support to WidgetsAdam Kallai2016-02-101-1/+12
| | | | | | | | | | | | | | | | | | - Added middle click navigation support to DemoBrowser. - Extended WebAction with new case (open a new tab in background). - Updated WebEngineWidgets documentation. Change-Id: I4ff91806c274a74f4d94b3f5d43fdd99ab900d46 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Merge branch '5.6' into devAllan Sandfeld Jensen2016-02-041-3/+23
|\| | | | | | | Change-Id: I0bb971f01ee1e02da768f336680c8ec0254ab2b0
| * Preserve webchannel and userscripts when restoring historyAllan Sandfeld Jensen2016-01-311-2/+12
| | | | | | | | | | | | | | | | | | | | | | Most page-state is set in webcontentsadapter::initialize except user scripts and webchannel. This patch ensures those are initialized too when changing to a new adapter during history restore. Change-Id: I4dca23ddab50480b1a72252a038834ce1802ad77 Task-number: QTBUG-50751 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: David Rosca <nowrep@gmail.com>
| * Fix crash on open link in new windowJoerg Bornemann2016-01-281-1/+3
| | | | | | | | | | | | | | | | | | The default implementation of QWebEngineView::createWindow returns a null pointer. Add missing null pointer check in adoptNewWindow. Change-Id: Ia6138f372ff169b9d32764b15550939adc247a1c Task-number: QTBUG-50718 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
| * Widgets: Improve geometryChangeRequested signalSzabolcs David2016-01-191-0/+6
| | | | | | | | | | | | | | | | | | Use this signal to notify the user on JavaScript window move/resize requests. It works only for windows opened by JavaScript (according to the Chromium browser's behavior). Change-Id: I7fdeda4c252cc4badb36b74ed61d947be690f45a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Add spell checker supportMichal Klocek2016-02-011-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Integrate chromium spell checker: * add spellchecker and dependencies to build * underline misspelled words in html text areas * right-click context menu shows up to 4 options to correct the misspelled word * toggle spell check from context menu * add new qml and widget api calls to qwebengineprofile to enable/disable spell check, select spell check language, get list of supported languages/dictionaries * register new qml spell check properties for QtWebEngine 1.3 * CONFIG+="no_spellcheck" to remove spellcheck support Change-Id: Ie61434ab9493597d7759a6f33794f6859c4e3a4c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Doc: move and edit docs related to QWebEnginePage::audioMutedLeena Miettinen2016-02-011-2/+29
| | | | | | | | | | | | | | | | | | New docs should be placed in the source files. Edited the docs to fix grammar issues and QDoc errors. Change-Id: I9f7b1aadccb8a9eac4f93a63e6ce01da82f71eb2 Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Unify license header usage.Jani Heikkinen2016-02-011-10/+13
| | | | | | | | | | | | | | | | | | Update files using old header.LGPL3 to use header.LGPL Update files using old header.FLD to use new header.FDL Update files using old header.BSD to use new header.BSD Change-Id: I36a67aaa8c3ca6c7946308defc9c03c3571a7d23 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Merge branch '5.6' into devAllan Sandfeld Jensen2016-01-181-21/+35
|\| | | | | | | Change-Id: I038f3544785862f3a2e2f35b8fab0b163e75d542
| * Merge remote-tracking branch 'origin/5.5' into 5.6Allan Sandfeld Jensen2016-01-181-21/+35
| |\ | | | | | | | | | Change-Id: I591be7a7131d85a269bf12fbd5c47a0ccf6ce574
| | * Update license header for qwebenginepage.cpp to LGPLv3Joerg Bornemann2016-01-141-21/+35
| | | | | | | | | | | | | | | | | | | | | This amends commit 3b4eec9b. Change-Id: I19e8a295fa7e64ff83c26b6965097bd0ae3cbf73 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | | Add API to set WebChannel on isolated worldAllan Sandfeld Jensen2016-01-151-6/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it possible to set a web-channel so that it can only be accessed by private scripts. Pulls in needed API extension in 3rdparty. Task-number: QTBUG-50318 Change-Id: I61bcce5c318dffe0a406ee8cddf31f58a021c22c Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | | Merge branch '5.6' into devAllan Sandfeld Jensen2016-01-121-0/+22
|\| | | | | | | | | | | Change-Id: I4272eb59cac08c69eaa58dd4d94debf1b8c5cf78
| * | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2016-01-071-0/+22
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty src/webenginewidgets/api/qwebenginepage.cpp src/webenginewidgets/api/qwebenginepage_p.h Change-Id: I050b4c7691a070e04cace2663ad633903f6d96a9
| | * Fix MouseMove event handling when opening a new tab with middle click.Alexandru Croitor2015-12-221-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When opening a new tab by middle clicking on a link in a web page, two MouseMove events are sent to Chromium consecutively, without getting proper acknowledgment events, which causes further move events not to be handled properly. Fix consists in preventing the second move event from being sent. Change-Id: Ia0a64698476226e472faa53f75b51dfb6ed477c9 Task-number: QTBUG-50031 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | | Add methods for running javascript in isolated worldsAllan Sandfeld Jensen2016-01-081-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | We exposed javascript worlds for user-scripts, this adds variants of runJavaScript that can access those worlds. Change-Id: I5a0b40b863b543cd364c902d0a84ae2c35e2a0b8 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | | Implement drag and drop supportJoerg Bornemann2016-01-031-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a QDrag for drag and drop operations that are started in the web page. React on drag and drop event of QWidget and QQuickItem. Task-number: QTBUG-43008 Change-Id: If09f09de6e6d5b5f02835985a17cc6bc3262f411 Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | | Add support for checking if audio is played in a page.Alexandru Croitor2015-12-151-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for checking if audio is played in a page, as well as the ability to (un)mute the audio. Modify demobrowser example to show (muted) in the tab title, if the tab is muted, or (audible) if there is audio playing in the tab. Fix HTML5 audio/video (un)mute to also work. Change-Id: I7213645e67be2f9da1c5f96cdf6c7eef5341ae4b Task-number: QTBUG-48788 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | | Add web action for saving the current web pageJoerg Bornemann2015-12-111-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | Add the possibility to save web pages as single HTML file, complete HTML (with resource directory) or MHTML archive. Change-Id: Ic7e7cfda9432f3534c13350a6369d79bb17fd8b3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | | Add support for html color inputAdam Kallai2015-12-021-0/+16
| | | | | | | | | | | | | | | Change-Id: I501125631946f70aae1ff039b0e5bcb9198e7242 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | | Doc: QWebEnginePage::scrollPosition and contentsSize as propertiesLeena Miettinen2015-12-011-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | QDoc automatically generates documentation for the access functions and notifier signals. Change-Id: Ic9b9ef54acfdac1b3e8ce6c65e89657b2fe3d5ff Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | | Merge branch '5.6' into devAllan Sandfeld Jensen2015-11-201-10/+38
|\| | | | | | | | | | | Change-Id: I05fe27b8321944cf68cc96dfa9dfcaeb54c8c8cd
| * | Make QWebEngineFullScreenRequest const correctKai Koehne2015-11-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let QWebEngineFullScreenRequest be logically const-correct. It feels weird to be allowed to call "accept()" or "reject()" on a constant object. Also allow the user to copy the request, but check whether the page is still valid in the implementations of accept(), reject(). Change-Id: Ibf139a126734fc8e2db68ec26dc8f24cd4438942 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * | Print JS console messages by defaultKai Koehne2015-11-061-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the behavior of QWebEnginePage/WebEngineView to print JavaScript console.warn and console.error messages by default in a 'js' logging category. This matches also the behavior for QtQml, where console messages end up in a 'qml' logging category by default. So far access to the JavaScript console required either use of the remote debugging functionality, subclassing of QWebEnginePage, or implementing a custom handler. Anyhow, even then writing a seamless forwarding of the data and metadata to the Qt message handler is difficult. This patches implements this forwarding by default. The behavior can be changed by either setting up rules for the 'js' category, e.g. setFilterRules("js.*=false"); or by implementing onJavaScriptConsoleMessage(), or overriding QWebEnginePage::javaScriptConsoleMessage. [ChangeLog] Unhandled JS console messages are now forwarded to to the Qt message handler inside a 'js' category. Change-Id: I5480383a80dcf7a122496f9b7915264ef9036db3 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * | Ensure WebContents::WasShown/WasHidden are calledAllan Sandfeld Jensen2015-11-061-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Forward WebEngineView visibility to WebContents visibility, and call WebContentsView visibiliy on actual show/hide events to avoid a recursion when WebContents visbility triggers it. Change-Id: I0c336359fb35bf93874aa1092767177d7a5ce341 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
| * | Improve documentation for QWebEngineScriptKai Koehne2015-11-051-2/+6
| | | | | | | | | | | | | | | Change-Id: I9274a3cacaa04529152a5d827c47cf6fc831df19 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * | Merge branch '5.5' into 5.6Allan Sandfeld Jensen2015-11-041-2/+1
| |\| | | | | | | | | | Change-Id: Ibc8ec5ab77ef27bede6e4af1e6318378ac6b9899
| | * Do not display context menu when pending event flag is false.Michael Bruning2015-10-291-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an event filter is installed on the view, the right mouse click event may trigger Chromium to request a context menu even though the context menu events get filtered out. Removes a Q_ASSERT that would now never be triggered. Change-Id: I3ff496ec4e4ecbb4faa107f7e221765918c5fa06 Task-number: QTBUG-49092 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>