Changeset 122333 in webkit


Ignore:
Timestamp:
Jul 11, 2012 8:05:23 AM (12 years ago)
Author:
commit-queue@webkit.org
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 <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:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r122331 r122333  
     12012-07-11  Steffen Imhof  <steffen.imhof@basyskom.com>
     2
     3        [Qt] Middle clicking a scrollbar causes text to be pasted.
     4        https://bugs.webkit.org/show_bug.cgi?id=78444
     5
     6        Updated the scrollbars/scrollbar-middleclick-nopaste.html test to use an
     7        <input> field as target for onpaste events. Using <body> did not work
     8        (at least for Qt), because the onpaste events are not fired, even if
     9        manually middle-clicking into the body. My guess would be that they are
     10        not sent, because the body is non-editable. The changed test should
     11        reflect the common use-case triggering the problem better.
     12
     13        Reviewed by Simon Hausmann.
     14
     15        * scrollbars/scrollbar-middleclick-nopaste.html:
     16
    1172012-07-11  W. James MacLean  <wjmaclean@chromium.org>
    218
  • trunk/LayoutTests/scrollbars/scrollbar-middleclick-nopaste.html

    r120417 r122333  
    1111<div id="console" style="width:200%;height:200%;">
    1212<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>
     13<input type="text" id="input-field" onpaste="pasteCount++;"/>
    1314</div>
     15<script>
     16var i = document.getElementById('input-field');
     17i.focus();
    1418
    15 <script>
    1619if (window.eventSender) {
    1720    eventSender.mouseMoveTo(window.innerWidth - 1, 1);
  • trunk/Source/WebKit/qt/Api/qwebpage.cpp

    r122280 r122333  
    792792    ev->setAccepted(accepted);
    793793
    794     handleClipboard(ev, ev->button());
     794    if (!ev->isAccepted())
     795        handleClipboard(ev, ev->button());
    795796    handleSoftwareInputPanel(ev->button(), QPointF(ev->pos()).toPoint());
    796797}
  • trunk/Source/WebKit/qt/ChangeLog

    r122280 r122333  
     12012-07-11  Steffen Imhof  <steffen.imhof@basyskom.com>
     2
     3        [Qt] Middle clicking a scrollbar causes text to be pasted.
     4        https://bugs.webkit.org/show_bug.cgi?id=78444
     5
     6        Check if the event was already accepted before handling the clipboard.
     7
     8        Reviewed by Simon Hausmann.
     9
     10        * Api/qwebpage.cpp:
     11        (QWebPagePrivate::mouseReleaseEvent):
     12
    1132012-07-10  Adam Barth  <abarth@webkit.org>
    214
Note: See TracChangeset for help on using the changeset viewer.