Title: [122333] trunk
- Revision
- 122333
- Author
- [email protected]
- Date
- 2012-07-11 08:05:23 -0700 (Wed, 11 Jul 2012)
Log Message
[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 <[email protected]> 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 <[email protected]> on 2012-07-11
Reviewed by Simon Hausmann.
* scrollbars/scrollbar-middleclick-nopaste.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (122332 => 122333)
--- trunk/LayoutTests/ChangeLog 2012-07-11 14:50:44 UTC (rev 122332)
+++ trunk/LayoutTests/ChangeLog 2012-07-11 15:05:23 UTC (rev 122333)
@@ -1,3 +1,19 @@
+2012-07-11 Steffen Imhof <[email protected]>
+
+ [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 <[email protected]>
[Chromium] Unreviewed gardening. fast/forms/textarea/textarea-state-restore.html is flaky (timeouts frquently).
Modified: trunk/LayoutTests/scrollbars/scrollbar-middleclick-nopaste.html (122332 => 122333)
--- trunk/LayoutTests/scrollbars/scrollbar-middleclick-nopaste.html 2012-07-11 14:50:44 UTC (rev 122332)
+++ trunk/LayoutTests/scrollbars/scrollbar-middleclick-nopaste.html 2012-07-11 15:05:23 UTC (rev 122333)
@@ -10,9 +10,12 @@
<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="" 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();
-<script>
if (window.eventSender) {
eventSender.mouseMoveTo(window.innerWidth - 1, 1);
eventSender.mouseDown(1);
Modified: trunk/Source/WebKit/qt/Api/qwebpage.cpp (122332 => 122333)
--- trunk/Source/WebKit/qt/Api/qwebpage.cpp 2012-07-11 14:50:44 UTC (rev 122332)
+++ trunk/Source/WebKit/qt/Api/qwebpage.cpp 2012-07-11 15:05:23 UTC (rev 122333)
@@ -791,7 +791,8 @@
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());
}
Modified: trunk/Source/WebKit/qt/ChangeLog (122332 => 122333)
--- trunk/Source/WebKit/qt/ChangeLog 2012-07-11 14:50:44 UTC (rev 122332)
+++ trunk/Source/WebKit/qt/ChangeLog 2012-07-11 15:05:23 UTC (rev 122333)
@@ -1,3 +1,15 @@
+2012-07-11 Steffen Imhof <[email protected]>
+
+ [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 <[email protected]>
WebCore::Settings for Hixie76 WebSocket protocol doesn't do anything and should be removed
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes