summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Add information about framesLeena Miettinen2016-02-243-24/+48
| | | | | | | | | | | | | | | - Describe differences between Qt WebKit and Qt WebEngine in the porting guide - Replace references to frames with references to the view in the QWebEngineView docs - Describe frames in the QWebEnginePage class overview - Replace references to frames with references to pages where appropriate in the QWebEnginePage docs - Describe the "security origin" concept that is related to frame handling Change-Id: I8c952d507414058759537a6333649c37976c12e6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Include the module prefix for the header filesv5.6.0-rc1Andy Shaw2016-02-151-3/+3
| | | | | Change-Id: I81545b00dbfc94949dd5d8b2252c2230ca5d2601 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Fix rendering with default OpenGL surface on LinuxJoerg Bornemann2016-02-121-3/+5
| | | | | | | | | Commit 32929885 led to rendering blank pages in QWebEngineView. Set the OpenGL version only if the core profile is requested. Change-Id: Ie05c7804afbce26aee63455e27c23219484f535d Task-number: QTBUG-51032 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* OS X: Fix crash when setting a custom default QSurfaceFormat.Alexandru Croitor2016-02-041-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting a new default QSurfaceFormat after QtWebEngineCore::initialize() is called, might lead to a crash. This happens when the new surface format has a different OpenGL profile, compared to the profile created by web engine in the RenderWidgetHostViewQtDelegateWidget constructor. The default constructed QSurfaceFormat has an OpenGL Compatibility profile. Inside the Cocoa platform plugin when a new shared OpenGL context is created, it fails to initialize the new context because of the difference in profiles, and thus ultimately creates an unshared context, which leads to a crash. Fix consists in using the shared context QSurfaceFormat in the RenderWidgetHostViewQtDelegateWidget constructor, and also printing a fatal warning to notify the developer only to set the new QSurfaceFormat before the application instance is declared. Bottom line, if the QSurfaceFormat OpenGL profile has to be changed, it should be done before QtWebEngineCore::initialize() is called. Doing so after initialize() is called, will lead to a crash. Change-Id: I8a07211b592143d736b001556b944d4759802396 Task-number: QTBUG-50665 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
* Doc: QWebEngineSettings::WebAttribute values provide no safety mechanismsLeena Miettinen2016-02-041-1/+8
| | | | | | Task-number: QTBUG-45556 Change-Id: Ifc39eba7f9e9324f180feeb0d99fef1434f97d64 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Prefix Markdown Editor example with "WebEngine"Kai Koehne2016-02-041-1/+1
| | | | | | | | | | Follow the example of the other examples, and always start with WebEngine. This makes also sure that Qt Creator attaches the 'webengine' tag to the example. Task-number: QTBUG-50582 Change-Id: If99ba9a23560abae61e4e2ef5a5b091b3c5473c2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* Fix build against Qt 5.5Allan Sandfeld Jensen2016-02-042-0/+4
| | | | | | | Make QtWebEngine 5.6 buildable as an upgrade to Qt 5.5 Change-Id: Ic5de7fc414374d8492434dd5b956cbb90fff2e3e Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* Preserve webchannel and userscripts when restoring historyAllan Sandfeld Jensen2016-01-314-2/+27
| | | | | | | | | | | 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>
* Doc: warn about heavy routines blocking content renderingLeena Miettinen2016-01-201-0/+3
| | | | | | Task-number: QTBUG-50092 Change-Id: I1f3bbcab3b1999b9ecc86660ff9fef8330775cb4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Widgets: Add example names to documentationSzabolcs David2016-01-191-2/+2
| | | | | Change-Id: I73f6e944e3a64b948b86882e951f85593fdb800f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* Widgets: Improve geometryChangeRequested signalSzabolcs David2016-01-192-0/+7
| | | | | | | | | 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>
* Doc: link capturing methodsLeena Miettinen2016-01-192-1/+17
| | | | | | Task-number: QTBUG-48435 Change-Id: If7117ecb11a0f06df1204dc91757a29c5444e189 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* 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>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2016-01-072-0/+24
|\| | | | | | | | | | | | | | | | | 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-222-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Doc: certificate management in Qt WebEngineLeena Miettinen2016-01-051-1/+2
| | | | | | | | | | | | Task-number: QTBUG-49987 Change-Id: I04440144566d7a0caf36f6eaf3b724a02cf58205 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Doc: add info about unavailable API from the wikiLeena Miettinen2015-12-181-1/+7
| | | | | | | | | | | | | | https://wiki.qt.io/Porting_from_QtWebKit_to_QtWebEngine Change-Id: Ic28e2140ca1dd9643d68a0a21bdd30317b70e282 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Move WebEngine initialization to core libraryAllan Sandfeld Jensen2015-12-152-3/+7
| | | | | | | | | | | | | | | | This means QtWebEngineWidgets no longer needs to depend on and link to the QML API. Change-Id: If59693bf0ae1fb43dc86c141daf4e09c8cc68c25 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Michael Bruning2015-12-091-0/+6
|\| | | | | | | | | | | | | Conflicts: src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp Change-Id: I451bc61673014db8e87b2a2cf98fb6879ce0e58d
| * Fix incorrect device pixel ratio used on startup.Alexandru Croitor2015-12-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Report the correct device pixel ratio to Chromium, when the QOpenGLWidget gets initialized. The initial value on startup is incorrect, because Chromium tries to query the screen information, before a relevant QWindow handle can be returned, and thus defaults to 1.0f. Change-Id: Ibbedd7b2915840f9716340e582aedbc13406f11a Task-number: QTBUG-49727 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Make the MIME-type of downloads availableAllan Sandfeld Jensen2015-12-074-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | An application currently have to rely on suggested filename only to guess the type of a download. This is often insufficient when the suffix is misleading or missing. This patch adds the mimetype to the reported metadata and also adds a mimetype appropriate suffix to suggested filenames. Task-number: QTBUG-48206 Change-Id: I4c70f076d6eb5ae820fd6b7f568515eeb7c18df5 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Doc: edit the porting instructionsLeena Miettinen2015-12-021-20/+19
| | | | | | | | | | | | | | | | Follow the Qt documentation guidelines and fix some grammar issues. Change-Id: I1e708a2089b112aa079871b19698f71f0d3e85c3 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Rename QWebEngineCookieStoreClient to QWebEngineCookieStoreMichal Klocek2015-12-012-6/+6
| | | | | | | | | | Change-Id: I8f9a4c5c155a65ede24908799218fd867db0767c Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Rename url scheme handler's destroyed signalAllan Sandfeld Jensen2015-12-011-3/+3
| | | | | | | | | | | | | | | | Make the signal distinct from the QObject destroyed signal and make sure it is not documented and follows private signal naming. Change-Id: If10a6e7fcee5e9ea4d3ed12ddb8e6ff3f1170adc Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Doc: document QWebEngineHistoryItem::swap methodLeena Miettinen2015-12-011-0/+5
| | | | | | | | | | Change-Id: Ie8c6e4d9887d5169037e580db8a91c102009df5e Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Doc: make docs for QWebEnginePage::requestedUrl clearerLeena Miettinen2015-12-011-2/+4
| | | | | | | | | | | | | | Task-number: QTBUG-49500 Change-Id: Ibeafae52ae523a526c912ef3e40f6d69da7b13bd Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com> Reviewed-by: Kati Kankaanpaa <kati.kankaanpaa@theqtcompany.com>
* | use Q_ENUM instead of Q_ENUMSJoerg Bornemann2015-11-161-1/+1
| | | | | | | | | | | | | | | | This makes the enum values available as strings in qDebug, QCOMPARE and such. Change-Id: Id57a2002451337fcc8aedac673f834445913895c Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Make QWebEngineFullScreenRequest const correctKai Koehne2015-11-124-17/+27
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Add documentation about console loggingKai Koehne2015-11-061-0/+2
| | | | | | | | | | Change-Id: I50ae0beb54f70c232eed0d9bd47b0dc01dadc130 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* | Print JS console messages by defaultKai Koehne2015-11-062-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-066-2/+41
| | | | | | | | | | | | | | | | | | 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-054-4/+18
| | | | | | | | | | 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>
* | Properly mark value based classesKai Koehne2015-11-022-1/+5
| | | | | | | | | | | | | | Change-Id: I937ce0daf2fa73d7179a5f62585abfb1acea7264 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-281-1/+1
|\| | | | | | | | | | | | | Conflicts: src/3rdparty Change-Id: I49acdd9b5ca94f2807b0c13a97f508a67f1c5750
| * Set off-the-record to true as documentedAllan Sandfeld Jensen2015-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | The API had no way of setting off-the-record, because the constructor meant for it set it to false. The patch fixes the constructor and adds basic API tests for the QWebEngineProfiles. Change-Id: I407eb4a4b0524b6c4eb944d17d744620dd9db6fb Task-number: QTBUG-48724 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Fix ABI breakage due to fullscreen featureAllan Sandfeld Jensen2015-10-196-29/+166
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Do not require to subclass/install QWebEngineCookieStoreClientKai Koehne2015-10-192-14/+0
| | | | | | | | | | | | | | | | | | The class has only setters and getters, except for the virtual acceptCookie method. By replacing this method with a setCookieFilter callback we can avoid the need of users to subclass the client. Change-Id: Id78c01fc103b8d9cc267594527239b598e8975f1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Decouple scheme and url scheme handlerAllan Sandfeld Jensen2015-10-162-15/+29
| | | | | | | | | | | | | | | | | | Remove the scheme from the url scheme handler constructor, this way the same handler can handle multiple schemes, the API look more natural and we can get rid of the private class. Change-Id: I33906b8a5ea51641e28a53f93f4feb1472c24baf Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | add RequestClose web actionJoerg Bornemann2015-10-094-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Improve documentation of QWebEnginePage::acceptNavigationRequestKai Koehne2015-10-081-2/+2
| | | | | | | | | | | | Change-Id: Ic4f91fa7927c18b53c6b0a0f69ee38905715eb10 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Improve runJavaScript documentationKai Koehne2015-10-081-2/+13
| | | | | | | | | | | | | | | | | | Mention that the script will run in the same JavaScript world as scripts that are part of the page. Also link to new scripts API. Change-Id: I4dd80fdd84644b1fa4ce6c63ab07c1dbba855389 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Fix compilation with latest qtbaseKai Koehne2015-10-081-2/+2
| | | | | | | | | | Change-Id: I1040dab62b7c795dbaf3899304501917993b06d6 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Doc: edit link to Qt WebKit docs to point to archiveLeena Miettinen2015-10-071-2/+4
| | | | | | | | | | | | | | The Qt WebKit docs are not part of Qt 5.6 documentation. Change-Id: Iac913b2b94f899b0c14398c5a864b647c56995c5 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Doc: add docs for QWebEngineView::renderProcessTerminated()Leena Miettinen2015-10-071-0/+8
| | | | | | | | | | Change-Id: I055467595e6c922bc95fabf63555c7225de6d626 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Doc: remove doc config file from Qt WebEngineWidgets submoduleLeena Miettinen2015-10-073-45/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This helps maintaining the doc dependencies. All Qt WebEngine module docs are now generated in the /qtbase/doc/qtwebengine/ folder. Note that you must run qmake -r for the docs to be generated correctly after applying this patch. Add Qt WebEngine C++ Classes page that lists the C++ classes for the submodules. Modify snippet and example paths accordingly. Change-Id: I59431c5f766f30b59654ca4e2219b76c79137225 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Doc: edit QWebEngineView docsLeena Miettinen2015-10-061-57/+48
| | | | | | | | | | | | | | Fix grammar, style, and punctuation. Change-Id: I0d6a8f9ccda16c81f7bc32194d09c5ca0e8761ce Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>