summaryrefslogtreecommitdiff
path: root/Source/WebKit/qt/WidgetApi/qwebpage.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-11-04 16:09:47 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2014-11-06 14:57:06 +0100
commit701f6590a70695743f03423814530c5feb0173bf (patch)
tree32b58afabf603d4c4ca2f965ee6afffa18b94ec5 /Source/WebKit/qt/WidgetApi/qwebpage.cpp
parentf301054d60a6d7828af33a8f8ec66a78cbf4b9b3 (diff)
downloadqtwebkit-701f6590a70695743f03423814530c5feb0173bf.tar.gz
Fix selections after leave event
We were sending a bad fake mouse event on leave events that caused WebCore to stop tracking mousepresses correctly. Since we continue to receive mouse-events after leave if a mouse button is down, we don't need the fake mouse event to unset hover states and can skip, and can skip sending it. Task-number: QTBUG-41419 Change-Id: I8d50c440f7556f7e34bb0c05248577583c2550b4 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'Source/WebKit/qt/WidgetApi/qwebpage.cpp')
-rw-r--r--Source/WebKit/qt/WidgetApi/qwebpage.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/WebKit/qt/WidgetApi/qwebpage.cpp b/Source/WebKit/qt/WidgetApi/qwebpage.cpp
index 442cc4874..25777d8c0 100644
--- a/Source/WebKit/qt/WidgetApi/qwebpage.cpp
+++ b/Source/WebKit/qt/WidgetApi/qwebpage.cpp
@@ -912,6 +912,10 @@ void QWebPagePrivate::dropEvent(T *ev)
void QWebPagePrivate::leaveEvent(QEvent*)
{
+ // If a mouse button is pressed we will continue to receive mouse events after leaving the window.
+ if (mousePressed)
+ return;
+
// Fake a mouse move event just outside of the widget, since all
// the interesting mouse-out behavior like invalidating scrollbars
// is handled by the WebKit event handler's mouseMoved function.