summaryrefslogtreecommitdiffstats
path: root/src/core/type_conversion.h
Commit message (Collapse)AuthorAgeFilesLines
* Make QUrl <-> GUrl conversion more explicitAllan Sandfeld Jensen2018-07-201-3/+12
| | | | | | | | Specify exactly how we parse using QUrl, and try parsing invalid URLs from GUrl as well. Change-Id: If6e95d2600315180f36f9ad767f97936b438cd84 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Use range-based for instead of Q_FOREACHJüri Valdmann2018-06-061-1/+1
| | | | | Change-Id: Ibf016b795ff98fddfa29fb5dc63924a2d2159d71 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Basic adaptations for 64-basedAllan Sandfeld Jensen2018-03-151-0/+5
| | | | | Change-Id: I11e2da206e4e59872a38c178f57a5879c1bbf229 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Merge branch '5.9' into 5.10Allan Sandfeld Jensen2017-11-011-0/+5
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/core/core_module.pro src/core/delegated_frame_node.cpp src/core/surface_factory_qt.cpp src/webenginewidgets/api/qwebengineprofile.cpp tests/auto/widgets/widgets.pro Change-Id: I92f3ef4eee779afef6c5381a7aa8b551417c1b17
| * Fix viewport resizing bug in rendererJüri Valdmann2017-09-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | After the recent fix for rendering intersecting quads, DelegatedFrameNode no longer builds scene graph nodes for DrawQuads that are outside the visible area. This means that the structure of the scene graph now depends on the size of the visible area, however the logic for deciding whether to update or rebuild the scene graph was not updated to reflect this fact. As a result we may try to update e.g. a QSGImageNode as if it were a QSGRectangleNode leading to a crash. Task-number: QTBUG-62112 Change-Id: I6e2e9dee4238d208fc2be98669281c2d4d4962d7 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Adaptations to 61-basedAllan Sandfeld Jensen2017-10-251-1/+4
|/ | | | | Change-Id: I5cb198445f283c6cea8187a1a2883896df0ee918 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Adaptations to Chromium 52Allan Sandfeld Jensen2016-09-141-1/+1
| | | | | Change-Id: Idf8a511ba26d263fd9d014d87d5e1101d706da71 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-04-251-0/+5
|\ | | | | | | Change-Id: I329397621f19ba3890be5daf44a6bb2d668ad2d8
| * Fix copying images to clipboardJoerg Bornemann2016-04-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | The SkBitmap to QImage conversion in ClipboardQt::WriteBitmap was hardcoding the image format to ARGB32. This failed whenever the format of the SkBitmap provided by Chromium was different. This change backports 1cf9175e from 5.7. Task-number: QTBUG-52715 Change-Id: Icf27b97bc421a2201c307a4514928dcf384d9ba6 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
| * Improve thread-safety of custom scheme handlersAllan Sandfeld Jensen2016-04-201-0/+5
| | | | | | | | | | | | | | | | | | Avoids accessing the QWebEngineUrlSchemeHandler from any other thread than the UI thread, since it may be deleted at any time on the UI thread. Change-Id: Icb4331b3c36f6f619a9fd975d155a9fd608dc5e9 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Fix disabling spell checker supportPeter Varga2016-04-061-2/+0
| | | | | | | | | | Change-Id: I46805d8956815e4d691afd05a69ff16d6a86ad6b Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
* | Add FaviconManager to corePeter Varga2016-02-031-0/+6
| | | | | | | | | | | | | | | | | | The new icon manager uses the WebContents::DownloadImage() API for downloading icons. It proposes the best quality among the available favicons via the iconChanged signal. Change-Id: I66a014365b6f6560ff34d40ee870aee84e4e70e4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Add spell checker supportMichal Klocek2016-02-011-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | 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>
* | Implement drag and drop supportJoerg Bornemann2016-01-031-0/+11
| | | | | | | | | | | | | | | | | | | | 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>
* | Extend toQImage to automatically deduce the image formatJoerg Bornemann2015-12-171-0/+2
| | | | | | | | | | | | | | | | We will use this in a subsequent commit. Change-Id: I73af6b28691eea97e076d0619f3068ec8c5324a2 Done-by: Allan Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Move conversion function for keyboard modifiersJoerg Bornemann2015-12-171-0/+2
| | | | | | | | | | | | | | | | | | | | Move flagsFromModifiers from render_widget_host_view_qt.cpp to a new file type_conversion.cpp. We will use it in a subsequent commit. Added a separate source file to not include qcoreapplication.h in type_conversion.h. Change-Id: I6dfd54dd99d640ff48cb1a710271c7f8115891e5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-031-1/+10
|\| | | | | | | Change-Id: I052fdc4245e25e58457d51f6e49703bc7dd8ff00
| * Support custom mouse cursorsSzabolcs David2015-12-011-1/+10
| | | | | | | | | | | | Task-number: QTBUG-43009 Change-Id: Ic36554c5137a55d9d4b9143c204d9d4400e23ff8 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Adapting to Chromium 47Allan Sandfeld Jensen2015-10-271-0/+1
| | | | | | | | | | | | | | Updating to Chromium 47 and adapting API. Change-Id: Id465bbcd4facd7c47cb8a9f4bd4e18cbdc0d1120 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Add scrollPosition APIAllan Sandfeld Jensen2015-10-121-0/+5
|/ | | | | | | | | | Adds an API to read the main-frame scrollPosition. In QtWebKit this property used to be in QWebFrame. Task-number: QTBUG-48323 Change-Id: Ic8312afac0dcdcfd8c7fd4589be774d327bb6268 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* Add cookie API testsAndras Becsi2015-07-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | This tests the part of the cookie API that can be tested locally. The notification about third-party cookies (acceptCookieFromUrl) can not be tested locally since it requires cookies to be set from a different domain than the main frame, which requires a remote host or a local web server with support for virtual DNS. Testing requires the ability to set cookies for local pages loaded through the qrc scheme. We could eventually extend this in the future to enable setting cookies on registered custom schemes, but for that we might have to implement our own cookie store. Since Chromium's cookie store relies on source url's to manage cookies and qrc:// cookies do not specify a domain, a specific source url is needed to be able to delete an individual cookie that has been set by a page loaded through qrc://. This patch requires a new function on QNetworkCookie to be able to forward the source url of the cookie to Chromium. Change-Id: I97dd04b27fbb8ec63060f9b741ad65c29a773a6c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Add a backgroundColor propertyJocelyn Turcotte2015-07-141-0/+5
| | | | | | | | | | | | | | | | | This also allows setting a transparent color to see through the web view's body if its background color isn't specified. The color is initially held by the top API view and is pulled by the WebContentsAdapter in order to set it on the RenderView. Since both blink and our local compositors (in the QOpenGLWidget case) need to know about this color, RWHVQt takes care of pushing it to both. The former through an IPC message and the latter directly on the RWHVQtDelegate. Task-number: QTBUG-41960 Change-Id: Ie13317b2d087f5612ad9c5fb0e05ca3e91aec9af Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Trivial changes for Chromium 44Allan Sandfeld Jensen2015-06-231-1/+1
| | | | | Change-Id: I8261b201f1d6623eff3427b68b8d098c17d293d3 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Add QWebEngineCookieStoreClient core APIAndras Becsi2015-06-161-0/+13
| | | | | | | | | | | | | | | | | This class or its subclass can be set on the QWebEngineProfile and its API enables intercepting Chromium's cookies, setting and deleting cookies in the cookie store. These functions are asynchronous so if the result of the task is needed the user can provide a callback which will be run on the calling thread when the requested operation finishes. This does not include a hook for QQuick layer yet, there we have to figure out what the most convenient way is from a developer's perspective. Change-Id: I6a3af071883ce632df7a2fb952da93f306ac3fe2 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Extend context menu actionsAllan Sandfeld Jensen2015-05-111-0/+5
| | | | | | | | Implements the several missing context menu actions for navigation and image and media handling. Change-Id: Ib8ea8311ea291fe2f98e509bc6f4034a5e0389c9 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Add namespace to internal QtWebEngine APIAllan Sandfeld Jensen2015-03-021-0/+4
| | | | | | | | 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>
* Compile time check the fileListingHelper specializationsPierre Rossi2015-02-131-1/+8
| | | | | | | | | | Since we can now rely on deleted functions (supported by MSVC 2013), we can avoid the scenario we had with the last snapshot update where the file picker internal API changed slightly (see 1a744ca4 for more details). Change-Id: Iab26a7834a367f24afe5fbf37fae64639aa9c12e Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Fix the fileListingHelper template function specialisationAdam Kallai2015-02-061-4/+7
| | | | | | | | | The WebContentsAdapter::filesSelectedInChooser function parameter type has been changed since the Chromium update. Thus content::FileChooserFileInfo has to be used instead of ui::SelectedFileInfo. Change-Id: Ia6a50409f3f7c704228cb739fc50d694e633dbee Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Do not use QDir::separator()Allan Sandfeld Jensen2015-01-071-1/+2
| | | | | | | | Build all paths Qt-style using / separators, and only convert it when converted to Chromium types. Change-Id: I181be6edb903f38e1772bcd324972d1d4e6672fc Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* For correctness fileListingHelper template function must return some value.Zeno Albisser2014-11-281-1/+1
| | | | | Change-Id: I8f1c109bfeae72971539a68dfd1216d1bd185951 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Wire the geolocation API to QtPositioningPierre Rossi2014-11-241-0/+4
| | | | | | | | If QtPositioning is available, provide chromium with a LocationProvider that uses it as a backend. Change-Id: I53ad3b45e49d0d2d181c1a6459b7be764293c2a6 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Optimize the QMatrix4x4 after a conversion from SkMatrix44Jocelyn Turcotte2014-11-031-1/+3
| | | | | | | | | This avoids using a General matrix for tile transformations which are usually only translations in our case. Change-Id: Ic947d7ef9b78de6d5d16ea718cc03255e38a8097 Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Update License Headers for Qt WebEngine to LGPLv3.Zeno Albisser2014-08-211-15/+10
| | | | | | | Change-Id: Idbe0eafb51d77cc00e3a93179b81770724d5bfaa Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Revert part of the RenderWidgetHostViewQtDelegate refactoringJocelyn Turcotte2014-04-081-0/+5
| | | | | | | | | | | This reverts parts of commit 9c198939be1ef064d1a2430a4b9991f2fe16f359. This does keeps the popup fixes and removes support for QWebEnginePage::setViewportSize and QWebEnginePage::render until we can evaluate the needs vs the cost of such feature. Change-Id: I1b55b751d463717b1462393ea8cd353422f8fdbb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Implement QWebEngineHistoryItem::lastVisitedJocelyn Turcotte2014-03-311-0/+7
| | | | | | Change-Id: I105cb2a0a2479b146e2ab68db6d194ac2ac2d3f9 Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Register a path provider for Qt instead of using PathService::OverrideAndras Becsi2014-02-061-0/+5
| | | | | Change-Id: I465a5465ec4189b077a8c1cbab7485c628eca899 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* [Widgets] wire the file pickersPierre Rossi2014-01-151-0/+28
| | | | | | | | | | | | | | | Introduce a new version of chooseFiles in QWebEnginePage. The existing API in WebKit1 seemed a bit dusty in any case (multiple only supported via extensions). Changes are: * oldFile becomes oldFiles, so that we could at a later stage expose the already selected files in the "multiple" case. * a type is introduced, for now limited to multiple selection, but over time, we might consider additions such as directory upload. Change-Id: I14cfea64ce95e892a0a1877c8cb914c5a421409f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fix type conversion for WindowsZoltan Arvai2014-01-101-3/+11
| | | | | | | | | | MSVC uses WString instead of Utf16 so this needs different conversion in type_conversion.h. Change-Id: I987acb4ea5ad5a98c94fd992a9de05f602be825d Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Quick: Add experimental.viewport.devicePixelRatioArvid Nilsson2013-12-041-0/+5
| | | | | | | | | | | | | | | | | | | | This specifies a devicePixelRatio to be used by web content instead of the QScreen::devicePixelRatio(). This is necessary on non-iOS mobile devices to remain compatible with the mobile web which assumes devicePixelRatio is computed as the ratio of actual dpi to 160 dpi. Non-iOS mobile platforms may use different criteria to determine the QScreen::devicePixelRatio(), depending on the history of the platform, or simply leave it at 1.0. For QNX, this setting gets a reasonable default value so developers don't have to regularly use this experimental API. These changes were inspired by the Android Chromium port which uses a GetDpiScale() to accomplish the same in content/browser/android/content_view_core_impl.cc. Change-Id: I1bc8878a47dabcdb6986c4fe5c8c4ac230ae2514 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Moving sources to src part 1: Move files.Jocelyn Turcotte2013-11-281-0/+124
This only move files without adjusting any paths. This moves: - lib/quick -> src/webengine/api (API files) lib/quick -> src/webengine (other files) This contains the main QtWebEngine module library since <ec7b2ee70a8b2db7fb87f50671a001ddd54697b0>. - lib/widgets -> src/webenginewidgets Also rename this directory to match its module name and rename Api to api. - lib -> src/core - process -> src/process - resources -> src/core/resources - tools/* -> tools/scripts/ The build directory is spread as follow: - build/build.pro -> src/core/gyp_run.pro - build/qmake_extras/* -> src/core/ (for the host and target .pro files) - build/qmake -> tools/qmake - Build related scripts -> tools/buildscripts Change-Id: I0cded1de772c99c0c1da6536c9afea353236b4a1 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>