summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_adapter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Update spellchecker APIsMichal Klocek2016-04-181-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* | Merge branch '5.6' into 5.7Allan Sandfeld Jensen2016-04-111-0/+5
|\| | | | | | | Change-Id: I53645ee5405b1c43807123fd3c196e314cfd1ce9
| * Implement CheckMediaAccessPermissionAllan Sandfeld Jensen2016-04-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | Fixes access of label of MediaStream tracks Also fixes the logged error: WebContentsDelegate::CheckMediaAccessPermission: Not supported. Change-Id: I3fee9ccd9e8b2e5cbd6b707336cc61425a44ba31 Task-number: QTBUG-52216 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Fix recentlyAudible Widgets and Quick API.Alexandru Croitor2016-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Add callback to printing APIMichael Bruning2016-03-161-0/+19
| | | | | | | | | | | | | | Also corrects and updates the printToPDF docs to reflect recent changes. Change-Id: Iffe276a1046d6d55923939f9d72b97cd533017ff Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Basic adaptation to Chromium 49Allan Sandfeld Jensen2016-03-071-8/+10
| | | | | | | | | | | | | | | | Converts types, callbacks and headers to match Chromium 49. Task-number: QTBUG-51173 Change-Id: I544ef46e187105e250fea1b48b72d2c81a906640 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Add rudimentary printing API and add it to example.Michael Bruning2016-02-161-0/+13
| | | | | | | | | | Change-Id: I48141d07e9744bb21d64a5c8724579cb469ba35c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@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/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Fix un-processed drag events not being handled on OSX.Alexandru Croitor2016-01-231-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a QDragMoveEvent is posted, we have to notify Chromium, and wait synchronously, for the possible drag and drop action at the respective coordinates. This is done by executing an inner event loop. The drag move event was processed in the inner event loop as a side-effect, specifically when another event (like a QMouseMove or QKeyPress) was forwarded to Chromium, which in turn called DoWork implicitly. The side effect led to incorrect behavior, when the mouse button is released and the drag operation should be finished. What actually happened is that additional queued DragMove events were being sent by OSX after the mouse release, and the process was stuck in the inner event loop, because Chromium's DoWork was never called. And only after moving the mouse a bit (and thus forwarding MouseMove events), the inner event loop was quit, and the drag operation finished. To actually make Chromium handle the DragMove event, we have to manually call DoWork on the inner event loop. Also because the possible drag and drop action is sent via IPC from the render process to the main process, there is a race condition that the the message might not be handled on the first manual call of DoWork, so we set up a QTimer to continuously call DoWork, thus polling for the message. Once the message is handled, the timer is stopped. In practice this leads to at most two timer timeouts. Change-Id: I8dc37a9c47ea5b675e15ebd138bc0e616b522049 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Add API to set WebChannel on isolated worldAllan Sandfeld Jensen2016-01-151-5/+12
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Add methods for running javascript in isolated worldsAllan Sandfeld Jensen2016-01-081-5/+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/+156
| | | | | | | | | | | | | | | | | | | | 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-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | 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/+7
| | | | | | | | | | | | | | | | 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>
* | Merge branch '5.6' into devAllan Sandfeld Jensen2015-11-201-2/+2
|\| | | | | | | Change-Id: I05fe27b8321944cf68cc96dfa9dfcaeb54c8c8cd
| * Use consistent naming of Qt-specific Chromium classesAllan Sandfeld Jensen2015-10-291-2/+2
| | | | | | | | | | | | | | | | | | Most of our Qt specific versions of Chromium classes have Qt appended, but a few observers have it prepended. This patch renames them to keep naming consistent. Change-Id: I004b61e16bc47f39a6bbc16a5f5c10585626865c Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Adapting to Chromium 47Allan Sandfeld Jensen2015-10-271-1/+1
| | | | | | | | | | | | | | Updating to Chromium 47 and adapting API. Change-Id: Id465bbcd4facd7c47cb8a9f4bd4e18cbdc0d1120 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devAllan Sandfeld Jensen2015-10-231-0/+6
|\| | | | | | | Change-Id: I5d0d5f65575256673c35558e0fcbf749a1439793
| * Fix ABI breakage due to fullscreen featureAllan Sandfeld Jensen2015-10-191-0/+6
| | | | | | | | | | | | | | | | | | | | | | We can not add a new virtual method without breaking ABI on some platforms, instead we need to use a setter. The API now uses a request object, and a separate signal for canceling, since canceling can not be rejected. Change-Id: If8069c343e86926293c30e8de179bf4e3cbd5886 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devwip/47-basedAllan Sandfeld Jensen2015-10-141-0/+6
|\| | | | | | | Change-Id: I0569b04ced3456a1d5d91e02e117963115fcf1b2
| * add RequestClose web actionJoerg Bornemann2015-10-091-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Web pages can set the onbeforeunload handler to let the user confirm whether to leave the page or not. Until now, only when leaving the page via a link, a confirmation was shown. Before actually closing a web page, applications can now trigger the RequestClose web action. This will give the use the chance to confirm or deny the close request. If the request is confirmed, the signal windowCloseRequested is emitted. Task-number: QTBUG-36155 Change-Id: Icc1fabc37a2ac537f674c2f00bc8966e4dc4e610 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Add unselect webactionAllan Sandfeld Jensen2015-10-121-0/+6
| | | | | | | | | | | | | | Adds a web action to clear selection. Change-Id: I203b9fbc7a8f3714695eef043ebc3a8f79c20b75 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Add contentsSize APIAllan Sandfeld Jensen2015-10-121-0/+8
| | | | | | | | | | | | | | | | | | | | Adds API to read contentsSize to go with scrollPosition. This property used to be in QWebFrame in QtWebKit. Change-Id: I498075e4c0ad916e5c96dbfb02101ce8a0c298ee Task-number: QTBUG-48323 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Add scrollPosition APIAllan Sandfeld Jensen2015-10-121-0/+8
|/ | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.5' into 5.6Allan Sandfeld Jensen2015-09-241-0/+2
|\ | | | | | | Change-Id: Ice3d6e88238940a62d75e7c67f63b626285fccb0
| * Fix assert on exitAllan Sandfeld Jensen2015-09-101-0/+2
| | | | | | | | | | | | | | | | | | | | Remove frame loading error-page when frame is deleted, and make sure WebContents is destroyed before the observer so the observer can observe the full live-span including deletions.. Task-number: QTBUG-47945 Change-Id: I56bec611b8bfbfc6f75a1bc2108efbc80a81729b Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Emit a signal when the rendering process exits.Jake Petroules2015-09-101-0/+32
| | | | | | | | | | | | | | | | | | This allows users to implement a "sad tab" feature and/or track rendering process crashes using a crash reporting service. Task-number: QTBUG-48227 Change-Id: I97ef934fe5d0912cd0f41967a39052316b3c66b0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Fix selectAll on data urlAllan Sandfeld Jensen2015-09-031-0/+1
| | | | | | | | | | | | | | | | SelectAll only works when there is a focused frame, so we must ensure a frame is focused when the web-contents requests focus. Change-Id: I00d670321b29342fcd447b4b07251df776019f1c Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Add default inspect element context menu itemAllan Sandfeld Jensen2015-09-011-0/+8
| | | | | | | | | | | | | | | | Adds inspect element to the context menu when there is an attached inspector on the page. Change-Id: Id3c8a5be34318c12ab331b6611219bd59b7b70be Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Add exit full screen web actionAllan Sandfeld Jensen2015-08-271-0/+6
| | | | | | | | | | | | | | | | Adds a web action that can be used for exiting fullscreen mode, and include it the context menu whenever in fullscreen mode. Change-Id: I7aa729a86f9ba9df476766cd40f87d9385948fea Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Add inspect element webactionAllan Sandfeld Jensen2015-08-261-0/+9
| | | | | | | | | | | | | | | | | | Adds the missing InspectElement webaction from QtWebKit. It is not added by to any context menus by default and only has an effect when an inspector is attached. Change-Id: Ic8c67c797e5dfe266fb692ffc97577b842458a79 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Rebasing on Chromium 45Allan Sandfeld Jensen2015-08-251-6/+6
| | | | | | | | | | | | | | Fixing the minor differences needed to work with Chromium 45. Change-Id: I5036b4b9a069d45e8dd37e24fab84cdfe5e67acc Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | set Accept-Language in content::RendererPreferencesJoerg Bornemann2015-08-241-0/+1
| | | | | | | | | | | | | | This amends commit 2a56ec7ce4713711b55bb1dfc86a4320d943f606. Change-Id: I8103197f08c985557000de36c37ad80e1ceadf24 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Add API for intercepting url requestsAndras Becsi2015-08-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is adding a QWebEngineUrlRequestInterceptor interface that can be subclassed to observe or intercept all resource requests making it possible to implement browser features like adblocking and setting custom request headers for url requests. The interceptRequest virtual function is executed on the IO thread. This patch also includes a unit test for the testable API parts. Change-Id: Ibe740fc55551a9a5da40794088ccb6d03d913631 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Martin Rotter <rotter.martinos@gmail.com> Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | Add a backgroundColor propertyJocelyn Turcotte2015-07-141-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | add Download*ToDisk web actionsJoerg Bornemann2015-07-061-0/+14
| | | | | | | | | | | | | | | | Add the web actions DownloadLinkToDisk, DownloadImageToDisk and DownloadMediaToDisk. Change-Id: If6c9c8a3f4b95ad3032cff71ffc53a48be26e083 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Remove now invalid assertAllan Sandfeld Jensen2015-07-011-3/+0
| | | | | | | | | | | | | | Frame to navigate has been moved from NavigationEntry to LoadURLParams. Change-Id: Ic421867ba067a79bbc499904e24066d40ff9b1ea Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | Permission Management for Chromium 44Allan Sandfeld Jensen2015-07-011-1/+1
| | | | | | | | | | | | | | Implementing the new PermissionManager API. Change-Id: If0fdac24b8fec561a898aba009345576b5ce7fc6 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | Add QWebEngineCookieStoreClient core APIAndras Becsi2015-06-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+19
| | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.5' into devAndras Becsi2015-04-231-3/+0
|\| | | | | | | Change-Id: I6f913ebc7aed68d4b8c3f8666fd2389607b491b7
| * Remove unused includesPeter Varga2015-04-231-3/+0
| | | | | | | | | | Change-Id: I87de823c9a67f4e30dd9a86b185bfde51b934509 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-081-0/+7
|\| | | | | | | Change-Id: I7b0dae978357c6f48826ad8e09a8cb8477d1901d
| * Revive ReloadAndBypassCachePierre Rossi2015-04-071-0/+7
| | | | | | | | | | | | | | | | | | Appears to be an oversight for widgets, as the API was there, but just wasn't wired. Also add it for QQuickWebEngineView while we're at it. Change-Id: I07d6e356cbaf22b79f3fc5a82df78c6821993e8d Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* | Merge remote-tracking branch 'origin/5.5' into devAllan Sandfeld Jensen2015-03-131-1/+5
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/webengine/api/qquickwebengineview_p_p.h src/webengine/ui_delegates_manager.cpp src/webengine/ui_delegates_manager.h src/webenginewidgets/api/qwebenginepage_p.h Change-Id: I8052de4d3b2e68a950832226f6f99e2aafca5505
| * Add namespace to internal QtWebEngine APIAllan Sandfeld Jensen2015-03-021-1/+5
| | | | | | | | | | | | | | | | 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>
* | Refactor FilePickerControllerAdam Kallai2015-03-051-31/+0
|/ | | | | | | | | Move FilePickerController classes to the QtWebEngine core to providing common functionality of files selecetion for WebEngine and WebEngineWidgtes. Change-Id: I6ab407095460ef5b63b454f7d62b98215383fc21 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Fix Http User-agent string settingAllan Sandfeld Jensen2015-02-181-0/+2
| | | | | | | | | Chromium has multiple places where it reads the user-agent, we were only setting one, which appears to no longer be used for most cases. This instead sets it by using the webcontent user-agent override. Change-Id: I77d4d0a21424feda7a18140fb72baacdd6f816ca Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>