[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9

eric at webkit.org eric at webkit.org
Thu Feb 4 21:25:55 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit a4f741c6b116d97072c3620d81341a2e07cb5c46
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Jan 23 05:11:26 2010 +0000

    2010-01-22  Steve VanDeBogart  <vandebo at 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 at 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

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index bab6318..50ecafd 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-01-22  Steve VanDeBogart  <vandebo at 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 at gnome.org>
 
         Unreviewed. Updated platform-specific result to account for
diff --git a/LayoutTests/editing/selection/doubleclick-whitespace-img-crash-expected.txt b/LayoutTests/scrollbars/scrollbar-middleclick-nopaste-expected.txt
similarity index 100%
copy from LayoutTests/editing/selection/doubleclick-whitespace-img-crash-expected.txt
copy to LayoutTests/scrollbars/scrollbar-middleclick-nopaste-expected.txt
diff --git a/LayoutTests/scrollbars/scrollbar-middleclick-nopaste.html b/LayoutTests/scrollbars/scrollbar-middleclick-nopaste.html
new file mode 100644
index 0000000..91382de
--- /dev/null
+++ b/LayoutTests/scrollbars/scrollbar-middleclick-nopaste.html
@@ -0,0 +1,39 @@
+<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>
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 5118492..378880e 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,14 @@
+2010-01-22  Steve VanDeBogart  <vandebo at 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 at chromium.org>
 
         Not reviewed.  backout.
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index c64afa7..a3fa3f4 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -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();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list