summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix WebEngine api build on WindowsZoltan Arvai2014-02-112-0/+5
| | | | | | | | QQuickWebEngineViewPrivate needs a destructor to work right with WebContentsAdapter. Change-Id: I3df1b452eeaf3a7516eace9268884ff6d1211e44 Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Fix WebEngineWidgets api build on WindowsZoltan Arvai2014-02-111-0/+8
| | | | | | | | MSVC doesn't know __func__ so it needs to be defined. Also eliminate some unused variable warning. Change-Id: Ia42e411c0af8425a71faf99a87dbc0affac53015 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix string concatenation in WebEngine on WindowsZoltan Arvai2014-02-111-0/+6
| | | | | | | | | | MSVC thinks the firs part of that string is wide while the second part is narrow and it won't allow to concetanete them directly. Adding literal for wide string before ".qml" on Windows will resolve it. Change-Id: I934fed6fe9e9401461a8165a524e8110cec3c3fa Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fix Qt5WebEngineCore linking on WindowsZoltan Arvai2014-02-111-1/+2
| | | | | | | | | | BUILDING_CHROMIUM define have to be moved to the related project in core from default_pre.prf. Otherwise dllexport would be used instead of dllimport while linking to webengine and webenginewidgets. Change-Id: Ifed117f420591dcb7f97f12924b83ab86ead6216 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Implement requestFullscreen for QQuickWebEngineView.Zeno Albisser2014-02-116-0/+51
| | | | | | | | | | | | | | This patch adds a property isFullScreen and a signal fullScreenRequested to QQuickWebEngineViewExperimental. The signal fullScreenRequested is emitted when some web content requests fullscreen through the javascript API. The property isFullScreen is supposed to be set programmatically when the view is being shown fullscreen. This information is then available to the WebContentsDelegateQt when checking if the fullscreen request has been accepted. Change-Id: I04cbb45f263a188d26cc87d70ac53b0fbab63936 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Add TakeFocus in WebContentsViewQt for passing on tab focus.Zeno Albisser2014-02-107-1/+28
| | | | | | | | | | Chromium calls RenderViewHostDelegate::TakeFocus when the last focusable item within the page was reached. We then have to move the focus on to the next/previous QQuickItem. Change-Id: Id0128053602ff1220c1bced1b218050b66fef659 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Implement basic support for input method events.Zeno Albisser2014-02-084-0/+27
| | | | | | | | This is needed to get text input working again on Mac. Underlines are currently being ignored. Change-Id: I2a1074a1151e9be6f96ebe12fd0bb40a0eb63d6a Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Use arm_neon_optional from armv7 onward if not explicitly enabledAndras Becsi2014-02-061-6/+10
| | | | | | | | | This makes our behavior consistent with chromium if the Qt toolchain does not explicitly enable NEON instructions, which would result in undefined symbols otherwise. Change-Id: Idc4f355714ede4206f4650664f6c24784100e7d8 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Register a path provider for Qt instead of using PathService::OverrideAndras Becsi2014-02-065-26/+96
| | | | | Change-Id: I465a5465ec4189b077a8c1cbab7485c628eca899 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Move the implementation of BrowserContextQt to its own cpp fileAndras Becsi2014-02-055-90/+170
| | | | | Change-Id: Ie44a8733e3f9123c3d086f8df9ddcf2833bd235b Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Clean up qtwebengine.gypiAndras Becsi2014-02-051-50/+33
| | | | | | | Fix the indentation and remove some obsolete settings. Change-Id: I59d3c00f481b2ae124e1b3a6434ff5c68acde53d Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fix the embedded buildAndras Becsi2014-02-057-9/+65
| | | | | | | | | | Adopt to toolchain changes and fix the build with the current snapshot. This patch adds some missing overrides and build system configurations. Change-Id: I488929500347bdb5a077ac14e9553cedfcaa605d Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Quick: Support reparentingArvid Nilsson2014-01-3113-72/+104
| | | | | | | | | | | | | | | | | To support reparenting, we make the compositing surface independent of the window by using gfx::TEXTURE_TRANSPORT. We also need to be able to keep frame data across window changes so we can reconstruct the QSGNode tree in a new context, so extract that data into DelegatedFrameNodeData class. Any context-specific data is still stored in DelegatedFrameNode. Also hook up window changes to WebContents::WasShown/Hidden for Quick. Remove checking of Qt isVisible state, this mechanism is used to sync Chromium with Qt, not the other way around. WasShown/Hidden is orthogonal to Show/Hide, and can use different triggers. However for Widgets it probably makes sense to hook both up to widget visibility. Change-Id: I1ef4b50cd61b8e54b791e03f0b41929c42fec8bf Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* WebPage: Implement javaScriptConsoleMessagePierre Rossi2014-01-309-1/+34
| | | | | | | And unskip the corresponding autotest. Change-Id: Ida2dcee38b261b2ba4ad0c5c016f5510ed1590a4 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Remove a FIXME after Chromium update.Szabolcs David2014-01-281-2/+1
| | | | | | | Load progress is already available in the current snapshot. Change-Id: I997b25a1da284b43d442d3105105be3455628087 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Pre-start the render process upon initialiazing the adapterPierre Rossi2014-01-282-4/+9
| | | | | | | | | | | | | | | This should provide us with an initial empty document, which our imported autotests tend to assume all over the place. Initialization of the adapter is moved further down in QQuickWebEngineView's constructor so that the value of q_ptr is set and valid by the time we end up in WebContentsViewQt::CreateViewForWidget. Change-Id: I45d8d61e65caa3a690461b6da44adea9f8981e7e Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix the build on embedded platformsAndras Becsi2014-01-283-2/+6
| | | | | | | | | | | | | | | We should not include chromium headers outside of core since they might depend on defines or other build options only set in the gyp/ninja environment. This patch removes the need to include net/base/net_errors.h in the API implementation of the QQuickWebEngineView and also removes the chromium source directory from the global include path. This prevents including chromium headers outside of core by mistake and also makes it possible to load the project in QtCreator without disabling indexing. Change-Id: Icd13b6caa52509ef2a1b6b44eaffb34d8ae4addf Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Add loadIgnoreEmptyUrl test case to loadUrl QML test.Szabolcs David2014-01-281-0/+3
| | | | | Change-Id: I56c78aa7e60194888123d372c6dbbb60624856c5 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Add loadUrl QML test with stopStatus test case.Szabolcs David2014-01-281-0/+1
| | | | | | | Fix the webEngineView.stop() function in the WebContentsAdapter. Change-Id: I82c5000fb3cbc5aff59dd0c4c7c86ca7755a6329 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Clear callbacks with an empty value on page destructionJocelyn Turcotte2014-01-221-3/+15
| | | | | | | | | | | | | | | The current implementation offers no way to cancel async requests. This means that normal applications could easily allow callbacks to dereference a destroyed object unless they use a smart pointer within the callback function object. This patch will empty the pending callback list by calling each of them with an empty value. This will at least allow applications to cover the cases where the page is expected to have a shorter or equal lifetime than objects referenced in the callback. Change-Id: Ia9fc556b03f5d83f904a0ff4b05dc9e440ea488c Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix html5 videoAndras Becsi2014-01-224-1/+22
| | | | | | | | | | Deploy the built ffmpegsumo library and make chromium find it by overriding the content::DIR_MEDIA_LIBS path with the deploy location. We deploy the plugin to $$[QT_INSTALL_PLUGINS]/qtwebengine. Change-Id: I0aeb37fccd2af62b23f8e6405041655e1f66b7aa Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Fix a crash in JavaScriptDialogControllerPierre Rossi2014-01-221-4/+5
| | | | | | | | | | We already remove the active dialog for a given WebContents from the map when it's accepted/rejected. We should hence not expect to get a valid dialog controller on subsequent attempts (when the WebContents get destroyed for instance). Change-Id: I522308e20772a55f1bcba26047b3f4e4aef94082 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fix JavaScriptDialogControllerPrivate's typeZoltan Arvai2014-01-221-1/+1
| | | | | | | | | It used as a struct in javascript_dialog_controller.h but it is a class in javascript_dialog_controller_p.h. Change-Id: I3b2fdf26a1673fb5fef5f7c468367eca559493f8 Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Implement QWebEnginePage::toHtml and toPlainTextJocelyn Turcotte2014-01-2212-2/+111
| | | | | | | | | | | | | | | | Those methods are now made asynchronous and need to be given a callback to handle the result. Update the code in the browser and fancybrowser examples using std::bind when using C++11 or tr1::bind with C++03 (which should be available with compilers on platforms that we support). Add a (currently failing) earlyToHtml test to make sure that an empty page doesn't crash because of a possibly incomplete attachment of the QtRenderViewObserver. Change-Id: I3ab7cb6f25b91b584dd80df5e4e9ad1e3214348e Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Add a stub message system to communicate with the blink WebViewJocelyn Turcotte2014-01-2213-2/+428
| | | | | | | | | | | | | | | | | This follows the model used by the Android WebView's AwRenderViewExt class. QtRenderViewObserverHost is attached to the WebContents and QtRenderViewObserver is attached to the RenderView in the render process. Both can exchange messages together and allow async commands to be carried from WebContentsAdapter and the result sent back through WebContentsAdapterClient. This patch also adds a renderer subdirectory to start matching the directory structure of Chromium. Change-Id: I724ca2fe2a597dcd2a15e8e1a23c4eeba1190703 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Refactor the callback mechanism used by runJavaScriptJocelyn Turcotte2014-01-227-49/+59
| | | | | | | | | | | | | | | | | | This prepares the way for other API made async like toHtml and toPlainText. Use a callback class with an implicit templated constructor to carry the functor across the API boundary and avoid the intermediate helper method as the ABI that we have to maintain. Also pass the callback result through WebContentsAdapterClient using a bookkeeping ID instead of transferring the callback to WebContentsAdapter. This will allow other calls, which might not already allow passing a callback functor, to use a consisten way of carrying back the result to the top API layer. Change-Id: Ia923767b9c1021a108c26da17d4c41878ef7cb95 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Implement QWebEnginePage::setHtml and setContentJocelyn Turcotte2014-01-224-0/+39
| | | | | | | | | | Load a generated data: URL to carry the data. This is not as efficient as it could be but the behavior matches and this should be fine for now. Change-Id: I26ad2e5976025a3044fb03f066074ce6dd34e575 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix QWebEngineView to page reattachment.Jocelyn Turcotte2014-01-175-3/+21
| | | | | | | | This fixes the crash in tst_QWebEngineView::reusePage. Also add a test to check the case where show() would react incorrectly. Change-Id: I40247c7c225d74b26675b6a7fa5ff1f06d3bb3e6 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Qt Quick File PickerPierre Rossi2014-01-157-2/+158
| | | | | Change-Id: I6195c49f1647c78b16d9d47770ab37ba998a61a5 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* JS dialogs in QtQuickPierre Rossi2014-01-1520-27/+597
| | | | | | | | | | Refactor JavaScriptDialogManagerQt to support a Qt Quick dialogs friendly approach. Qt Quick dialogs are still missing a prompt, so we use a "handmade" one. This should be solved before 5.3 though. Change-Id: I965df66837b2e81d6e4618a8da1167a37661c26e Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Pave the way for our UI delegation strategy.Pierre Rossi2014-01-1511-5/+626
| | | | | | | | | | | | | | | | | | | Starting with the context Menus for QtQuick. Add default UI delegates as a subproject. We allow ourselves to use Qt Quick Controls there for in order to get a nice "out of the box" experience for things like context menus, dialogs, etc while leaving the door open for system embedders to override this. Opting out of the deployment of these QML files is still very primitive but can be done by passing WEBENGINE_CONFIG+=no_ui_delegates at qmake time. Customization of context menus could be done via a qml component, which is probably best kept in experimental for now while we address its shortcomings. Change-Id: I0705b20d5ddd3bb010f9371b65a181c6b02a03e1 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* [Widgets] wire the file pickersPierre Rossi2014-01-1510-13/+137
| | | | | | | | | | | | | | | 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 placement of webengine processSimon Hausmann2014-01-151-2/+2
| | | | | | | | | In developer (non-prefix) builds, the binary goes to $$MODULE_BASE_OUTDIR/libexec, which is practically qtbase/libexec. In prefix builds it'll be linked to $module_toplevel/libexec and installed into $prefix/libexec. Change-Id: Ia42519f3113976e707fbda9e09dbf7ef6e235924 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Implement QQuickWebEngineLoadRequest classAdam Kallai2014-01-1511-11/+277
| | | | | | | | It contains information about a requested load of a web page. Change-Id: Ie45706adb51ee5bce98e7af01252d9a8389db57d Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix ContentMain calling in processMain for WindowsZoltan Arvai2014-01-131-0/+11
| | | | | | | | | | ContentMain has a different parameter list for Windows. Currently no sandbox is in use, just fitting in with the required parameters. See chromium/content/app/content_main.cc. Change-Id: I6c3918efaafbf48bd4a07f377be51c22c5355cd0 Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix RenderWidgetHostViewQt::GetCompositingSurface() on WindowsZoltan Arvai2014-01-131-0/+4
| | | | | | | | | gfx::GLSurfaceHandle needs reinterpret_cast for the first parameter to match an overload. Change-Id: I4b89c38b9694ab649e1e623049573675c926a4a7 Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fix WebEngineContext on WindowsZoltan Arvai2014-01-131-0/+4
| | | | | | | | | | | | AppendSwitchASCII won't accept WChars, it would need WideToASCII conversion. But on OS_WIN AppendSwitchASCII method only wraps parameters for AppendSwitchNative with ASCIIToWide. Doing ASCIIToWide(WideToASCII()) not seems to be a useful idea, so we should call directly AppendSwitchNative on Windows. See chromium/base/command_line.cc. Change-Id: I9733993840ddaef2dbb3176135977c39a967e381 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Disable Werror by defaultPierre Rossi2014-01-111-0/+3
| | | | | | | | | We don't want everybody to have to go and tweak ~/.gyp/include.gypi just for that purpose. Change-Id: I67533a62246dea45c4b5a5a454f43d01328d472f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix gpu::gles2::MailboxName on WindowsZoltan Arvai2014-01-111-1/+1
| | | | | | | | | | It is "struct GPU_EXPORT MailboxName" in chromium/gpu/command_buffer/service/mailbox_manager.h. MSVC won't accept class. Change-Id: I979808f357b32e1d99fe70a1138bf292b54c4e76 Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix overrides for WindowsZoltan Arvai2014-01-112-1/+6
| | | | | | | | | | Add not yet implemented overrides to render_widget_host_view_qt.h. Remove ambiguous and unneeded override from browser_context_qt.h. Change-Id: Id1cac9bf811d8e128e5ba8df059f7ca3bdd919dc Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Andras Becsi <andras.becsi@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>
* Fix DownloadTargetHelper::determineDownloadTarget on WindowsZoltan Arvai2014-01-101-1/+1
| | | | | | | | | filePathForCallback.AddExtension won't accept const char[] with MSVC. It needs to be converted with the appropriate function. Change-Id: I95506de702eab4d7b61ddf051c7a122c793da35b Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Implement WebEngineError class for handling ErrorDomainAdam Kallai2014-01-103-0/+154
| | | | | | Change-Id: I6092483d46b8d0db6193b92f2744bd836beb4912 Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Remove Q_UNUSED(uri) from webengine/plugin/plugin.cppAdam Kallai2014-01-081-1/+0
| | | | | | Change-Id: I403e7e3c89bd1881b96b1cc345ccdf115ceea5e9 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* createWindow QML API for QQuickWebEngineViewJocelyn Turcotte2013-12-233-3/+98
| | | | | | | | | | | | | | | | | | | | | | | | | This implements adoptNewWindow for QQuickWebEngineView. The API is only intended to be used through QML to avoid delegating the QQuickWebEngineViewHandle ownership through a signal parameter. Another limitation of the implementation is currently to fail the handle adoption unless it is done synchronously within the adoptNewWindow call. To support this we would need to delay the call to WebContentsAdapter::initialize which will leave the adapter without a client when returning to the event loop and would require putting null checks everywhere it is used. So I would prefer to keep the API limited and avoid potential crashes. If we want to support asynchronous Loader elements or QML files fetched from the network in the future, the API should be able to scale to the task once we've adjusted the implementation. This also adds basic tabs support in the quicknanobrowser example. The url property is now set imperatively to avoid overwriting the adopted WebContentsAdapter's loading URL. Change-Id: Iba5c5dc3ffa21045f356be131ca15c01b9aee7c8 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Make inspector listening port configurableXiaobo Wang2013-12-211-1/+14
| | | | | | | | | | | | Currently we use fixed port 1337 as inspector port. When weblauncher is launched by chromedriver it passes the inspector port as commandline argument --remote-debugging-port=<port>. Later on chromedriver will try to communicate with chrome via that port. We should use that port when starting devtools HTTP handler. Change-Id: I83e3341a535d50a129670bd0056b3ca448c8e2e5 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix the QQuickWebEngineView rendering with 1650.Jocelyn Turcotte2013-12-201-0/+12
| | | | | | | | | This is now initialized by Chromium in ContentMainRunnerImpl::Run, which we bypass for our browser process. Change-Id: Id8233df3fe12048cd2b6eaf870b161ab5d1eb089 Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Adapt to chromium API changes in refs/branch-heads/1650Andras Becsi2013-12-207-14/+17
| | | | | | | This patch also updates src/3rparty to the new snapshot. Change-Id: I56da8d795051a828d7b375e57c4dda8bc570229f Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Avoid errors when closing the applicationJocelyn Turcotte2013-12-161-2/+9
| | | | | | | | | | This also fixes the crash on shutdown encountered when returning a TEXTURE_TRANSPORT GLSurfaceHandle from RenderWidgetHostViewQt::GetCompositingSurface. Change-Id: Ic92238907a3e7f9d0db4bf114269c1ca5cca5aa6 Reviewed-by: Arvid Nilsson <anilsson@blackberry.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix a crash when opening a window.Jocelyn Turcotte2013-12-161-1/+1
| | | | | | | | | | RenderWidgetHostViewQt::GetViewBounds gets called early than RenderWidgetHostViewQt::setAdapterClient when a new window is created by Chromium. Change-Id: I5ad61fc54ae773200403b222110a1d0ad541f941 Reviewed-by: Arvid Nilsson <anilsson@blackberry.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>