summaryrefslogtreecommitdiffstats
path: root/src/core/render_widget_host_view_qt.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix movementX and movementY properties of mouse eventsSzabolcs David2017-03-241-6/+8
| | | | | | | | | | Calculate movementX/movementY at every turn, not only when the mouse is in locked state. Task-number: QTBUG-59127 Change-Id: I362e055e6b5d6f831671604a093434373cedf19a Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9Allan Sandfeld Jensen2017-03-041-0/+1
|\
| * Merge remote-tracking branch 'origin/5.8' into 5.9Allan Sandfeld Jensen2017-03-021-0/+1
| |\ | | | | | | | | | Change-Id: Iff6ab3c287c58d8ec84a1513460bfce5218e8a61
| | * Initialize RenderWidgetHostViewQt::m_currentInputTypeJoerg Bornemann2017-02-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | inputMethodQuery can be called before TextInputStateChanged has initialized m_currentInputType. Change-Id: Icba5a622df0332b740477cd2d966f0dea5d86138 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | | Fix browser process crash when IBus is enabledPeter Varga2017-03-031-0/+8
|/ / | | | | | | | | Change-Id: Ic48b34473c808bcfdc80acdccab4883a8e9d5715 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add beginFrameProviderAllan Sandfeld Jensen2017-03-011-5/+47
| | | | | | | | | | | | | | | | We now need to tick/sync frames ourselves. This provides a quick way to do that without touching too much code. Change-Id: I3820d7ef8dbc8e3a224a48ee28c489bb830bb1da Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Adapt to changes in selection API in Chromium 55Allan Sandfeld Jensen2017-03-011-31/+14
| | | | | | | | | | | | | | Aura now uses the TextInputManager for tracking selections. Change-Id: I86634b987b0184a90d3d7125e568fcdab0b2e930 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Simple adaptations to Chromium 55Allan Sandfeld Jensen2017-03-011-2/+2
| | | | | | | | | | | | | | The simplest adaptations to API and build changes in Chromium 55 Change-Id: I923fa188690a04902492317807f72f006bcab9c6 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-301-21/+37
|\| | | | | | | Change-Id: Ic36a80502730d404ab96dfa11ff1eb0ac6eb302d
| * Fix confirming IME composition and newline insertionPeter Varga2017-01-251-21/+37
| | | | | | | | | | | | Task-number: QTBUG-55766 Change-Id: I3be3b224dfef9ecc1ce39f4f20ec5c1d13c0fa69 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-251-2/+6
|\| | | | | | | | | | | | | | | Conflicts: src/3rdparty tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp Change-Id: I070173576fc4be53689ce0dd9e1fd4133f5814da
| * Fix handling of empty input method eventsPeter Varga2017-01-221-1/+4
| | | | | | | | | | | | Task-number: QTBUG-55766 Change-Id: I4e6ade8f000f66ff1bb28f3b856ae140834292f1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Make input method hints available via RWHV delegate widgetPeter Varga2017-01-201-1/+2
| | | | | | | | | | | | | | | | | | Moreover, set ImHiddenText hint for password fields and add back the corresponding widget auto test. Task-number: QTBUG-55766 Change-Id: I3f76e19c8c33e11f3d9f515b6dc7d6e998c3c9a4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Optimize scene graph rendering by reusing old nodes if possibleMichael Brüning2017-01-111-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | | Previously, Qt WebEngine always dropped all existing scene graph nodes that were created for previous frames and built up a whole new tree. The main reason for this was that the render pass structure is not guaranteed to remain the same across two frames. This resulted in a full repaint of every new frame, even if only a small area had changed. We now check first if the structure of the frame data has changed across two sequential frames. We only discard the old nodes if there actually has been a change. Otherwise, we reuse the scene graph nodes and only update the nodes that have changed. A general exception to this at the moment is video. In case any streaming video or yuv video nodes are found in the render pass, all nodes get recreated. Task-number: QTBUG-57720 Change-Id: I8998577af48a163d54144f205c316ee427ed0307 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Rework and fix loadVisuallyCommitted signalPeter Varga2016-11-251-8/+5
| | | | | | | | | | | - Remove RenderViewObserverHostQt_DidFirstVisuallyNonEmptyLayout message and use WebContentsObserver::DidFirstVisuallyNonEmptyPaint instead. - The order of the DidFirstVisuallyNonEmptyPaint and OnSwapCompositorFrame events is not guaranteed. Check for both events to do not miss to send any loadVisuallyCommitted signal. Change-Id: Ic733b3e9a6fae64b1d827e8e07514f180273cf8c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add support of colored underline and background to InputMethodEventPeter Varga2016-09-231-1/+19
| | | | | | | | | | Moreover, unskip and update inputMethodsTextFormat widget auto test and move it to the tst_QWebEngineView tests. New manual test has been also added for testing input methods format. Task-number: QTBUG-55766 Change-Id: I4c71e15cb426925f76c770266a3c20f1cc12b687 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Adaptations to Chromium 53Allan Sandfeld Jensen2016-09-141-13/+8
| | | | | Change-Id: I15053486edfd42ee607250b4f14fb6eaa325c959 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Adaptations to Chromium 52Allan Sandfeld Jensen2016-09-141-7/+2
| | | | | Change-Id: Idf8a511ba26d263fd9d014d87d5e1101d706da71 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-051-12/+77
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also blacklist tst_QWebEnginePage::comboBoxPopupPositionAfterChildMove() and comboBoxPopupPositionAfterMove(). Conflicts: .qmake.conf src/3rdparty src/core/render_widget_host_view_qt.cpp src/core/resources/resources.gyp src/webengine/doc/src/qtwebengine-platform-notes.qdoc src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h tests/auto/widgets/qwebenginepage/BLACKLIST tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp tools/qmake/mkspecs/features/functions.prf Task-number: QTBUG-55158 Change-Id: I1d73ac9b3ca5293ad3c7e3a56f4c395da930e6f4
| * Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-06-271-12/+75
| |\ | | | | | | | | | Change-Id: Ic6686df8f82f710a3441501b7eeaffe69fbcbdf7
| | * Always show caret when editing an IME pre-edit string.Alexandru Croitor2016-06-171-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously while entering a Japanese succession of characters, followed by transforming a substring into a word suggestion, the caret would disappear, and pressing the arrow keys would not indicate which part of the pre-edit string will be transformed next. This change makes sure the caret is always present, to indicate which part of the pre-edit string will be replaced by a possible IME suggestion. Change-Id: I350310c198bcacf0bcb48217f84b08e95ab8e8ef Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Handle IME events which contain both preedit and commit strings.Alexandru Croitor2016-06-171-8/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently if a QInputMethodEvent is received, which contains text in both the pre-edit and commit strings, Chromium would only show the commit string in the text input (or other html element). The IME though still knows about the non-empty pre-edit string, which means that if another key is pressed, Chromium will suddenly show the content of the previous pre-edit string AND the result of the new key press. To fix this, WebEngine will now properly set the pre-edit string as the new composition, after confirming the previous commit string. Change-Id: If22dd2038aca35a6fe6bb58a521f0a7124c7d468 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Fix backspace to work when removing last IME char.Alexandru Croitor2016-06-171-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently when composing a word using an IME, and backspace is pressed to remove the last character present in the pre-edit string, instead of the character being removed, nothing happens. In reality the character is removed, but Chromium isn't notified of it, and the change will be seen only after another key is pressed. Fix consists in notifying Chromium to cancel the IME composition when both the pre-edit string and the commit string are empty. There is still an issue with japanese, when trying to input "aaa", press space, then "b" and you don't see the "b" until you press one more key. Change-Id: Idf2ef4888caead26d19eabbbdf4f98fbee601049 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Commit the done-so-far IME composition on mouse click.Alexandru Croitor2016-06-171-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, it was possible to select parts of the pre-edit text in an ongoing IME composition, by click-dragging with the mouse (which also looked wrong, because the styling of the text did not change to a selection box to signal selection). This is inconsistent with how Chrome does it, which commits the pre-edit string entered so far, when clicking anywhere in the content area or in the input. This change makes sure to commit the pre-edit string when a mouse click is done anywhere on the displayed web page. The behavior was present on Windows and Linux. Change-Id: I9cb148c591b5d09fb4dd477ae96c29ca32cc34de Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Don't cancel an IME composition when a modifier key is pressed.Alexandru Croitor2016-06-171-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an asian IME is used to compose a new word, and a modifier key is pressed (shift, alt, etc), WebEngine would notify Chromium to cancel the composition, thus clearing the text. But the actual IME window would still be present, and if another "letter" key was pressed, the composition would continue with the previous pre-edit text, which leads to unusual text flickering. The previous behavior was introduced in 31efe25d14 to fix a Windows double character input bug. The current change makes sure to clear the IME composition only in case the last received QInputMethodEvent pre-edit and commit strings were empty, which is not the case when pressing a modifier key for instance. Change-Id: Ic968404c90e1e0eb703fe1c2849990467bedd5e1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Move toolTip handling to WebContentsAdapterClientAdam Kallai2016-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is essential for set tooltip in Qt Quick part because the setToolTip function should not be public. Change-Id: I1ebd0c811504fded8edff1a5a6110ce3512bab4f Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devAllan Sandfeld Jensen2016-06-201-10/+66
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty src/core/permission_manager_qt.cpp src/core/renderer/web_channel_ipc_transport.cpp src/core/renderer/web_channel_ipc_transport.h Change-Id: I25fd8ed7c433dadce44d8ac1e39f86e211ec25f0
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-06-171-10/+66
| |\| | | | | | | | | | Change-Id: If4d8a25f5a2192a658d031252435935cbc675725
| | * Fix access to deleted memory on QWebEnginePage destructionJoerg Bornemann2016-06-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suppose QWebEnginePage is destroyed while there's still a combobox popup open. We would crash with the following stack trace: 1 QtWebEngineCore::RenderWidgetHostViewQt::dpiScale 2 QtWebEngineCore::RenderWidgetHostViewQt::GetViewBounds 3 content::RenderWidgetHostImpl::SendScreenRects 4 content::RenderWidgetHostImpl::OnRenderViewReady ... 16 base::MessageLoop::DoWork 17 WebEngineContext::destroy 18 `anonymous namespace'::destroyContext 19 qt_call_post_routines 20 QApplication::~QApplication RenderWidgetHostViewQt still holds a pointer to WebContentsAdapterClient. To fix this, expose the QObject owning the adapter client, and hide RenderWidgetHostViewQt when it is destroyed so it won't try to render. Change-Id: Ide5543197b35038a3e1c7491ceda3f5ad10f6f07 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Support WebCursors Qt doesn't have cursor types forAllan Sandfeld Jensen2016-06-161-9/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use Chromium's Aura cursors when we don't have Qt equivalents. These cursors were also supported in QtWebKit. Note this depends on Aura being used, which means OS X still doesn't have the new cursors. Task-number: QTBUG-53593 Change-Id: I9fbbf102dd313da5a6836069b4d7ece057d8c946 Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * Follow hotspot hints in custom cursorsAllan Sandfeld Jensen2016-06-151-1/+1
| | | | | | | | | | | | | | | | | | | | | We shouldn't ignore defined hotspots for cursors we adapt from pixmaps. Change-Id: Ia9c1e29e6374116d4564b306d0e199baaf5d494f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * Do not forward invalid mouse events to blinkAllan Sandfeld Jensen2016-06-151-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Blink can not handle more than the three main mouse-buttons, and we were translating a press of an extra mouse-button as a mouse-down of the button ButtonNone. Instead ignore mouse-button events blink does not currently support. Task-number: QTBUG-53799 Change-Id: If1d3ba6bd331ec8ad0ff45bcd674e67763ee9097 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
| | * Stop forwarding OS synthesized touch-to-mouse events.Alexandru Croitor2016-06-141-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before the change, chromium would process an onclick handler twice, once due to a touch event, and another time due to the OS synthesized mouse event. Patch makes sure only the touch events are forwarded to Chromium. This is consistent with mainline Chrome behavior. Task-number: QTBUG-53201 Change-Id: I16f46b94890c2f6fa9a9089f7c721ec79e0bc96b Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | | Merge branch '5.7' into devAllan Sandfeld Jensen2016-06-141-3/+3
|\| | | | | | | | | | | Change-Id: I1ecb615b8df1303c27b6609970502920123b3610
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-06-111-3/+3
| |\| | | | | | | | | | Change-Id: Ib010ede9756fb02992a3276ae7ec90ef1ab56a00
| | * Update scroll information in touch eventsIlia Kirianovskii2016-06-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Touch events have causesScrollingIfUncanceled flag that is used by TouchEventQueue::TouchMoveSlopSuppressor for determining whether they can be suppressed or not. Previously it was always false what caused the events be suppressed. Then, it was set to true what caused the events cannot be suppressed event if they can. Now the flag can be dinamically changed depending on the result of ui::FilteredGestureProvider::OnTouchEvent. Change-Id: I625a5c5d9b7597e25406e55c461efb7187e7c482 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Basic porting to Chromium 51Allan Sandfeld Jensen2016-06-011-9/+5
|/ / | | | | | | | | | | | | Trivial changes in methods, arguments and types. Change-Id: Ic707c376249f816268223e696ed5f6251df1f85f Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Merge branch '5.6' into 5.7Allan Sandfeld Jensen2016-04-111-8/+45
|\| | | | | | | Change-Id: I53645ee5405b1c43807123fd3c196e314cfd1ce9
| * Fix crash when link opens a modal QDialog, using the trackpad.Alexandru Croitor2016-03-241-8/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a QWebEngine link is clicked on, and as a result a modal dialog is opened, a QEvent::TouchCancel without any touch points is forwarded to Chromium, which tries to access the first touch point position, and causes a QList assertion. Fix consists of two parts: 1) Make sure that no TouchCancel is forwarded, in case if no TouchBegin or TouchUpdate was issued beforehand. 2) Because QEvent::TouchCancel events might contain an empty touch point list, and Chromium expects at least one point, make sure to forward the last saved touch points (saved in previous TouchUpdate) together with the TouchCancel. Task-number: QTBUG-48661 Change-Id: I1eeb2980417b1b04e8387dc9f82f935ef2bd8f00 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Basic adaptation to Chromium 49Allan Sandfeld Jensen2016-03-071-11/+21
| | | | | | | | | | | | | | | | Converts types, callbacks and headers to match Chromium 49. Task-number: QTBUG-51173 Change-Id: I544ef46e187105e250fea1b48b72d2c81a906640 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-02-201-2/+22
|\| | | | | | | Change-Id: If884b8b8bc087a6a726476b49cdb48a0efaa173e
| * Fix doubled characters when using IME on WindowsJoerg Bornemann2016-02-161-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, when exiting the IME by pressing a cursor key or clicking into the edit field, we do not receive an QInputMethodEvent with a commitText. Instead, we get an empty QInputMethodEvent and a key{Press|Release}Event pair with a key of zero. The committed text is in the event's text property. Do not call ImeConfirmComposition for the empty QInputMethodEvent but for the later keyReleaseEvent. Do not forward those key events. Change-Id: I844aa05493aca4c388a8b1de835baf2a819558f5 Task-number: QTBUG-50252 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Merge branch '5.6' into devAllan Sandfeld Jensen2016-02-041-1/+3
|\| | | | | | | Change-Id: I0bb971f01ee1e02da768f336680c8ec0254ab2b0
| * Fix asserts in touch handlingKai Koehne2016-01-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | Generate touch events with the "causesScrollingIfUncanceled" property set to true. This is checked by TouchEventQueue::TouchMoveSlopSuppressor Task-number: QTBUG-50511 Change-Id: I5260100db75ed7afdd7afeff8f530221c22090b0 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Unify license header usage.Jani Heikkinen2016-02-011-11/+14
| | | | | | | | | | | | | | | | | | Update files using old header.LGPL3 to use header.LGPL Update files using old header.FLD to use new header.FDL Update files using old header.BSD to use new header.BSD Change-Id: I36a67aaa8c3ca6c7946308defc9c03c3571a7d23 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Merge branch '5.6' into devAllan Sandfeld Jensen2016-01-121-0/+4
|\| | | | | | | Change-Id: I4272eb59cac08c69eaa58dd4d94debf1b8c5cf78
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2016-01-071-0/+4
| |\ | | | | | | | | | | | | | | | | | | | | | | | | 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-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Move conversion function for keyboard modifiersJoerg Bornemann2015-12-171-24/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move flagsFromModifiers from render_widget_host_view_qt.cpp to a new file type_conversion.cpp. We will use it in a subsequent commit. Added a separate source file to not include qcoreapplication.h in type_conversion.h. Change-Id: I6dfd54dd99d640ff48cb1a710271c7f8115891e5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-031-1/+7
|\| | | | | | | | | | | Change-Id: I052fdc4245e25e58457d51f6e49703bc7dd8ff00