Title: [101719] trunk/Source/WebKit2
Revision
101719
Author
bda...@apple.com
Date
2011-12-01 15:32:44 -0800 (Thu, 01 Dec 2011)

Log Message

https://bugs.webkit.org/show_bug.cgi?id=73592
REGRESSION (r100483): Can't drag out of background window
-and corresponding-
<rdar://problem/10508870>

Reviewed by Darin Adler.

If the mouse is pressed we need to do a full, normal hit test even if the window 
is not active. 
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::mouseEventSyncForTesting):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (101718 => 101719)


--- trunk/Source/WebKit2/ChangeLog	2011-12-01 23:17:49 UTC (rev 101718)
+++ trunk/Source/WebKit2/ChangeLog	2011-12-01 23:32:44 UTC (rev 101719)
@@ -1,3 +1,18 @@
+2011-12-01  Beth Dakin  <bda...@apple.com>
+
+        https://bugs.webkit.org/show_bug.cgi?id=73592
+        REGRESSION (r100483): Can't drag out of background window
+        -and corresponding-
+        <rdar://problem/10508870>
+
+        Reviewed by Darin Adler.
+
+        If the mouse is pressed we need to do a full, normal hit test even if the window 
+        is not active. 
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::mouseEvent):
+        (WebKit::WebPage::mouseEventSyncForTesting):
+
 2011-12-01  Martin Robinson  <mrobin...@igalia.com>
 
         [GTK] Add a helper function to find the current executable's path

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (101718 => 101719)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2011-12-01 23:17:49 UTC (rev 101718)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2011-12-01 23:32:44 UTC (rev 101719)
@@ -1187,7 +1187,13 @@
     if (!handled) {
         CurrentEvent currentEvent(mouseEvent);
 
-        handled = handleMouseEvent(mouseEvent, m_page.get(), !m_page->focusController()->isActive());
+        // We need to do a full, normal hit test during this mouse event if the page is active or if a mouse
+        // button is currently pressed. It is possible that neither of those things will be true since on 
+        // Lion when legacy scrollbars are enabled, WebKit receives mouse events all the time. If it is one 
+        // of those cases where the page is not active and the mouse is not pressed, then we can fire a more
+        // efficient scrollbars-only version of the event.
+        bool _onlyUpdateScrollbars_ = !(m_page->focusController()->isActive() || (mouseEvent.button() != WebMouseEvent::NoButton));
+        handled = handleMouseEvent(mouseEvent, m_page.get(), onlyUpdateScrollbars);
     }
 
     send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(mouseEvent.type()), handled));
@@ -1205,7 +1211,14 @@
 
     if (!handled) {
         CurrentEvent currentEvent(mouseEvent);
-        handled = handleMouseEvent(mouseEvent, m_page.get(), !m_page->focusController()->isActive());
+
+        // We need to do a full, normal hit test during this mouse event if the page is active or if a mouse
+        // button is currently pressed. It is possible that neither of those things will be true since on 
+        // Lion when legacy scrollbars are enabled, WebKit receives mouse events all the time. If it is one 
+        // of those cases where the page is not active and the mouse is not pressed, then we can fire a more
+        // efficient scrollbars-only version of the event.
+        bool _onlyUpdateScrollbars_ = !(m_page->focusController()->isActive() || (mouseEvent.button() != WebMouseEvent::NoButton));
+        handled = handleMouseEvent(mouseEvent, m_page.get(), onlyUpdateScrollbars);
     }
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to