summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/api/qwebenginesettings.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move qwebenginesettings to coreMichal Klocek2020-09-021-246/+0
| | | | | | | | | Just moves qwebenginesettings to core. [ChangeLog] QWebEngineSettings is moved to QtWebEngieCore Change-Id: I7f623bce98213669a4b844f3377aa13e7f3dbd96 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Remove default qwebenginesettings getterMichal Klocek2020-09-021-10/+2
| | | | | | | | | | | Remove defaultSettings() from qwebenginesettings and drop dependency on qwebenigineprofile in qwebenginesettings, let's see if we can also get rid of default profile later. Remove deprecated method globalSettings(). Change-Id: Ibccca50af237ed6a3dd32137d34f8e7e0e7357f3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix capitalisation of letters for PDF viewer settingMichael Brüning2019-03-191-2/+2
| | | | | | | | PDFViewerEnabled is renamed to PdfViewerEnabled. Task-number: QTBUG-74543 Change-Id: I48a242a52ab0689b06815ac3cbd98c44902cc358 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Add a setting to control if the PDF viewer is enabledMichael Brüning2019-02-221-1/+2
| | | | | | | | | | [ChangeLog] Introduces a setting to control if the internal PDF viewer is enabled. By default, PDF documents will now be opened in the viewer instead of being downloaded. Change-Id: I78b3b3702ae3be3da58c9635720ba861db3de661 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add DNS prefetchingAllan Sandfeld Jensen2018-08-011-0/+2
| | | | | | | | | | | 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>
* Expose JavascriptCanPaste attributeKai Koehne2018-02-021-0/+2
| | | | | | | | | | | | Expose an attribute to enable the execCommand("paste") functionality, which is by default disabled due to security concerns. [ChangeLog][General] Added JavaScriptCanPaste attribute that enables JavaScript 'execCommand("paste")'. Task-number: QTBUG-64056 Change-Id: I1a414021e020473dd15946fff91fb103d871e961 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Expose an option to hide internal IP addresses from WebRTCAllan Sandfeld Jensen2017-11-291-0/+2
| | | | | | Task-number: QTBUG-57505 Change-Id: I8d8f906311ce94b2d9df67cb4479b70c8961c3a6 Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io>
* Add setting to inhibit autoplay until user interactionAllan Sandfeld Jensen2017-11-021-0/+2
| | | | | | | | | | | | Pass through the PlaybackRequiresUserGesture Chromium setting which Chrome enables by default on Android. Task-number: QTBUG-60799 Change-Id: I105fc7d558f9b67417a0047ecb1efe7677817ea4 Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-221-2/+2
|\ | | | | | | | | | | | | | | Conflicts: src/webengine/api/qquickwebenginesettings_p.h src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc Change-Id: I9cac7059557084a575af02782af886f55a8d404f
| * Replace Setting HideScrollbars by ShowScrollBarsViktor Engelmann2017-09-201-2/+2
| | | | | | | | | | | | | | | | | | Positive options are more intuitive and make for a better API. Task-number: QTBUG-63179 Change-Id: I632ee768dba52554e7d37d9da84661a1d01f1f37 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Add Setting to allow passing unknown URL schemes to QDesktopServicesViktor Engelmann2017-09-181-1/+24
|/ | | | | | | | | | | | | | | | | | A new enum UnknownUrlSchemePolicy was added to WebEngineSettings, QWebEngineSettings and QQuickWebEngineSettings. WebContentsDelegate now has a new attribute of that type, which can be read and written through the public APIs Q(Quick)WebEngineSettings::unknownUrlSchemeNavigationPolicy and Q(Quick)WebEngineSettings::setUnknownUrlSchemeNavigationPolicy. This way, one can control, whether URLs with unknown schemes are passed to QDesktopServices. WebContentsAdapterClient::navigationRequested is called on these requests, so this allows more fine-grained control over the schemes and origins, that are allowed. Task-number: QTBUG-58627 Change-Id: Ie81d9503456d63ea1ed5606483254acf437cd8f7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add HideScrollbars settingPeter Varga2017-08-021-0/+2
| | | | | | | [ChangeLog][Settings] Added setting to hide scrollbars. Change-Id: I17695bb54a460621358345d303302b93eb342696 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devAllan Sandfeld Jensen2017-07-051-3/+3
|\ | | | | | | Change-Id: Ida702fd5fa05a32d6cd7fc737aa061da74b675a0
| * Doc: Mark globalSettings() obsolete in QWebEngineSettingsLeena Miettinen2017-06-091-3/+3
| | | | | | | | | | | | | | | | | | 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>
* | Handle ViewHostMsg_Focus message from chromiumViktor Engelmann2017-05-241-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | 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>
* Add AllowGeolocationOnInsecureOrigins settingAllan Sandfeld Jensen2016-12-011-0/+2
| | | | | | | | | | | This provides a way to restore earlier QtWebEngine behavior where geolocation was possible from all origins. [ChangeLog][Settings] Added setting to again allow insecure origins to request geolocation. Change-Id: I043fb7a36a56fa5acc1740d52a50b9d7ff49a2c5 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Expose allow-running-insecure-contents as a settingAllan Sandfeld Jensen2016-09-221-0/+2
| | | | | | | | | | | | | AllowRunningInsecureContent was added as a setting in core to enable parsing a chromium command-line argument. This patch forwards the setting to our API layers. [ChangeLog][Settings] Added setting to allow secure content to run insecure content. Task-number: QTBUG-54902 Change-Id: I4e005be1a29905ccf931fabe9ccb308b7d947c62 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add setting to enable printing of CSS backgroundsMichael Bruning2016-08-281-0/+3
| | | | | | | | | | | [ChangeLog][Printing] Printing will now include the CSS background of the printed elements by default. This restores the default behavior from Qt WebKit. It can be controlled via the PrintElementBackgrounds web setting. Task-number: QTBUG-54918 Change-Id: I37c37456dfec6368f22c36c515ac3cad1bbf8006 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add focusOnNavigationEnabled settingAlexandru Croitor2016-08-091-0/+2
| | | | | | | | | | | | | | | | The focusOnNavigationEnabled setting allows changing the behavior of whether a WebEngine view (widget or quick) will automatically get focus, whenever a navigation action happens (load, reload, previous history entry, etc). The default behavior before this patch was to always grab the focus. [ChangeLog][QtWebEngine][General] Add focusOnNavigationEnabled setting which allows controlling whether a web view will receive focus on a navigation request. Previously the view always received the focus. Task-number: QTBUG-52999 Change-Id: I6d30d973a41b53011131f21dcecbf6ec4d652759 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove WebAudio settingsAllan Sandfeld Jensen2016-05-021-2/+0
| | | | | | | | | In Chromium 51 WebAudio will be always on, and can not be runtime enabled or disabled. We should avoid introducing a setting we can not even support in the next version. Change-Id: I42f7d4f3f7f952f38361ef73dfe7b318ea1a4cf5 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* Add settings for FaviconManager's icon download modesPeter Varga2016-03-251-0/+4
| | | | | | Change-Id: I8e4b11089de29623ed39ec6b13fe30be734baa3e Task-number: QTBUG-51179 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Unify license header usage.Jani Heikkinen2016-02-011-11/+14
| | | | | | | | | 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>
* Add pictograph font family settingAllan Sandfeld Jensen2015-12-111-0/+1
| | | | | | | Use the same default font as Serif since that is what Chromium does. Change-Id: Ie83cf114b516c6a1ae0d78ab768c1713144074ac Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Add WebGL, WebAudio and Accelerated2dCanvas settingsAllan Sandfeld Jensen2015-12-021-0/+6
| | | | | | | | | | | These settings were in QtWebKit and are easily added in QtWebEngine. Without the preferences the same could be achieved using command line flags. The defaults are calculated to match what is set in RenderViewHostImpl. Change-Id: I0c80507574ebc3898fc409e47194246fb00abc75 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* Add MediaCaptureEnabled setting to the web engine settings.Michael Bruning2015-11-161-0/+2
| | | | | | | | | Defaults to off. Change-Id: I416116ce07c8b7f5b24ad6e329390358406eadca Task-number: QTBUG-48801 Reviewed-by: Szabolcs David <davidsz@inf.u-szeged.hu> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Merge branch '5.5' into 5.6Allan Sandfeld Jensen2015-09-081-0/+5
|\ | | | | | | Change-Id: Idafba4d47393638cfc72fd02be092b67bb8cbd8c
| * Doc: clean up QWebEngineSettings docsLeena Miettinen2015-08-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | ... and the corresponding QQuickWebEngineSettings docs - Add missing documentation - Remove references to obsolete classes - Edit for grammar and style Change-Id: I368fff274609941d6435ddf3343b81bca6013945 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Widgets: Add fullscreen supportSzabolcs David2015-08-261-0/+2
| | | | | | | | | | | | Change-Id: Ibf1697d2bb3b3af5e7d71149305c5acffba43f0f Reviewed-by: Szabolcs David <davidsz@inf.u-szeged.hu> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Fix widgets plugin settingsAllan Sandfeld Jensen2015-07-201-0/+2
|/ | | | | | | | Connect the user setting to the webengine settings, and make it available in the demo browser Change-Id: Id4da8a4125a9f982cb687d433b6fce123e72c4c7 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Add namespace to internal QtWebEngine APIAllan Sandfeld Jensen2015-03-021-0/+2
| | | | | | | | Adds the QtWebEngineCore namespace to all internal core API. This ensures we don't export any internal symbols in the global namespace. Change-Id: I26af888ea7c6c4c4d0f04c24a377c1a9d3c92751 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-161-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: Ieb6bac7a1be5c25eb7cb917495b58b6a870ca6d4 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Add settings to WebEngineProfilesAllan Sandfeld Jensen2015-02-051-70/+33
| | | | | | | | | This patch adds settings to profiles so common settings might be shared among all pages in a profile. The former global settings are now replaced by the settings of the default profile. Change-Id: I544420e07beeb52ef29b2360bc7929402650cd07 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Introduce ASSERT_ENUMS_MATCH macroPierre Rossi2015-01-221-10/+10
| | | | | | | | For our common use case of compile-time checking enums that we want to keep in sync. Change-Id: I102d737ad986bf3dfff4d11a91afa3f3819a7947 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Use Q_GLOBAL_STATIC instead of local statics for singletonsAndras Becsi2014-11-201-15/+19
| | | | | | | This patch prevents leaking these objects on shutdown. Change-Id: Ic4a628e0d4dc0b31716f885c1e904b6062cf3ef0 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Add setting ErrorPageEnabledAndras Becsi2014-10-141-0/+2
| | | | | | | | | This is required so that embedders can implement custom error pages, and is also needed for tests, where error-page loading has side-effects on subsequent page loads. Change-Id: I5ae276a58864a2fa9d7b608bea3340b482a92f4e Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Update license headers.Pierre Rossi2014-08-281-14/+9
| | | | | | | | Because the files were recent additions or for other unclear reasons, not all the files were updated to reflect the license change. Change-Id: I6898f6f4f993f1efa9489382f0b94af285f8c4f5 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Use Q_DECLARE_PRIVATE to wrap the p-impl in QWebEngineSettingsJocelyn Turcotte2014-08-151-6/+17
| | | | | | | This follows the same pattern now used in other public classes. Change-Id: I999c6ba7fc594cdb77da47482e1060542fe86861 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix a crash in WebEngineSettings when opening a new windowJocelyn Turcotte2014-08-151-14/+6
| | | | | | | | | | | | | | | | | | A new window means that the QWebEnginePage gets its WebContentsAdapter swapped and that the pointer in WebEngineSettings must be updated. Do the WebContentsAdapter-to-WebEngineSettings binding in WebContentsAdapter::initialize to cover both cases. This also refactors the way that QWebEngineSettings is created by removing the need to pass a QWebEngineSettingsPrivate instance to be adopted, and also move the global settings construction logic in the singleton accessor instead of relying on the fact that it uses a different contructor. Change-Id: I6f8a2ed1407a4b25f9898526db9432721c354ddf Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* Widgets settings implementationPierre Rossi2014-08-121-0/+217
Implementing what is already available, namely the WebAttributes, font preferences and default text encoding, as well as a slightly different take on privateBrowsing. Change-Id: I128f060a4661d19aa1c9c4d6daae1f80fb33204b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>