Changeset 101532 in webkit


Ignore:
Timestamp:
Nov 30, 2011 11:00:37 AM (12 years ago)
Author:
Beth Dakin
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):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r101529 r101532  
     12011-11-29  Beth Dakin  <bdakin@apple.com>
     2
     3        https://bugs.webkit.org/show_bug.cgi?id=72751
     4        WebKit2.MouseMoveAfterCrash API test is failing
     5
     6        Reviewed by Sam Weinig.
     7
     8        windowIsFocused() is too restrictive. All we need to know is that the page is
     9        active.
     10        * WebProcess/WebPage/WebPage.cpp:
     11        (WebKit::WebPage::mouseEvent):
     12        (WebKit::WebPage::mouseEventSyncForTesting):
     13
    1142011-11-29  Sam Weinig  <sam@webkit.org>
    215
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r101307 r101532  
    11801180        CurrentEvent currentEvent(mouseEvent);
    11811181
    1182         handled = handleMouseEvent(mouseEvent, m_page.get(), !windowIsFocused());
     1182        handled = handleMouseEvent(mouseEvent, m_page.get(), !m_page->focusController()->isActive());
    11831183    }
    11841184
     
    11981198    if (!handled) {
    11991199        CurrentEvent currentEvent(mouseEvent);
    1200         handled = handleMouseEvent(mouseEvent, m_page.get(), !windowIsFocused());
     1200        handled = handleMouseEvent(mouseEvent, m_page.get(), !m_page->focusController()->isActive());
    12011201    }
    12021202}
  • trunk/Tools/ChangeLog

    r101527 r101532  
     12011-11-29  Beth Dakin  <bdakin@apple.com>
     2
     3        https://bugs.webkit.org/show_bug.cgi?id=72751
     4        WebKit2.MouseMoveAfterCrash API test is failing
     5
     6        Reviewed by Sam Weinig.
     7
     8        Like DumpRenderTree, the NSWindow should act as an active window.
     9        * TestWebKitAPI/mac/PlatformWebViewMac.mm:
     10        (-[ActiveOffscreenWindow isKeyWindow]):
     11        (TestWebKitAPI::PlatformWebView::PlatformWebView):
     12
    1132011-11-30  Gustavo Noronha Silva  <gns@gnome.org>
    214
  • trunk/Tools/TestWebKitAPI/mac/PlatformWebViewMac.mm

    r97819 r101532  
    3030#import <Carbon/Carbon.h>
    3131
     32@interface ActiveOffscreenWindow : NSWindow
     33@end
     34
     35@implementation ActiveOffscreenWindow
     36- (BOOL)isKeyWindow
     37{
     38    return YES;
     39}
     40@end
     41
    3242namespace TestWebKitAPI {
    3343
     
    3848
    3949    NSRect windowRect = NSOffsetRect(rect, -10000, [(NSScreen *)[[NSScreen screens] objectAtIndex:0] frame].size.height - rect.size.height + 10000);
    40     m_window = [[NSWindow alloc] initWithContentRect:windowRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES];
     50    m_window = [[ActiveOffscreenWindow alloc] initWithContentRect:windowRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES];
    4151    [m_window setColorSpace:[[NSScreen mainScreen] colorSpace]];
    4252    [[m_window contentView] addSubview:m_view];
Note: See TracChangeset for help on using the changeset viewer.