Commit 71cd39ac authored by eric@webkit.org's avatar eric@webkit.org

2010-01-22 Steve VanDeBogart <vandebo@chromium.org>

        Reviewed by David Levin.

        A new test to check that middle clicking on the primary scroll bars
        does not trigger a paste event.
        https://bugs.webkit.org/show_bug.cgi?id=33062

        * scrollbars/scrollbar-middleclick-nopaste-expected.txt: Added.
        * scrollbars/scrollbar-middleclick-nopaste.html: Added.
2010-01-22  Steve VanDeBogart  <vandebo@chromium.org>

        Reviewed by David Levin.

        Middle clicking the main scroll bars should not trigger a paste event
        in Linux chromium.
        https://bugs.webkit.org/show_bug.cgi?id=33062

        * src/WebViewImpl.cpp:
        (WebKit::WebViewImpl::mouseUp):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 27981139
2010-01-22 Steve VanDeBogart <vandebo@chromium.org>
Reviewed by David Levin.
A new test to check that middle clicking on the primary scroll bars
does not trigger a paste event.
https://bugs.webkit.org/show_bug.cgi?id=33062
* scrollbars/scrollbar-middleclick-nopaste-expected.txt: Added.
* scrollbars/scrollbar-middleclick-nopaste.html: Added.
2010-01-22 Gustavo Noronha Silva <gns@gnome.org>
Unreviewed. Updated platform-specific result to account for
<html>
<body onpaste="pasteCount++;">
<script>
var pasteCount = 0;
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
</script>
<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>
</div>
<script>
if (window.eventSender) {
eventSender.mouseMoveTo(window.innerWidth - 1, 1);
eventSender.mouseDown(1);
eventSender.mouseUp(1);
eventSender.mouseMoveTo(1, window.innerHeight - 1);
eventSender.mouseDown(1);
eventSender.mouseUp(1);
finished();
}
function finished()
{
if (pasteCount == 0) {
document.getElementById('console').innerHTML = "PASS";
} else {
document.getElementById('console').innerHTML = "FAIL";
}
if (window.layoutTestController) {
window.layoutTestController.notifyDone();
}
}
</script>
</body>
</html>
2010-01-22 Steve VanDeBogart <vandebo@chromium.org>
Reviewed by David Levin.
Middle clicking the main scroll bars should not trigger a paste event
in Linux chromium.
https://bugs.webkit.org/show_bug.cgi?id=33062
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::mouseUp):
2010-01-22 Albert J. Wong <ajwong@chromium.org>
Not reviewed. backout.
......
......@@ -391,14 +391,14 @@ void WebViewImpl::mouseUp(const WebMouseEvent& event)
// handleMouseReleaseEvent() earlier in this function
if (event.button == WebMouseEvent::ButtonMiddle) {
Frame* focused = focusedWebCoreFrame();
FrameView* view = m_page->mainFrame()->view();
IntPoint clickPoint(m_lastMouseDownPoint.x, m_lastMouseDownPoint.y);
clickPoint = m_page->mainFrame()->view()->windowToContents(clickPoint);
HitTestResult hitTestResult =
focused->eventHandler()->hitTestResultAtPoint(clickPoint, false, false,
ShouldHitTestScrollbars);
IntPoint contentPoint = view->windowToContents(clickPoint);
HitTestResult hitTestResult = focused->eventHandler()->hitTestResultAtPoint(contentPoint, false, false, ShouldHitTestScrollbars);
// We don't want to send a paste when middle clicking a scroll bar or a
// link (which will navigate later in the code).
if (!hitTestResult.scrollbar() && !hitTestResult.isLiveLink() && focused) {
// link (which will navigate later in the code). The main scrollbars
// have to be handled separately.
if (!hitTestResult.scrollbar() && !hitTestResult.isLiveLink() && focused && !view->scrollbarAtPoint(clickPoint)) {
Editor* editor = focused->editor();
Pasteboard* pasteboard = Pasteboard::generalPasteboard();
bool oldSelectionMode = pasteboard->isSelectionMode();
......
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