Bug 72751 - WebKit2.MouseMoveAfterCrash API test is failing
Summary: WebKit2.MouseMoveAfterCrash API test is failing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Beth Dakin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-18 13:13 PST by Simon Fraser (smfr)
Modified: 2011-11-30 11:01 PST (History)
3 users (show)

See Also:


Attachments
Patch (3.76 KB, patch)
2011-11-29 18:03 PST, Beth Dakin
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2011-11-18 13:13:11 PST
WebKit2.MouseMoveAfterCrash is failing on the bots. This appears to have broken at r100483, which was the fix for https://bugs.webkit.org/show_bug.cgi?id=72400
Comment 1 Simon Fraser (smfr) 2011-11-18 13:18:02 PST
I confirmed that rolling out r100483 fixes this.
Comment 2 Beth Dakin 2011-11-29 14:10:48 PST
I see what the problem is. The problem is in these changes: 

Index: Source/WebKit2/WebProcess/WebPage/WebPage.cpp
===================================================================
--- Source/WebKit2/WebProcess/WebPage/WebPage.cpp	(revision 100305)
+++ Source/WebKit2/WebProcess/WebPage/WebPage.cpp	(working copy)
@@ -1105,7 +1105,7 @@ static bool handleContextMenuEvent(const
     return handled;
 }
 
-static bool handleMouseEvent(const WebMouseEvent& mouseEvent, Page* page)
+static bool handleMouseEvent(const WebMouseEvent& mouseEvent, Page* page, bool onlyUpdateScrollbars)
 {
     Frame* frame = page->mainFrame();
     if (!frame->view())
@@ -1128,7 +1128,7 @@ static bool handleMouseEvent(const WebMo
         case WebCore::MouseEventReleased:
             return frame->eventHandler()->handleMouseReleaseEvent(platformMouseEvent);
         case WebCore::MouseEventMoved:
-            return frame->eventHandler()->mouseMoved(platformMouseEvent);
+            return frame->eventHandler()->mouseMoved(platformMouseEvent, onlyUpdateScrollbars);
 
         default:
             ASSERT_NOT_REACHED();
@@ -1154,7 +1154,7 @@ void WebPage::mouseEvent(const WebMouseE
     if (!handled) {
         CurrentEvent currentEvent(mouseEvent);
 
-        handled = handleMouseEvent(mouseEvent, m_page.get());
+        handled = handleMouseEvent(mouseEvent, m_page.get(), !windowIsFocused());
     }
 
     send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(mouseEvent.type()), handled));
@@ -1172,7 +1172,7 @@ void WebPage::mouseEventSyncForTesting(c
 
     if (!handled) {
         CurrentEvent currentEvent(mouseEvent);
-        handled = handleMouseEvent(mouseEvent, m_page.get());
+        handled = handleMouseEvent(mouseEvent, m_page.get(), !windowIsFocused());
     }
 }


In the test harness, windowIsFocused() is false because on Mac it evaluates to m_windowIsVisible, and the window is not visible. It's a simple problem, but I'll have to think about the best way to solve it.
Comment 3 Beth Dakin 2011-11-29 18:03:50 PST
Created attachment 117087 [details]
Patch
Comment 4 Beth Dakin 2011-11-30 11:01:00 PST
Thanks Sam!  Committed change with revision 101532.