summaryrefslogtreecommitdiffstats
path: root/src/webengine
Commit message (Collapse)AuthorAgeFilesLines
* UIDelegatesManager: Remove creationContextForComponent.Robin Burchell2015-01-062-15/+6
| | | | | | | | | This doesn't seem to be too much sense, and according to the QQmlContext documentation, may not work as expected: "This is only valid for components created directly from QML." Change-Id: I49db5dad49288d196e8519b1a60dcf2192147672 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* UIDelegatesManager: Communicate load failure back to the dialog controller.Robin Burchell2015-01-061-1/+5
| | | | | | | | | | | If the dialog controller has asked to show a dialog, then if we cannot show a dialog, we should reject its request. Not doing this results in the WebView becoming frozen for input if the load fails, seemingly. Change-Id: I7dddd5357c712f896499cdebb142e60b5e80b4f2 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* UIDelegatesManager: Always print errors if component loading fails.Robin Burchell2015-01-061-3/+3
| | | | | | | | | | | This setting is useful when developing a new UI set, and one may not initially know about the suppression of errors, which is a painful problem to run into. Furthermore, make sure to delete the failed component so that subsequent attempted use of it doesn't succeed if UI_DELEGATES_DEBUG isn't enabled. Change-Id: I3d2abc19fb4a007d06795d2e8149ae78d7c9c020 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Enable cmake config files generationJocelyn Turcotte2014-12-121-2/+0
| | | | | | | | | As QtWebEngine now uses 5.x as its version number, we can just provide cmake tests and let qmake scripts do the rest. Task-number: QTBUG-42073 Change-Id: I28ccddbd1849980074dfbeefb5cb5a70c9209ab1 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Force active focus for touch beginAndras Becsi2014-12-081-0/+2
| | | | | | | This fixes the focusing issues on touch devices. Change-Id: I26c0080ea70aeabbd608e15fbd3705b907bdb68e Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fix crashes in QQuickWebEngineSettingsPeter Varga2014-11-061-0/+1
| | | | | | | | Remove QQuickWebEngineSettingsPrivate object's pointer from the global setting list before the object is destructed. Change-Id: I1cca6bf8aa2438903692d9e2ef863c8fc543adbd Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Support Qt::AA_ShareOpenGLContextsPierre Rossi2014-10-291-4/+13
| | | | | | | | | | | | QtWebEngine::initialize happens after QGuiApplication instantiation, so it is too late to simply set the application attribute. In that scenario, we don't want to override the shared context and risk a double free when both QGuiApplication and our cleanup handler try to delete it. Change-Id: Id52884abbb0c2380208876d9c00e8ddbfbc21eda Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Make url handling consistent in widget and quick APIPeter Varga2014-10-282-1/+5
| | | | | | | | Use explicit url in quick API too and use GetLastCommittedURL instead of GetVisibleURL for getting the expected urls in tests. Change-Id: If3251323645979643f3dc0e16491fe35b584f51c Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Add plugins.qmltypes for WebEngine APIMichael Brüning2014-10-151-0/+164
| | | | | | Task-number: QTBUG-41952 Change-Id: Ic21089a34364696c8ff7e68e397e39f8f0b7f5cc Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Add setting ErrorPageEnabledAndras Becsi2014-10-142-0/+19
| | | | | | | | | 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>
* Notify canGoBack/canGoForward on urlChanged instead of loadingChanged.Jarred Nicholls2014-10-091-2/+2
| | | | | | | | | | | | In order to support Fragment (#) based routing and history navigation together, canGoBack/canGoForward properties should be notified when the url is changed instead of when the page is loading. Task-number: QTBUG-41849 Change-Id: Ic995fffa5c683dade88fbd98ffea90527a77261b Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Jarred Nicholls <jarred.nicholls@gmail.com>
* Replace QStringLiteral with QLatin1String where appropriateKai Koehne2014-10-072-3/+3
| | | | | | | | | It's faster to use QLatin1String in places where we don't actually need a QString object (like for comparison, or when creating a string with QStringBuilder). Change-Id: I9b8e28040dc2b79a767e15015b85822d06141bbe Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Doc: Fix issues in .qdocconf filesTopi Reinio2014-10-031-2/+2
| | | | | | | | | - Remove url variable (it's included from global doc config) - Fix qhp selector for QML types - Sort the examples in qhp Change-Id: I7f72aebe4f5482ac922a294ad156f8a73e4ccc6e Reviewed-by: Martin Smith <martin.smith@digia.com>
* Doc: Edited docs according to writing guidelines.Jerome Pasion2014-09-292-93/+85
| | | | | | | | | | | | | -added \since and added commands such as \readonly -converted enum values to use \value -edited language and other minor issues. -only the main Qt WebEngine, the widget docs will be edited later. Change-Id: Ifbb76a6472b5efede15daebc78d605b8b449d957 Task-number: QTBUG-40757 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Various doc tweaksJocelyn Turcotte2014-09-291-1/+1
| | | | | | | | | | | | - Fix the example pages titles to match the qdocconf files - Remove information not as relevant for QtWebEngine as it was for QtWebKit - Fix the QtWebEngineWidgets snippet not to refer to webengine - Remove the dead link and the reference to Arora from QtWebEngine Change-Id: Ib3c57c8dd534330b3323c94fb2217374b3e52cf9 Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Do not crash on QQuickWebEngineViewPrivate::closeJocelyn Turcotte2014-09-121-1/+1
| | | | | | | | This method will be called if JavaScript calls window.close() and it currently crashes because of Q_UNREACHABLE. Change-Id: I50e261ff459879e9befb2a754f0108d7d2f18ca2 Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Use the same version scheme as other Qt modulesJocelyn Turcotte2014-09-111-8/+0
| | | | | | | | | | | | | | | | After trying to get rid of all private header includes, the last standing one is qplatformnativeinterface.h even though its name previously suggested that it isn't private. This would be a complicated piece to expose publically in a way both flexible and binary compatible, and is a task heavy enough to justify committing to follow Qt's release cycle. The QML import version remains to 1.0 and will be incremented the same manner as QtQuick itself does. Change-Id: I6fab5f229d9f79dbc7a3e82d65ad324020929863 Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Remove unnecessary private header includesJocelyn Turcotte2014-09-113-3/+3
| | | | | | | | Most importantly, get rid of QOpenGLContextPrivate::globalShareContext which will be removed before the final. Change-Id: I5796fa822d2962c21fd8b6d8d3c196686d536e3d Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix the type of argument in FilePickerController::accepted() slot.Adam Kallai2014-09-101-6/+8
| | | | | | | | | The filesSelected QML signal is connected to FilePickerController::accepted slot but the type of the parameters were different. Change-Id: I36a33857b557797fc18699144c4d558d0e454cf8 Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix url stored in LoadRequestPeter Varga2014-09-052-10/+10
| | | | | | | | | | The test_urlProperty() qml test has failed because the active url was stored in LoadRequest in case of LoadFailedStatus. With this fix the loadRequest stores the url of that page which implies the request. Change-Id: I6aab814a4a7d3b47043b03fccde3d9995b40d8fa Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Don't forward loading of error pages to the API layerPierre Rossi2014-09-022-1/+5
| | | | | | | | | | | | | | | | | | The fact that the error pages are HTML and get loaded through the same mechanism should be kept an implementation detail and not be considered as a new load in the API sense. Also implement HasErrorPage for good measure and remove an anoying warning from the demo browser. The issue of the url not being changed remains in the QML test (but it doesn't affect a typical browser-like UI since the user input is still there untouched in the address bar), just make sure that failure does not affect the later checks. It also seems like we have a focus problem somehow, but the test should probably use a click for that matter. Change-Id: Ib5e363981a11287fdf4bfe84b93c999d96ed8087 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Settings for Qt quickPierre Rossi2014-09-0210-22/+562
| | | | | | | | | Expose settings in experimental for now. Simply use the global/per-view mechanism as a group level in between seems like overkill. Change-Id: I7610e9c7765ccb41674702acdd24a52b87716da8 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Add Qt WebEngine Widgets API for allowing certificate errorsAllan Sandfeld Jensen2014-08-292-0/+7
| | | | | | | | | | | This adds API for overriding some certificate errors. Once overridden any identical error for the same hostname and certificate will use the same override. Similar API for QtWebEngine QML should be added in a later patch. Change-Id: I144147b86d9b592e3f87346a1e48890acee0c670 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Cleanup use of QJSValue::engine()Pierre Rossi2014-08-281-1/+2
| | | | | | | | | | Not only this causes warnings because it is deprecated, it lead to a crash in our QML tests when the callback fails to return a valid engine instance. Change-Id: I9412f138f87c39fbee8dbb6121a5bf0a69dcfbb4 Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Update license headers.Pierre Rossi2014-08-281-15/+10
| | | | | | | | 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>
* Doc: Added some links among the pages.Jerome Pasion2014-08-262-1/+11
| | | | | | | | -increases visibility to those pages. Change-Id: I6b776157eee991907c8e2bc16c63df90a85663a3 Task-number: QTBUG-40757 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Update the version numbers for the WebEngine QML types.Zeno Albisser2014-08-211-4/+4
| | | | | | | | For the WebEngineVersionBumper we have to remove the major version bits after right shifting to determine the minor number. Change-Id: I09f47dd261dc8de1e5cc94085ac3fdf3503588fb Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Update License Headers for Qt WebEngine to LGPLv3.Zeno Albisser2014-08-2129-434/+291
| | | | | | | 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>
* Propagate the page's screen coordinates when the top-level window movedJocelyn Turcotte2014-08-204-9/+21
| | | | | | | | | | | | | | | | This fixes a regression after the 37 upgrade where the select popups would have the wrong position. Adjust to the new behavior and also avoid doing a mapToGlobal of the position received in InitAsPopup. RWHV::SetBounds has been giving us screen coordinates since the Chromium 33 update, but popup locations somehow managed to work properly through some side-effect sorcery. This also fixes the value of window.screen[XY] in JavaScript which wasn't updated when the window was moved. Change-Id: I544499bafedccfb7d389b4abc48f1386c398473f Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Tell ANGLE to enable multithread protection.Michael Brüning2014-08-191-0/+4
| | | | | | | | | | | | | | This is done on initialization of the Web Engine as this should happen before any contexts and Direct 3D devices are created. It makes D3D9 create a device with the D3DCREATE_MULTITHREADED flag and makes D3D11 enable multithread protection using the ID3D10Multithread interface. Depends on the appropriate counterpart in QtANGLE. Change-Id: I8204de2f8ebe993273ff9f11af55caacb1290e4e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* Update the library and QML version to 1.0Jocelyn Turcotte2014-08-121-1/+1
| | | | | | | | Also update all the examples to use 1.0 as 0.9 shouldn't be publically recommended. Change-Id: Ic58e35bdfd3a0f3d5201fc069b7103027ba84574 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Ground work for Settings/PreferencesPierre Rossi2014-08-092-0/+27
| | | | | | | | | | | | Core interface to expose toggling some of the WebPreferences for now and most probably some of the WebRuntimeFeatures soon. The whole dummy settings business is meant to keep things from breaking too much when bisecting, because it is assumed that there are always valid settings for a given adapterClient. Change-Id: Ic0a62bcb5af8c0254436dc770b43cde5016c3bbd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* Add findText to Quick APIPeter Varga2014-08-072-1/+33
| | | | | Change-Id: Ic0de45c1fe2a5537d61ad446c96fe8fda7c30966 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Get rid of QOpenGLContextPrivate::setGlobalShareContexJocelyn Turcotte2014-08-061-2/+4
| | | | | | | | | | | Manually import qt_(set_)gl_global_share_context from QtGui instead. The binary compatibility of those symbols should be maintained in QtGui, allowing us to avoid depending on private API. Change-Id: I1f954ec10a793c3195d3aec01409dde1bc767d64 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Use QSGEngine instead of the private QSGRenderContextJocelyn Turcotte2014-08-061-2/+1
| | | | | | | | | QSGEngine was added in Qt 5.4 to allow using the scene graph without QQuickWindow. Use it for our FBO as well as for the QOpenGLWidget rendering. Change-Id: If4665d4f33c9dad69d2d4269309163bb5ffbd8e3 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Move the runJavaScript function from experimental to public APIAndras Becsi2014-08-064-10/+25
| | | | | | | This is essential API that should be public. Change-Id: Ifbd86171933936112e2495ebed074faa2e52464d Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Clean up opaque pointer handling for QQuickWebEngineLoadRequestAndras Becsi2014-08-062-20/+30
| | | | | | | | | Hide QObject's d_ptr member and use the macros when accessing the private class. This patch also adds missing qt namespace macros to the implementation. Change-Id: I004e3ea52bf21618835724d218f2a405f77ca4d1 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Add QQuick API for intercepting navigation requestsAndras Becsi2014-08-067-0/+233
| | | | | | | | | | | | Add missing navigationRequested API to be able to intercept navigation requests. This is useful for ignoring requests for example in kiosk-like applications that want to restrinct navigation to a specific url or domain, or want to disable specific types of navigation requests (e.g. reloading, clicking links, form submissions). Change-Id: Ie375e635a3c3566527972d05f5d99b39489c5ca8 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Expose better error information in loadRequest.Pierre Rossi2014-08-041-0/+4
| | | | | | | | | | | | Use the chromium localized error strings for that purpose, otherwise the error description is always empty. While we're at it, let's tap into the chromium error pages, which should hopefully make sense for most errors, and add some static asserts to check that the qt quick enum and the core one are in sync. Change-Id: Icf8fa7c3bf4a674c60a10950422135fb6930447a Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* s/QWebEngine/QtWebEngine/gPierre Rossi2014-08-042-5/+10
| | | | | | | and make it a namespace Change-Id: I15c1af8c7d0d8ab213cdf7945109263fe461d2ac Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Don't inherit from Qt private typesJocelyn Turcotte2014-08-044-5/+10
| | | | | | | | | | | | | Do the d_ptr magic ourselves to avoid having to include private headers from qtcore, qtgui and qtdeclarative. It is hackish to hide QObject's d_ptr member to have the macros working in a public class, but if anything goes wrong we just need to replace the private macro convenience while maintaining the binary compatibility of the stored extra opaque pointer. Change-Id: Idb92f4f902826bef9068a5c2ef6ea31fc3fa15b2 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Don't use the private QQmlMetaType::defaultPropertyJocelyn Turcotte2014-08-013-6/+17
| | | | | | | | | Duplicate the small implementation of that function, which uses QMetaObject public API together with the semi-public fact that the meta class info named DefaultProperty needs to be fetched. Change-Id: I37413bd28a0b0ead55853e4e3db5864dfc39966b Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Fix tab focus in the widgets and QML webviewsJocelyn Turcotte2014-08-013-13/+0
| | | | | | | | | | | | | | | | | | | | Fixes: - Make sure that we call SetInitialFocus when giving focus through Tab This does the same as would WebContents::FocusThroughTabTraversal - Implement QWebEnginePagePrivate::passOnFocus - Set each new RWHVQtDelegate as the focus proxy of the QWebEngineView - Make sure that the widgets delegate accepts the tab focus policy Cleaups: - RenderWidgetHostViewQtDelegateQuick doesn't need to be a focus scope, it doesn't have any children - We don't need to reimplement QQuickWebEngineView::forceActiveFocus since the view is now a focus scope - Do not explicitly setFocus(true) on the QQuickWebEngineView, the application should decide this through the API Change-Id: I817dc2c895d4fff4aa3536c71ecc5d306bb3bee0 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Don't use the private QQuickItemPrivate::focusNextPrevJocelyn Turcotte2014-08-011-1/+3
| | | | | | | | | | Do what focusNextPrev does internally. Also fix the tab-focus by getting the next item relatively to the delegate (the scopedFocusItem()) instead of the view itself. Change-Id: I0d35a12bd5ef54d69df35b29ccdd55ac2301eec8 Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Don't use the private QGuiApplicationPrivate::platformIntegration()Jocelyn Turcotte2014-08-011-3/+1
| | | | | | | | Querying the platform names directly will be just as reliable as we are still only supporting a limited number of platforms. Change-Id: I9feba66b6ac23281db4d0ba675cc9a1e5560daea Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Drop 5.2 supportJocelyn Turcotte2014-08-011-5/+0
| | | | | | | We actually already depend on dev (5.4) in other areas. Change-Id: Iab297a51ab06209a96f11f97c74463d38203eda8 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Add loadVisuallyCommitted signal to the experimental Quick APISzabolcs David2014-08-013-0/+16
| | | | | | | | | This fixes the flaky QQuickWebEngineViewGraphics test and extends it with a new test case. Change-Id: I2d8a0762716cb9232fdea6473760e67ac2e7146d Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Qt Quick based accessibility glue codeFrederik Gladhorn2014-07-263-0/+77
| | | | | | | | With this patch the accessibility hierarchy inside webengine becomes accessible when navigating from Qt Quick based web views. Change-Id: Ic1c8caaa908bd32e4175ee9dcdb7a6bef89818b6 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix warnings produced by QT_ASCII_CAST_WARNINGS in ui delegatesAdam Kallai2014-07-241-1/+1
| | | | | Change-Id: Iffb04ff0c61e7a5e0c42ca224b1b04d0a62c66f8 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* RWHVQDQ::contentsRect can be called by chromium before the view has a window.Zeno Albisser2014-07-211-1/+3
| | | | | | | Change-Id: I50e3a2ba95b3c0b49af2139f763f11154defe503 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Michael Bruning <michael.bruning@digia.com>