summaryrefslogtreecommitdiffstats
path: root/src/core/render_widget_host_view_qt.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix quicknanobrowser crash on startupJüri Valdmann2018-11-021-4/+5
| | | | | | | | Don't call SynchronizeVisualProperties from updatePaintNode Fixes: QTBUG-71430 Change-Id: I6bd231b22c0473f9fd47ca3cdbcb8262f314bd5b Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Fix background of composition textPeter Varga2018-10-301-4/+3
| | | | | | | | | | The Chromium API has been changed: https://chromium-review.googlesource.com/c/chromium/src/+/959006/ Task-number: QTBUG-70289 Task-number: QTBUG-71453 Change-Id: Ib20a82bd826d8067aa3eb3bccccda7d8716e20ad Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Stop showing speculative framesJüri Valdmann2018-10-291-11/+2
| | | | | | | | | | | | | | | | | | | | | Chromium creates "speculative" frames (RenderFrameHost and company) for pending cross-process navigations (and maybe other navigations too). For example, a redirect from http://qt.io to https://qt.io will trigger this, as described in the bug report. These speculative frames are loading in the background and only shown once they are officially ready (as decided by the RenderFrameHostManager and signaled to WebContentsObserver::RenderViewHostChanged). At least, this is how it's supposed to work and how it works in Chrome. In WebEngine, however, we actually show these speculative frames as soon as they are created and before they are ready. This runs into the problem that the if the speculative frame is dropped (instead of committed), then Chromium will not ask us to re-show the old frame (since it hasn't actually asked to us to show the new frame, it naturally assumes we are still showing the old one). Fixes: QTBUG-68727 Change-Id: I9d53035ce60e3a002d5412d4473d940a32644b5d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove some outdated Qt version checksAllan Sandfeld Jensen2018-10-231-50/+0
| | | | | | | | We can't not build with older than Qt 5.9 anyway due to QSG and qmake changes. Change-Id: Iff0247e70d9ffc1e045e2c571f0089d68df9a589 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Fix four switch related warningsAllan Sandfeld Jensen2018-10-231-3/+6
| | | | | Change-Id: If4888c1b170568735953ac715c4a7c40de614dd8 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Clean up header includes in corev5.12.0-beta3Peter Varga2018-10-201-16/+5
| | | | | Change-Id: I3ffc92eacf30265ecb80061870d213e521e4f838 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* General adaptations for Chromium 69Allan Sandfeld Jensen2018-09-221-4/+25
| | | | | Change-Id: Ifeaf0ee13213dc5a24d2f2b4655cf7f405cddef7 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Handle Chromium resize throttling using surface idsAllan Sandfeld Jensen2018-09-221-7/+31
| | | | | | | | | | We need to change surface id to acknowledge a resize is completed, and we need to handle that Chromium is rejecting resize events because the last one is not yet acknowledged. Change-Id: I93b1e197218906de80d5748a5a100f7a740ea07c Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Adapt to forced scroll-wheel latchingAllan Sandfeld Jensen2018-09-221-6/+19
| | | | | | | | Handle that Chromium now requires all wheel events to be phases despite them not being phased on the majority of platforms. Change-Id: Iabd5630652c0d8fd67563db3d63ef1f2f528c35c Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Adaptations for Chromium 68Allan Sandfeld Jensen2018-09-221-30/+12
| | | | | | Together-with: Tamas Zakor<ztamas@inf.u-szeged.hu> Change-Id: I805246b6f01cb151fff48588744408c676d87c14 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Extract Compositor from RenderWidgetHostViewQtv5.12.0-alpha1Jüri Valdmann2018-09-111-77/+8
| | | | | | | | Split compositing-related functionality from RenderWidgetHostViewQt into a new class Compositor. Change-Id: I97b26a6057734cd8ce8c1df29b373888f7a07c1c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Replace RenderWidgetHostViewQt::m_host by RenderWidgetHostViewBase::host()Tamas Zakor2018-08-241-39/+38
| | | | | Change-Id: I327c2459e803602dae107defec8d03d75f363cd7 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Merge remote-tracking branch 'origin/5.11' into 5.12Michael Brüning2018-08-211-1/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf configure.json examples/webenginewidgets/markdowneditor/resources/3rdparty/marked.js examples/webenginewidgets/markdowneditor/resources/3rdparty/qt_attribution.json examples/webenginewidgets/markdowneditor/resources/markdowneditor.qrc mkspecs/features/platform.prf src/3rdparty src/core/media_capture_devices_dispatcher.cpp src/core/net/url_request_context_getter_qt.cpp src/core/net/url_request_context_getter_qt.h src/core/web_contents_adapter.cpp Change-Id: I467133ba455b1f85f6bb61793794c31cb1094541
| * Close popups when parent window is movedAlexandru Croitor2018-07-271-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an HTML select box was clicked inside of a QWebEngineView and the parent QWebEngineView window was moved using the mouse (via window decoration toolbar for example) the popup window would stay around instead of being closed. This happened because of the usage of the Qt:Tool window flag for the popup window, which implies a tool that floats near its parent window. The fix is threefold: 1) Use Qt::Popup instead, similarly to how QMenu does it. Whenever the parent window is moved, the popup will now get a CloseEvent. 2) Handle the CloseEvent by telling Chromium to close and destroy the popup. 3) On Windows the OS might send mouse move events to the popup RWHVQD instance after its parent QWebEngineView, RWHVQD, QWebEnginePagePrivate (client adapter) is destroyed. We need to guard the mouse forwarding code not to access the client adapter if it has already been destroyed. The second point is done by telling Chromium that its popup lost focus which it interprets as a sign to hide it, and automatically destroy it. This will destroy the underlying RWHVQtDelegateWidget and RWHVQt instances. Task-number: QTBUG-59891 Change-Id: I47f94a93c495a6caa5de92a6022eaca154994eda Reviewed-by: Michael Brüning <michael.bruning@qt.io>
| * Compile with -no-feature-tableteventAndy Shaw2018-06-291-0/+4
| | | | | | | | | | Change-Id: I7e03d6e3347ee9b81a7414574098827b5773b7b4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Use ozone for x11Michal Klocek2018-08-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to use ozone also for x11/glx. This way we have a more elegant approach to hook in our gl surface classes and we use ozone for all linux qpa backends. Moreover, we have now also more fine grain control to reimplement gl surface handling logic. This also aims to fix currently broken wayland backend, but instead of patching the broken x11 calls, we simply reuse ozone which does not use x11 for ozone egl. Add webengine-x11 check to handle ozone glx plugin compilation. For ozone egl backend reimplement missing functions. Task-number: QTBUG-65682 Task-number: QTBUG-51631 Change-Id: I8b45c6f4d09a1c703efb12b6452d78ab385371ab Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Implement RenderWidgetHostViewQt::DisplayCursorAllan Sandfeld Jensen2018-07-301-0/+5
| | | | | | | | | | | | | | | | | | It is where the active logic of UpdateCursor should now be. It doesn't matter for us yet, but we might as well follow how it is supposed to be done. Change-Id: I9d7f2ed767c3eef03e637680166b75307081f057 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Fix tooltip regression from 67-basedAllan Sandfeld Jensen2018-07-241-2/+1
| | | | | | | | | | | | | | We do not have a cursor manager. Change-Id: Idf4b89f12a0480d7f522879ba07ee807aaef641f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Return invalid ImCursorRectangle when height is zeroJüri Valdmann2018-07-191-4/+6
| | | | | | | | | | | | | | | | | | The test tst_QWebEngineView::microFocusCoordinates is flaky due to a timing issue where TextInputManager::GetSelectionRegion() returns a selection rectangle with zero height if called too soon after the HTMLElement.focus() call. Change-Id: Iba52eadd6c2d4f9027284fedbff40c3fcc951a28 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Merge remote-tracking branch 'origin/5.11' into devAllan Sandfeld Jensen2018-06-261-4/+25
|\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf configure.json src/3rdparty tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp Change-Id: Id79ff6cf01c2db3a2044881ddcbf044abdf84936
| * Fix WebCursor scaling and hotspotJüri Valdmann2018-06-051-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Old behavior: - Hotspot always chosen according to 2x devicePixelRatio. - Image always chosen according to 1x devicePixelRatio. New behavior: - Use actual devicePixelRatio. Task-number: QTBUG-68376 Change-Id: I6eef12a7dcf7fde7f8f488d9f2cba99f21e73cc2 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Adaptations for Chromium 67Allan Sandfeld Jensen2018-06-261-14/+20
| | | | | | | | | | Change-Id: I13cedba56012f74651a044d6fa8f0957487bf3eb Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Adaptations for Chromium 66Allan Sandfeld Jensen2018-06-261-19/+18
| | | | | | | | | | Change-Id: Iee88721a50036d4ef85a23dd1708d4fb84218708 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Map CSS 'copy' and 'alias' to DragCopyCursor and DragLinkCursorJüri Valdmann2018-06-121-8/+6
|/ | | | | Change-Id: Ic2664f6a1043598c43f2f0a4a6dacacb65010df8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix finishing IME compositionPeter Varga2018-04-261-50/+48
| | | | | | | | | | | | | Call RenderWidgetHostImpl::ImeCommitText() instead of RenderWidgetHostImpl::ImeFinishComposingText() to trigger the necessary JavaScript events on composing. This fixes IME composition (eg. for dead keys) on web pages which use custom JavaScript IME handler like facebook. Task-number: QTBUG-66046 Change-Id: Ibc177995ba6e85eca42ae333decacfe6e788ce41 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Protect against null adapter clientAllan Sandfeld Jensen2018-04-121-3/+7
| | | | | | | Task-number: QTBUG-67653 Change-Id: I07c9dca788ee31f691b05f7647ffbf3f9e0b7260 Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io>
* Fix multiple shortcut events being delivered on macOSMichael Brüning2018-03-231-2/+5
| | | | | | | | | | | | | | Commit ef1d61a3516182b0a39330b5ac5988f92c82bc4f introduced a regression where multiple shortcut events where delivered on macOS. Instead of using tryShortcut (which triggers shortcut events) to check if the shortcut needs to be overridden, check if the shortcut map has an entry for the key seqeunce in question. Task-number: QTBUG-66207 Change-Id: I8d277e2ac39de8a1f2d2c43dc8486e042c4ea458 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Basic adaptations for 65-basedAllan Sandfeld Jensen2018-03-151-2/+15
| | | | | Change-Id: I121b14d6a44e80f5eea4b159c58f7010d472926e Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Basic adaptations for 64-basedAllan Sandfeld Jensen2018-03-151-2/+2
| | | | | Change-Id: I11e2da206e4e59872a38c178f57a5879c1bbf229 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Make cursor position update more reliablePeter Varga2018-03-021-0/+7
| | | | | | | | | | | | | | | This patch makes the cursor position update independent from the order of calling RenderWidgetHostViewQt::OnUpdateTextInputStateCalled() and RenderWidgetHostViewQt::OnTextSelectionChanged(). This fixes the cursor position update after clearing text selection in 65-based Chromium update. From 65-based RenderWidget::WillBeginCompositorFrame() might not be called after text selection changes thus does not trigger an extra TextInputState update which hid this issue with earlier Chromium versions. Change-Id: I80c07e26b66c3a96cb004b9e3ceb57cd99234237 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2018-02-021-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/core/download_manager_delegate_qt.cpp src/core/download_manager_delegate_qt.h src/core/render_widget_host_view_qt.cpp src/core/web_contents_adapter.cpp src/webengine/api/qquickwebengineview.cpp tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp Change-Id: I2308414ce257ae5bb0fc9f6493aa111a267ff39b
| * Deselect text on each fourth clickSzabolcs David2018-01-221-1/+2
| | | | | | | | | | | | | | | | | | | | Triple click selects the entire paragraph and it should be deselected on a quadra click. Task-number: QTBUG-65649 Change-Id: I87c9405a202d8b6eacd7c19dbbcb051756c41220 Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Adaptations for Chromium 63Allan Sandfeld Jensen2018-01-251-2/+2
| | | | | | | | | | Change-Id: I551c7091bbc0463bed94180313eb2bfe92f0ad84 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Adaptations for Chromium 62Allan Sandfeld Jensen2018-01-251-9/+9
| | | | | | | | | | Change-Id: I49cd3c419d4dd1180144c3c07bdd9a628ab73caa Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2017-12-181-6/+5
|\| | | | | | | Change-Id: I9ddd2bdd830a862cd81dc1af5616d43e652a1c0e
| * Merge remote-tracking branch 'origin/5.9' into 5.10Allan Sandfeld Jensen2017-12-051-6/+5
| |\ | | | | | | | | | Change-Id: Ia24d831c2d2b04d13cf6eef2883d2ab2e4cad642
| | * Ensure BeginFrameSource is created before useJüri Valdmann2017-11-291-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In RenderWidgetHostViewQt::RenderWidgetHostViewQt we first call m_host->SetView(this) and then initialize the m_beginFrameSource member. However, since Chromium 55, m_host->SetView(this) ends up calling RenderWidgetHostViewQt::SetNeedsBeginFrames which already needs the m_beginFrameSource member. Fix by initializing m_beginFrameSource before calling m_host->SetView(this). Task-number: QTBUG-64560 Change-Id: Idda188977d0eec0656297fb4e3f3b3d2302f5eba Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Fill pointerType member of pointer eventsSzabolcs David2017-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix pointerType of the currently supported (mouse and touch) events. Support of pen and eraser types is coming with QTBUG-62975. Backport of 5.10 fix: 64ad0e8b335509970062ba550a06018426b7c285 Task-number: QTBUG-63266 Task-number: QTBUG-64436 Change-Id: Ief32b9680ab5acfb15537aba74c2bcdd6f51c978 Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Introduce devtools frontendAllan Sandfeld Jensen2017-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes it possible to use devtools without using the remote-debugger Task-number: QTBUG-47899 Task-number: QTBUG-50725 Task-number: QTBUG-50766 Change-Id: Id32e13f773372d9917599ebbb64ab4af61bbf1d8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2017-11-291-1/+107
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/core/web_event_factory.cpp src/core/web_event_factory.h src/webengine/render_widget_host_view_qt_delegate_quick.h Change-Id: Ic43787e2689c81b501ed395a990190eb67d83a2b
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-151-0/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty tests/auto/quick/qmltests/qmltests.pro tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp Change-Id: I2a1e3a83e29a1d6709f3e98fda3f7b4ab7ab297e
| | * Notify Chromium about leaving viewPeter Varga2017-11-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Forward QEvent::Leave for Widget and QEvent::HoverLeave for Quick. Task-number: QTBUG-64265 Change-Id: Ide32768902956476d24b1d4115e305392b62feb3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | Fill pointerType member of pointer eventsSzabolcs David2017-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix pointerType of the currently supported (mouse and touch) events. Support of pen and eraser types is coming with QTBUG-62975. Task-number: QTBUG-63266 Change-Id: Ief32b9680ab5acfb15537aba74c2bcdd6f51c978 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
| * | Pass editor shortcuts to Chromium by ForwardKeyboardEventWithCommandsPeter Varga2017-11-031-0/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moreover, extend the list of supported editor shortcuts and stabilize the corresponding auto test. Task-number: QTBUG-54692 Task-number: QTBUG-54812 Task-number: QTBUG-54221 Task-number: QTBUG-59053 Change-Id: I4dd8230519639ea6e3340992dbb54a609ecfcd91 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-031-1/+23
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty Change-Id: Ie6b1922db2269e0e0561022162228a7c8609c9ba
| * | Coalesce wheel events when possibleAllan Sandfeld Jensen2017-10-271-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Combine wheel events if we are getting more than Chromium can handle. This improves latency and perceived performance when scrolling with touchpads or fine-grained mouse, on a slow machine or with a debug build. Change-Id: Id847c8e7782e155c28067b6051ce92896b68ca7a Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | | Support tablet devicesSzabolcs David2017-11-031-43/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | Process QTabletEvents and forward them to Chromium in order to support pressure, tilting, rotation, eraser and similar features of tablet devices. Change-Id: I763d9e6e7036c29715a0b5531d3c6363eb4fcd8c Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2017-10-271-30/+24
|\| | | | | | | | | | | Change-Id: Ibc1c881a67bf088ba6fb044e2553c74c7e9e24ca
| * | Adaptations to 61-basedAllan Sandfeld Jensen2017-10-251-30/+24
| | | | | | | | | | | | | | | Change-Id: I5cb198445f283c6cea8187a1a2883896df0ee918 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | | Merge branch '5.10' into devAllan Sandfeld Jensen2017-10-131-3/+32
|\| | | | | | | | | | | Change-Id: I3a411e4019a5ec2f7d1a967b62a00ad7cf92f6f4