summaryrefslogtreecommitdiffstats
path: root/src/core
Commit message (Collapse)AuthorAgeFilesLines
* Fix the build with recent qtbase0.9Andras Becsi2014-08-131-0/+2
| | | | | | | | | | | | | Since 3cd70c11bc7bbe3c5e9e4972d2273cf51bbdc30e in qtbase Qt modules require cmake tests to be present which makes QtWebEngine fail with "Missing CMake tests." We do not support building with cmake at this point, so disable these tests by setting CMAKE_MODULE_TESTS to '-' for module pro files. Cherry-picked from: 1.0/bef6cc644f176a69a85c68126bd0d7e50ab5757e Change-Id: I41d5006c48ea51cbaad919072dced414a923c97f Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Ignore GPU blacklist on embeddedAndras Becsi2014-06-271-0/+2
| | | | | | | | We have to pass this flag on half of our devices anyway so we can just as well pass it by default. Change-Id: I652fac478f389b91ee69d2273747583e2678fd13 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Do not use fence sync on the i.MX6Andras Becsi2014-06-241-0/+26
| | | | | | | | | | | The change to check for the correct EGL_KHR_fence_sync extension revealed that on the i.MX6 SabreLite the eglClientWaitSyncKHR call results in a crash, but since for this device glFlush() seems to be enough to sync GL commands between threads, we can skip creating a fence if we run on this hardware. Change-Id: I208c7f390c9ceb792720f4e060c4a76c5db53e8f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Check for EGL_KHR_fence_sync instead of EGL_KHR_reusable_syncAndras Becsi2014-06-231-2/+2
| | | | | | | | | | | | We created an EGL_KHR_fence_sync on the chromium thread but tried to verify if the wait function implementation is available by testing for the EGL_KHR_reusable_sync extension in the scene graph thread. Since the latter extension is not supported by most of our devices, we never actually waited for the rendering to finish. Change-Id: Ied829d4035d42899cfb3f86de018bc48e61c0cc0 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Buildfix after Iacc6cff82c0f071d1c8901977748d6164fb0a87d.Zeno Albisser2014-05-201-0/+2
| | | | | | | We only do have the scoped_ptr m_surfaceFactory on Android. Change-Id: Ia377afa9a8662498fca005994bd5fbec5c41bc9e Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Use the same switches for both embedded Linux and AndroidJocelyn Turcotte2014-05-192-2/+7
| | | | | | | | This also explicitly enables impl-side painting, which is enabled by default on Android, hard-coded behind an #if defined(OS_ANDROID). Change-Id: Iacc6cff82c0f071d1c8901977748d6164fb0a87d Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Fix jerky pinch-zoomingJocelyn Turcotte2014-05-191-1/+0
| | | | | | | | | | | The kEnableScrollPrediction switch uses event timing to extrapolate events but this considerably reduces the smoothness of pinch-zooming. Assuming that this feature expects very well timed events, which we don't have in most of QPA platform plugins, disable the feature. Change-Id: I96bdd8b9e9cc870e232ad9c98bcad5857608870b Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix the build on eAdroidAndras Becsi2014-05-191-1/+1
| | | | | | | | | The eAndroid mkspec also sets linux, and since the qnx change we ended up including both android and linux configs. Make it more obvious why the else is there. Change-Id: Ia97483d410e280bbb4f4b56cf6fd351f6a4bbbca Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix fling gesturesJocelyn Turcotte2014-05-192-2/+12
| | | | | | | | | | | | | | | InputHandlerProxy::HandleGestureFling assumes that the timestamp on the fling gesture is in the same system as base::TimeTicks. By giving it our smaller relative event timestamps (most often taken from a QElapsedTimer) this ends up here being calculated as a negative time on the fling animation curve. Fix the issue by applying a delta at the ui::TouchEvent conversion so that the resulting GestureFlingStart has a timestamp that can be reliably interpreted. Change-Id: I5e149bf64887305119643359495f89be6e0c3ffb Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix a crash preventing us from using ImplSidePaintingJocelyn Turcotte2014-05-162-12/+18
| | | | | | | | | | | | | | Because of an uninvestigated reason, ImplSidePainting can cause more than one quad to use the same resource_id in one delegated frame. Fix the issue by first checking if m_data->mailboxTextures contains a texture for the resource_id before overwriting it. This also re-enables the feature on OS_ANDROID where it is enabled by default. Change-Id: Ie7842f958e1c049db71ffc2a0a768a5725102a3d Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Set the QtWebEngine modules version to 0.9.0Jocelyn Turcotte2014-05-162-1/+2
| | | | | | | | | | | | | | | | | | | | Also make sure that this version number appears in the user agent string and in the QML imports. The plan, unlike other Qt modules, is to keep our module and QML versions in sync to make it easy for developers to figure out what API is available in a given version. The QTWEBENGINECORE_VERSION_STR define is explicitly set in the .pro file since we don't call syncqt to generate a version header for the core module. The 0-major version currently causes the library name to start with libQt0 instead of libQt5, but this is something that we can fix in qtbase once we want to officially support linux desktop with QtWebEngine 1.0.0. Change-Id: I31915e84869b4db456416ef1f85a2296b8a06c99 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add initial build configuration for QNX.Jeff Rogers2014-05-163-0/+19
| | | | | | | | QNX is using Ozone, so exclude gl_context_ozone as well. Change-Id: Icdad9eed3211e9b095fbf884bc5e0243b551c1bb Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Arvid Nilsson <anilsson@blackberry.com>
* Remove obsolete QNX exclusions.Jeff Rogers2014-05-161-6/+0
| | | | | | | | | QNX has since changed to Aura and no longer has its own implementations of those files. Change-Id: I193dfa82093530742e6c6599750972bce0e69e39 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Arvid Nilsson <anilsson@blackberry.com>
* Make gyp to dump debug symbols for separate_debug_info buildsAndras Becsi2014-05-152-0/+6
| | | | | | | | | With this patch we get usable debug files. This also makes qmake strip the core lirary from unneeded sysmbols which is especially beneficial on embedded. Change-Id: Ic1cadd87dbedb9817512a8b4f251cc3e43f028d1 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Enable GLContextHelper and register a SurfaceFactoryQt on eAndroidAndras Becsi2014-05-156-7/+34
| | | | | | | | | | | | This is needed to run on certain hardware that needs the shared EGL contexts to be created on the same thread. To prevent a deadlock on eAndroid only use a blocking connection if we are not on the main thread where the singleton was created, since there is a call to this from gpu_info_collector_android before the GPU thread is launched. Change-Id: I6887ad1218b8426097f454741dc5a79ee94f9d62 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Remove a reference to content shell in devtoolsPierre Rossi2014-05-131-1/+1
| | | | | | | QtWebEngine seems like a better description. Change-Id: I64fb66ee829b611d50503c9b0f10b968c877ff77 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fix audio not being built on desktop LinuxJocelyn Turcotte2014-05-131-2/+0
| | | | | Change-Id: Idaf5264304d09ae7b2bfe0abee7c53310b50b48f Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Remove the xPath argument from runJavaScriptJocelyn Turcotte2014-05-122-6/+8
| | | | | | | | | | | | | | This value is only used internally by Chromium and risks being removed at anytime, for which we would then have to maintain a downstream implementation. Chromium also only supports frame values, while a complete support of the interface would require also supporting this xPath to point to individual document element by affecting the value of "this", the same way that QWebElement::evaluateJavaScript allowed in QtWebKit. Change-Id: Id0cb1b8e3bdf9a6db0ca786fb5eb46ffd726d165 Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Check properly for EGL extensions before using themLaszlo Agocs2014-05-122-7/+22
| | | | | | | | | | | Always check both EGL_EXTENSIONS and the validity of the returned function pointers. Otherwise bad things happen on EGL implementations that do not have the extension. Fix also linking to EGL. CONFIG+=egl has to be in core_module.pro too. Change-Id: I5e3dc54675d83123fc79e2d27a7af19fcc7f936a Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fix Google Maps not showing tiles when panning/zoomingJocelyn Turcotte2014-05-093-11/+18
| | | | | | | | | | | | The issue is that the web worker that fetches and pre-process the map tiles couldn't be started successfully from a Blob. We were missing the blob: scheme handler that was passed to us in the ignored protocol_handlers argument of BrowserContextQt::CreateRequestContext. Change-Id: I24b726a1577e7092d53b1821efd3e4aa2a66c7d9 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix a crash when attempting to dragJocelyn Turcotte2014-05-085-3/+187
| | | | | | | | | | | | | | | | | Q_UNREACHABLE in RenderWidgetHostViewQt::GetNativeView is now called through RenderViewHostImpl::OnStartDragging since the last Chromium update. Even after removing this, OnStartDragging will now also try fetching the device pixel ratio through gfx::Screen::GetNativeScreen(). Provide a dummy implementation of gfx::Screen only to avoid the crash, the class still doesn't do anything and is filled with Q_UNREACHABLEs to catch if any of those methods are reached in a future Chromium update. Change-Id: I2e9dafab5e4622df97100dd7a859523067635118 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix double clicks needing three presses in QWebEngineViewJocelyn Turcotte2014-05-081-6/+1
| | | | | | | | | | | | | | Since Qt 5.3 QWidget has the same behavior as Qt 4 where it will replace a second MouseButtonPress event with a MouseButtonDblClick instead of sending both. Fix the issue by moving the MouseButtonDblClick ignore code up to the QtQuick code, assume that upper layers will not send MouseButtonDblClick events, and re-replace the MouseButtonDblClick event with a MouseButtonPress in the QtWidgets code. Change-Id: I529dad2de538f486b00eb900ea6d2ed849a3b1f0 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Add test_baseUrlAfterLoadHtml QML test caseSzabolcs David2014-05-082-3/+3
| | | | | | | | Remove unreachableUrl support from WebContentsAdapter::setContent, because this argument behaves exactly the same as baseUrl. Change-Id: I36f92b99b7045c6d3b831481bb04d51a0e05772f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fix an assertion in MediaCaptureDevicesDispatcherJocelyn Turcotte2014-05-071-0/+6
| | | | | Change-Id: I169f142e867ed1bda52dff7f5f66fb88ed802c01 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Remove icu-config workaround and add libraries for eLinuxAndras Becsi2014-05-071-1/+7
| | | | | | | | | | We require that the icu libs are in the default library seach path since we build embedded with use_system_icu=1. This patch also updates the chromium patches and the shasum of the submodule. Change-Id: Ica43fa45e9f5eac712019f5437bb9fde0896e49a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Windows: Fix yet another crash in ContantMainRunnerImpl::InitializePeter Varga2014-05-071-1/+5
| | | | | | | | Without initialization of the SandboxInfo it still crashes: g_broker_services is null. Change-Id: Ib4bc0666fefe0f81b489e0ef3c179eae866f804f Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Set Chromium to EGL on eglfs tooLaszlo Agocs2014-05-061-1/+2
| | | | | | | Don't try to use GLX on regular Linux builds when using eglfs. Change-Id: I491ab4931e3e26869069680aff6aaab499c61986 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Add linkHovered signal to the QQuickWebEngineViewSzabolcs David2014-05-053-0/+9
| | | | | | | | I dropped hovered title support from the QtWebKit API, it seems we don't need that logic. Change-Id: I5617c295344512a35aa526a6f1307f0b21f866d6 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Add WebRTC supportPierre Rossi2014-04-2912-0/+723
| | | | | | | | | | | | | Reuse the MediaCaptureDevicesDispatcher from the chrome layer, pretty much as is, and wire it in with WebContentsDelegateQt and WebContentsAdapter/WebContentsAdapterClient for API delegation. We also need to ensure that our user agent string mentions Chrome and the Chrome version we're based on, in order to please websites that detect feature support that way. Change-Id: I0ddf8cd34e4add96bc36f59adfe8e0384e728d93 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Add a way of using UI dialogs for authorizationPierre Rossi2014-04-296-16/+43
| | | | | | | | We could use this to prompt the user for various feature permissions that we are not ready to expose in our API. Change-Id: If6e6a16aca4142b0564121dfc7677b7c4996f742 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Set target_arch based on QT_ARCH for x86 and x86_64Andras Becsi2014-04-291-0/+3
| | | | | | | This is needed when cross-compiling for the emulator. Change-Id: I499c97df2deba8b91162c8f636bb5a25eba1bc29 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* There is no neon on arm pre v7.Zeno Albisser2014-04-281-1/+1
| | | | | Change-Id: I0a446f916627ec2519c59fd101a140bf21f1a1b3 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Clean up cancel fling gesture and latency info for gesturesAndras Becsi2014-04-251-14/+5
| | | | | | | This is similar to how the aura code changed with the new snapshot. Change-Id: I57ef8a8a42c6b880988068c0de26df59fcf436fa Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Shrink the debug library size even moreAndras Becsi2014-04-251-1/+2
| | | | | | | | | | Pass remove_webcore_debug_symbols=1 to gyp to reduce the library size. In case the symbols are needed CONFIG+=webcore_debug can be passed to qmake. Change-Id: I383aa3c60bfe6a0dc5344d37334b25810087d4e9 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Update eAndroid for new snapshotAndras Becsi2014-04-243-3/+74
| | | | | | | This patch adds configurations and updates command line switches. Change-Id: I0223695cc3a743bb2364a73e56fe5391dc43663d Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Fix links not opening on Google+ and GmailJocelyn Turcotte2014-04-152-0/+25
| | | | | | | | | We missed a very important overload of WebContentsDelegate used by window.open to navigate new pages. The logic is mostly taken from chromium/content/shell/browser/shell.cc. Change-Id: Ib359edb61c1ee6eab89e2ebdc2aad2d944fea712 Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Windows: Fix a crash in ContentMainRunnerImpl::InitializeJocelyn Turcotte2014-04-151-1/+6
| | | | | | | | | It will try to dereference the SandboxInterfaceInfo* that we pass it. Fix the issue by creating a dummy instance on the stack when calling it. Change-Id: Ibdddf4ff9c9e5b179ec1cb1dfb4355a0f9885fd5 Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Windows: Use the runtime library the same way as QtJocelyn Turcotte2014-04-151-0/+3
| | | | | | | | | | | | | Using a custom allocator prevents us from allocating memory in Chromium cc files and freeing it in our code. Always use the normal CRT heap allocator to allow this. This also makes sure that we use the same /M flags for Chromium translation units as for Qt when dynamically linked. We won't support statically linking QtWebEngine at first anyway. Change-Id: Ifa044c7d3cf39929f7e4ca1c4c4cb3a9dea96266 Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Replace uses of QWebEngineFrame with a security origin URLJocelyn Turcotte2014-04-154-4/+13
| | | | | | | | This changes implemented methods. The rest of the references will go away with the public headers cleanup. Change-Id: I82340cd7a4488c4b463489ae98cd9c16de4e7487 Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Fix the leak of resources imported more than onceJocelyn Turcotte2014-04-151-13/+26
| | | | | | | | | | | | | | | | | | | | | | | A compositor owns the resources it produces through its ResourceProvider. A refcount for each resource is kept according to how many times it is exported to parent compositors. If the same resource is sent more than once to the parent, the resource needs to be returned as often in CompositorFrameAck messages to make sure that it gets cleaned up. Since we would overwrite any previous MailboxTexture with a new one when receiving a TransferableResource, this would break the refcount of the child compositor and keep the resource alive. This would cause http://ie.microsoft.com/testdrive/performance/penguinmark/ to continuously allocate new textures in the GPU thread. Fix the issue by counting how many times the resource was imported, as ResourceProvider does itself, and populate ReturnedResource::count according to that value. Change-Id: I3a1f8da41338b5d431592f92fca8ef865ee2415c Reviewed-by: Arvid Nilsson <anilsson@blackberry.com> Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Fix how NewPopupDisposition is exposed in QQuickWebEngineViewJocelyn Turcotte2014-04-152-2/+2
| | | | | | | | | | | | | | | | | | I initially misintepreted the meaning of the enum, assuming that it meant that the window should possibly be blocked. The user_gesture parameter in WebContentsDelegate::AddNewContents is actually doing this, while the popup disposition means that JavaScript requested the window to be opened without one of the standard decoration (i.e. status bar, menu bar, tool bar, etc.). Update the QtQuick API to reflect this, renaming the "isPopup" parameter to a more familiar "isUserInitiated". The popup disposition is named "dialog" to match the previous QWebPage::WebModalDialog enum. Change-Id: Ib0c4bc53671fcf0dd9499aa1be2bbc8c494ba49e Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Map Javascript console message level to enum values.Michael BrĂ¼ning2014-04-142-2/+19
| | | | | | | | Translates the internally used LogSeverity values to enums defined by the QtWebEngine integration layer. Change-Id: I7da0983d4fb5c199e1a2436b5899a43cf6698784 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Buildfix for WindowsZoltan Arvai2014-04-111-0/+2
| | | | | | | | You cannot jump past a declaration with an initializer unless the declaration is enclosed in a block. See MSDN compiler error C2360. Change-Id: I692b0f256decf70b6153703ff59f74596cfc2861 Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Use a fence sync to synchronize GL between threadsJocelyn Turcotte2014-04-105-3/+114
| | | | | | | | | | | | | | | | | The NVidia driver needs more than a glFlush to ensure that GL commands consuming Chromium resources are run only when the resource is completely produced by the Chromium GPU thread. This produces artifacts and an uneven frame rate in WebGL examples on this kind of hardware. Use the same mechanism as used by gfx::GLFence, doing a few things manually to cope with the fact that Chromium and Qt both have their own GL function table and contexts. Change-Id: I33eeb1068994dc4176038a74579ce768b2bccb9d Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Fix broken experimental.viewport.devicePixelRatioArvid Nilsson2014-04-091-0/+8
| | | | | | | | | | | | | | The experimental.viewport.devicePixelRatio should be applied in addition to any native devicePixelRatio inherent in the window system or GUI framework. This patch updates RenderWidgetHostViewQt::OnSwapCompositorFrame to match the implementation of RenderWidgetHostViewQt::GetScreenInfo and take the dpiScale (experimental.viewport.devicePixelRatio) into account. Change-Id: Ieadd9fbc73d937d5b5a318091c1157b281bd23c9 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Sort embedded_linux.pri alphabetically.Zeno Albisser2014-04-091-11/+11
| | | | | Change-Id: Ie907ade6c4888f450ee22d4d6bfd00f0e2d1fa09 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Do not use aurax11 clipboard on embedded linux.Zeno Albisser2014-04-091-0/+1
| | | | | Change-Id: I0ed2bd7f27bfba863331390bd5630b552cd41af4 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Add GLContextHelper class for EGL context creation.Zeno Albisser2014-04-096-1/+174
| | | | | | | | | | | | | | | | | | | | Shared EGL contexts should always be created on the same thread, as otherwise context creation might fail. We use a GLContextHelper singleton that is initialized on startup and creates the contexts when requested through a BlockingQueuedConnection. There is a pretty and a correct solution for this problem. This is the pretty one. It is based on the assumption that Chromium decides to use the same or a similar enough configuration for the EGLContext as Qt previously did. But we prefer pretty over correct as the correct solution would potentially impose a layering violation. This is enabled for all embedded linux devices. Change-Id: I910cc90d0f87fd6d1fe0a475b17ba56cd8c503f6 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Get rid of the BackingStore rendering pathJocelyn Turcotte2014-04-0813-346/+25
| | | | | | | | | Now that the widgets view is also using the delegated renderer, there are no supported configuration that use the BackingStore rendering path, itself on the way of deprecation in Chromium. Change-Id: I4ab889f6a7c65e8447c259faf2c7a98b88c1acf5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Render the widgets view using the scene graph into a QOpenGLWidgetJocelyn Turcotte2014-04-086-20/+20
| | | | | | | | | | | | | | | This means that widgets application now need to setup the GL context sharing as well. QWebEngineWidgets::initialize() must be called, which has the same effect as QWebEngine::initialize(). The QtWebEngineWidgets now depends on the QtWebEngine module to make this happen. Since QOpenGLWidget is only available in Qt 5.3, this patch also disables the webenginewidgets module completely when building using Qt 5.2. Change-Id: I0e99a779d1eb080f2ccf5a338ff0763ad64e6eba Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>