[Qt] Middle clicking a scrollbar causes text to be pasted.

https://bugs.webkit.org/show_bug.cgi?id=78444

Source/WebKit/qt:

Check if the event was already accepted before handling the clipboard.

Patch by Steffen Imhof <steffen.imhof@basyskom.com> on 2012-07-11
Reviewed by Simon Hausmann.

* Api/qwebpage.cpp:
(QWebPagePrivate::mouseReleaseEvent):

LayoutTests:

Updated the scrollbars/scrollbar-middleclick-nopaste.html test to use an
<input> field as target for onpaste events. Using <body> did not work
(at least for Qt), because the onpaste events are not fired, even if
manually middle-clicking into the body. My guess would be that they are
not sent, because the body is non-editable. The changed test should
reflect the common use-case triggering the problem better.

Patch by Steffen Imhof <steffen.imhof@basyskom.com> on 2012-07-11
Reviewed by Simon Hausmann.

* scrollbars/scrollbar-middleclick-nopaste.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3ac379ce
2012-07-11 Steffen Imhof <steffen.imhof@basyskom.com>
[Qt] Middle clicking a scrollbar causes text to be pasted.
https://bugs.webkit.org/show_bug.cgi?id=78444
Updated the scrollbars/scrollbar-middleclick-nopaste.html test to use an
<input> field as target for onpaste events. Using <body> did not work
(at least for Qt), because the onpaste events are not fired, even if
manually middle-clicking into the body. My guess would be that they are
not sent, because the body is non-editable. The changed test should
reflect the common use-case triggering the problem better.
Reviewed by Simon Hausmann.
* scrollbars/scrollbar-middleclick-nopaste.html:
2012-07-11 W. James MacLean <wjmaclean@chromium.org>
[Chromium] Unreviewed gardening. fast/forms/textarea/textarea-state-restore.html is flaky (timeouts frquently).
......@@ -10,9 +10,12 @@ if (window.testRunner) {
<div id="console" style="width:200%;height:200%;">
<div style="border:2px solid black;width:25%;" onclick="finished();"> This test checks that middle clicking the scroll bars doesn't trigger a paste event (See <a href="https://bugs.webkit.org/show_bug.cgi?id=33062">Bug 33062</a>). If the test passes, the output will be a single line that says PASS. To run the tests manually, middle click each of the scroll bars, then click this paragraph.</div>
<input type="text" id="input-field" onpaste="pasteCount++;"/>
</div>
<script>
var i = document.getElementById('input-field');
i.focus();
if (window.eventSender) {
eventSender.mouseMoveTo(window.innerWidth - 1, 1);
eventSender.mouseDown(1);
......
......@@ -791,7 +791,8 @@ void QWebPagePrivate::mouseReleaseEvent(T *ev)
accepted = frame->eventHandler()->handleMouseReleaseEvent(mev);
ev->setAccepted(accepted);
handleClipboard(ev, ev->button());
if (!ev->isAccepted())
handleClipboard(ev, ev->button());
handleSoftwareInputPanel(ev->button(), QPointF(ev->pos()).toPoint());
}
......
2012-07-11 Steffen Imhof <steffen.imhof@basyskom.com>
[Qt] Middle clicking a scrollbar causes text to be pasted.
https://bugs.webkit.org/show_bug.cgi?id=78444
Check if the event was already accepted before handling the clipboard.
Reviewed by Simon Hausmann.
* Api/qwebpage.cpp:
(QWebPagePrivate::mouseReleaseEvent):
2012-07-10 Adam Barth <abarth@webkit.org>
WebCore::Settings for Hixie76 WebSocket protocol doesn't do anything and should be removed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment