Title: [101532] trunk
Revision
101532
Author
bda...@apple.com
Date
2011-11-30 11:00:37 -0800 (Wed, 30 Nov 2011)

Log Message

https://bugs.webkit.org/show_bug.cgi?id=72751
WebKit2.MouseMoveAfterCrash API test is failing 

Reviewed by Sam Weinig.

Source/WebKit2: 

windowIsFocused() is too restrictive. All we need to know is that the page is 
active.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::mouseEventSyncForTesting):

Tools: 

Like DumpRenderTree, the NSWindow should act as an active window.
* TestWebKitAPI/mac/PlatformWebViewMac.mm:
(-[ActiveOffscreenWindow isKeyWindow]):
(TestWebKitAPI::PlatformWebView::PlatformWebView):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (101531 => 101532)


--- trunk/Source/WebKit2/ChangeLog	2011-11-30 18:49:06 UTC (rev 101531)
+++ trunk/Source/WebKit2/ChangeLog	2011-11-30 19:00:37 UTC (rev 101532)
@@ -1,3 +1,16 @@
+2011-11-29  Beth Dakin  <bda...@apple.com>
+
+        https://bugs.webkit.org/show_bug.cgi?id=72751
+        WebKit2.MouseMoveAfterCrash API test is failing 
+
+        Reviewed by Sam Weinig.
+
+        windowIsFocused() is too restrictive. All we need to know is that the page is 
+        active.
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::mouseEvent):
+        (WebKit::WebPage::mouseEventSyncForTesting):
+
 2011-11-29  Sam Weinig  <s...@webkit.org>
 
         Add move semantics to WKRetainPtr

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (101531 => 101532)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2011-11-30 18:49:06 UTC (rev 101531)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2011-11-30 19:00:37 UTC (rev 101532)
@@ -1179,7 +1179,7 @@
     if (!handled) {
         CurrentEvent currentEvent(mouseEvent);
 
-        handled = handleMouseEvent(mouseEvent, m_page.get(), !windowIsFocused());
+        handled = handleMouseEvent(mouseEvent, m_page.get(), !m_page->focusController()->isActive());
     }
 
     send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(mouseEvent.type()), handled));
@@ -1197,7 +1197,7 @@
 
     if (!handled) {
         CurrentEvent currentEvent(mouseEvent);
-        handled = handleMouseEvent(mouseEvent, m_page.get(), !windowIsFocused());
+        handled = handleMouseEvent(mouseEvent, m_page.get(), !m_page->focusController()->isActive());
     }
 }
 

Modified: trunk/Tools/ChangeLog (101531 => 101532)


--- trunk/Tools/ChangeLog	2011-11-30 18:49:06 UTC (rev 101531)
+++ trunk/Tools/ChangeLog	2011-11-30 19:00:37 UTC (rev 101532)
@@ -1,3 +1,15 @@
+2011-11-29  Beth Dakin  <bda...@apple.com>
+
+        https://bugs.webkit.org/show_bug.cgi?id=72751
+        WebKit2.MouseMoveAfterCrash API test is failing 
+
+        Reviewed by Sam Weinig.
+
+        Like DumpRenderTree, the NSWindow should act as an active window.
+        * TestWebKitAPI/mac/PlatformWebViewMac.mm:
+        (-[ActiveOffscreenWindow isKeyWindow]):
+        (TestWebKitAPI::PlatformWebView::PlatformWebView):
+
 2011-11-30  Gustavo Noronha Silva  <g...@gnome.org>
 
         Add step to update gtk dependencies to the buildbot

Modified: trunk/Tools/TestWebKitAPI/mac/PlatformWebViewMac.mm (101531 => 101532)


--- trunk/Tools/TestWebKitAPI/mac/PlatformWebViewMac.mm	2011-11-30 18:49:06 UTC (rev 101531)
+++ trunk/Tools/TestWebKitAPI/mac/PlatformWebViewMac.mm	2011-11-30 19:00:37 UTC (rev 101532)
@@ -29,6 +29,16 @@
 #import <WebKit2/WKViewPrivate.h>
 #import <Carbon/Carbon.h>
 
+@interface ActiveOffscreenWindow : NSWindow
+@end
+
+@implementation ActiveOffscreenWindow
+- (BOOL)isKeyWindow
+{
+    return YES;
+}
+@end
+
 namespace TestWebKitAPI {
 
 PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef)
@@ -37,7 +47,7 @@
     m_view = [[WKView alloc] initWithFrame:rect contextRef:contextRef pageGroupRef:pageGroupRef];
 
     NSRect windowRect = NSOffsetRect(rect, -10000, [(NSScreen *)[[NSScreen screens] objectAtIndex:0] frame].size.height - rect.size.height + 10000);
-    m_window = [[NSWindow alloc] initWithContentRect:windowRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES];
+    m_window = [[ActiveOffscreenWindow alloc] initWithContentRect:windowRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES];
     [m_window setColorSpace:[[NSScreen mainScreen] colorSpace]];
     [[m_window contentView] addSubview:m_view];
     [m_window orderBack:nil];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to