⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 181741 in webkit


Ignore:
Timestamp:
Mar 19, 2015, 1:57:43 AM (11 years ago)
Author:
bshafiei@apple.com
Message:

Merged r181668. rdar://problem/20032670

Location:
tags/Safari-601.1.23.3/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • tags/Safari-601.1.23.3/Source/WebCore/ChangeLog

    r181740 r181741  
     12015-03-19  Babak Shafiei  <bshafiei@apple.com>
     2
     3        Merge r181668.
     4
     5    2015-03-17  Tim Horton  <timothy_horton@apple.com>
     6
     7            Cannot invoke action menus anymore
     8            https://bugs.webkit.org/show_bug.cgi?id=142797
     9            <rdar://problem/20032670>
     10
     11            Reviewed by Beth Dakin.
     12
     13            * platform/spi/mac/NSMenuSPI.h:
     14            Add additional NSMenu SPI.
     15
    1162015-03-19  Babak Shafiei  <bshafiei@apple.com>
    217
  • tags/Safari-601.1.23.3/Source/WebCore/platform/spi/mac/NSMenuSPI.h

    r176692 r181741  
    2828// FIXME: We should just include the appropriate internal headers.
    2929
     30typedef NS_ENUM(NSInteger, NSMenuType) {
     31    NSMenuTypeNone = 0,
     32    NSMenuTypeContextMenu,
     33    NSMenuTypeActionMenu,
     34};
     35
     36@interface NSMenu (Private)
     37+ (NSMenuType)menuTypeForEvent:(NSEvent *)event;
     38@end
     39
    3040@interface NSMenuItem (Private)
    3141+ (QLPreviewMenuItem *)standardQuickLookMenuItem;
  • tags/Safari-601.1.23.3/Source/WebKit/mac/ChangeLog

    r181502 r181741  
     12015-03-19  Babak Shafiei  <bshafiei@apple.com>
     2
     3        Merge r181668.
     4
     5    2015-03-17  Tim Horton  <timothy_horton@apple.com>
     6
     7            Cannot invoke action menus anymore
     8            https://bugs.webkit.org/show_bug.cgi?id=142797
     9            <rdar://problem/20032670>
     10
     11            Reviewed by Beth Dakin.
     12
     13            * WebView/WebHTMLView.mm:
     14            (-[WebHTMLView otherMouseDown:]):
     15            Don't override otherMouseDown: if the event would make an action menu.
     16
    1172015-03-14  Dean Jackson  <dino@apple.com>
    218
  • tags/Safari-601.1.23.3/Source/WebKit/mac/WebView/WebHTMLView.mm

    r180281 r181741  
    107107#import <WebCore/MIMETypeRegistry.h>
    108108#import <WebCore/MainFrame.h>
     109#import <WebCore/NSMenuSPI.h>
    109110#import <WebCore/NSURLFileTypeMappingsSPI.h>
    110111#import <WebCore/Page.h>
     
    53885389- (void)otherMouseDown:(NSEvent *)event
    53895390{
    5390     if ([event buttonNumber] == 2)
    5391         [self mouseDown:event];
    5392     else
     5391    if ([event buttonNumber] != 2 || [NSMenu menuTypeForEvent:event] == NSMenuTypeActionMenu) {
    53935392        [super otherMouseDown:event];
     5393        return;
     5394    }
     5395
     5396    [self mouseDown:event];
    53945397}
    53955398
  • tags/Safari-601.1.23.3/Source/WebKit2/ChangeLog

    r181554 r181741  
     12015-03-19  Babak Shafiei  <bshafiei@apple.com>
     2
     3        Merge r181668.
     4
     5    2015-03-17  Tim Horton  <timothy_horton@apple.com>
     6
     7            Cannot invoke action menus anymore
     8            https://bugs.webkit.org/show_bug.cgi?id=142797
     9            <rdar://problem/20032670>
     10
     11            Reviewed by Beth Dakin.
     12
     13            * UIProcess/API/mac/WKView.mm:
     14            Don't process mouse events that would make an action menu; call super
     15            and let AppKit take care of it. We have to duplicate the macro so that
     16            we can avoid calling super for the internal-only methods.
     17            Also, otherMouseMoved is simply not a thing, so remove it.
     18
    1192015-03-16  Przemyslaw Piorkowski  <p.piorkowski@samsung.com>
    220
  • tags/Safari-601.1.23.3/Source/WebKit2/UIProcess/API/mac/WKView.mm

    r181176 r181741  
    9292#import <WebCore/LookupSPI.h>
    9393#import <WebCore/NSImmediateActionGestureRecognizerSPI.h>
     94#import <WebCore/NSMenuSPI.h>
    9495#import <WebCore/NSViewSPI.h>
    9596#import <WebCore/PlatformEventFactoryMac.h>
     
    11771178            return; \
    11781179        } \
     1180        if ([NSMenu menuTypeForEvent:theEvent] == NSMenuTypeActionMenu) { \
     1181            [super Selector:theEvent]; \
     1182            return; \
     1183        } \
     1184        NativeWebMouseEvent webEvent(theEvent, self); \
     1185        _data->_page->handleMouseEvent(webEvent); \
     1186    }
     1187#define NATIVE_MOUSE_EVENT_HANDLER_INTERNAL(Selector) \
     1188    - (void)Selector:(NSEvent *)theEvent \
     1189    { \
     1190        if (_data->_ignoresNonWheelEvents) \
     1191            return; \
     1192        if (NSTextInputContext *context = [self inputContext]) { \
     1193            [context handleEvent:theEvent completionHandler:^(BOOL handled) { \
     1194                if (handled) \
     1195                    LOG(TextInput, "%s was handled by text input context", String(#Selector).substring(0, String(#Selector).find("Internal")).ascii().data()); \
     1196                else { \
     1197                    NativeWebMouseEvent webEvent(theEvent, self); \
     1198                    _data->_page->handleMouseEvent(webEvent); \
     1199                } \
     1200            }]; \
     1201            return; \
     1202        } \
    11791203        NativeWebMouseEvent webEvent(theEvent, self); \
    11801204        _data->_page->handleMouseEvent(webEvent); \
     
    11901214            return; \
    11911215        } \
     1216        if ([NSMenu menuTypeForEvent:theEvent] == NSMenuTypeActionMenu) { \
     1217            [super Selector:theEvent]; \
     1218            return; \
     1219        } \
    11921220        NativeWebMouseEvent webEvent(theEvent, self); \
    11931221        _data->_page->handleMouseEvent(webEvent); \
    11941222    }
     1223#define NATIVE_MOUSE_EVENT_HANDLER_INTERNAL(Selector) \
     1224    - (void)Selector:(NSEvent *)theEvent \
     1225    { \
     1226        if (_data->_ignoresNonWheelEvents) \
     1227            return; \
     1228        if ([[self inputContext] handleEvent:theEvent]) { \
     1229            LOG(TextInput, "%s was handled by text input context", String(#Selector).substring(0, String(#Selector).find("Internal")).ascii().data()); \
     1230            return; \
     1231        } \
     1232        NativeWebMouseEvent webEvent(theEvent, self); \
     1233        _data->_page->handleMouseEvent(webEvent); \
     1234    }
    11951235#endif
    11961236
    11971237NATIVE_MOUSE_EVENT_HANDLER(mouseEntered)
    11981238NATIVE_MOUSE_EVENT_HANDLER(mouseExited)
    1199 NATIVE_MOUSE_EVENT_HANDLER(mouseMovedInternal)
    1200 NATIVE_MOUSE_EVENT_HANDLER(mouseDownInternal)
    1201 NATIVE_MOUSE_EVENT_HANDLER(mouseUpInternal)
    1202 NATIVE_MOUSE_EVENT_HANDLER(mouseDraggedInternal)
    12031239NATIVE_MOUSE_EVENT_HANDLER(otherMouseDown)
    12041240NATIVE_MOUSE_EVENT_HANDLER(otherMouseDragged)
    1205 NATIVE_MOUSE_EVENT_HANDLER(otherMouseMoved)
    12061241NATIVE_MOUSE_EVENT_HANDLER(otherMouseUp)
    12071242NATIVE_MOUSE_EVENT_HANDLER(rightMouseDown)
    12081243NATIVE_MOUSE_EVENT_HANDLER(rightMouseDragged)
    12091244NATIVE_MOUSE_EVENT_HANDLER(rightMouseUp)
     1245
     1246NATIVE_MOUSE_EVENT_HANDLER_INTERNAL(mouseMovedInternal)
     1247NATIVE_MOUSE_EVENT_HANDLER_INTERNAL(mouseDownInternal)
     1248NATIVE_MOUSE_EVENT_HANDLER_INTERNAL(mouseUpInternal)
     1249NATIVE_MOUSE_EVENT_HANDLER_INTERNAL(mouseDraggedInternal)
    12101250
    12111251#undef NATIVE_MOUSE_EVENT_HANDLER
Note: See TracChangeset for help on using the changeset viewer.