Changeset 181668 in webkit
- Timestamp:
- Mar 17, 2015, 3:48:07 PM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/platform/spi/mac/NSMenuSPI.h (modified) (1 diff)
-
WebKit/mac/ChangeLog (modified) (1 diff)
-
WebKit/mac/WebView/WebHTMLView.mm (modified) (2 diffs)
-
WebKit2/ChangeLog (modified) (1 diff)
-
WebKit2/UIProcess/API/mac/WKView.mm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r181667 r181668 1 2015-03-17 Tim Horton <timothy_horton@apple.com> 2 3 Cannot invoke action menus anymore 4 https://bugs.webkit.org/show_bug.cgi?id=142797 5 <rdar://problem/20032670> 6 7 Reviewed by Beth Dakin. 8 9 * platform/spi/mac/NSMenuSPI.h: 10 Add additional NSMenu SPI. 11 1 12 2015-03-17 Zalan Bujtas <zalan@apple.com> 2 13 -
trunk/Source/WebCore/platform/spi/mac/NSMenuSPI.h
r176692 r181668 28 28 // FIXME: We should just include the appropriate internal headers. 29 29 30 typedef 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 30 40 @interface NSMenuItem (Private) 31 41 + (QLPreviewMenuItem *)standardQuickLookMenuItem; -
trunk/Source/WebKit/mac/ChangeLog
r181618 r181668 1 2015-03-17 Tim Horton <timothy_horton@apple.com> 2 3 Cannot invoke action menus anymore 4 https://bugs.webkit.org/show_bug.cgi?id=142797 5 <rdar://problem/20032670> 6 7 Reviewed by Beth Dakin. 8 9 * WebView/WebHTMLView.mm: 10 (-[WebHTMLView otherMouseDown:]): 11 Don't override otherMouseDown: if the event would make an action menu. 12 1 13 2015-03-16 Ryosuke Niwa <rniwa@webkit.org> 2 14 -
trunk/Source/WebKit/mac/WebView/WebHTMLView.mm
r180281 r181668 107 107 #import <WebCore/MIMETypeRegistry.h> 108 108 #import <WebCore/MainFrame.h> 109 #import <WebCore/NSMenuSPI.h> 109 110 #import <WebCore/NSURLFileTypeMappingsSPI.h> 110 111 #import <WebCore/Page.h> … … 5388 5389 - (void)otherMouseDown:(NSEvent *)event 5389 5390 { 5390 if ([event buttonNumber] == 2) 5391 [self mouseDown:event]; 5392 else 5391 if ([event buttonNumber] != 2 || [NSMenu menuTypeForEvent:event] == NSMenuTypeActionMenu) { 5393 5392 [super otherMouseDown:event]; 5393 return; 5394 } 5395 5396 [self mouseDown:event]; 5394 5397 } 5395 5398 -
trunk/Source/WebKit2/ChangeLog
r181660 r181668 1 2015-03-17 Tim Horton <timothy_horton@apple.com> 2 3 Cannot invoke action menus anymore 4 https://bugs.webkit.org/show_bug.cgi?id=142797 5 <rdar://problem/20032670> 6 7 Reviewed by Beth Dakin. 8 9 * UIProcess/API/mac/WKView.mm: 10 Don't process mouse events that would make an action menu; call super 11 and let AppKit take care of it. We have to duplicate the macro so that 12 we can avoid calling super for the internal-only methods. 13 Also, otherMouseMoved is simply not a thing, so remove it. 14 1 15 2015-03-17 Beth Dakin <bdakin@apple.com> 2 16 -
trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm
r181660 r181668 92 92 #import <WebCore/LookupSPI.h> 93 93 #import <WebCore/NSImmediateActionGestureRecognizerSPI.h> 94 #import <WebCore/NSMenuSPI.h> 94 95 #import <WebCore/NSViewSPI.h> 95 96 #import <WebCore/PlatformEventFactoryMac.h> … … 1177 1178 return; \ 1178 1179 } \ 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 } \ 1179 1203 NativeWebMouseEvent webEvent(theEvent, self); \ 1180 1204 _data->_page->handleMouseEvent(webEvent); \ … … 1190 1214 return; \ 1191 1215 } \ 1216 if ([NSMenu menuTypeForEvent:theEvent] == NSMenuTypeActionMenu) { \ 1217 [super Selector:theEvent]; \ 1218 return; \ 1219 } \ 1192 1220 NativeWebMouseEvent webEvent(theEvent, self); \ 1193 1221 _data->_page->handleMouseEvent(webEvent); \ 1194 1222 } 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 } 1195 1235 #endif 1196 1236 1197 1237 NATIVE_MOUSE_EVENT_HANDLER(mouseEntered) 1198 1238 NATIVE_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)1203 1239 NATIVE_MOUSE_EVENT_HANDLER(otherMouseDown) 1204 1240 NATIVE_MOUSE_EVENT_HANDLER(otherMouseDragged) 1205 NATIVE_MOUSE_EVENT_HANDLER(otherMouseMoved)1206 1241 NATIVE_MOUSE_EVENT_HANDLER(otherMouseUp) 1207 1242 NATIVE_MOUSE_EVENT_HANDLER(rightMouseDown) 1208 1243 NATIVE_MOUSE_EVENT_HANDLER(rightMouseDragged) 1209 1244 NATIVE_MOUSE_EVENT_HANDLER(rightMouseUp) 1245 1246 NATIVE_MOUSE_EVENT_HANDLER_INTERNAL(mouseMovedInternal) 1247 NATIVE_MOUSE_EVENT_HANDLER_INTERNAL(mouseDownInternal) 1248 NATIVE_MOUSE_EVENT_HANDLER_INTERNAL(mouseUpInternal) 1249 NATIVE_MOUSE_EVENT_HANDLER_INTERNAL(mouseDraggedInternal) 1210 1250 1211 1251 #undef NATIVE_MOUSE_EVENT_HANDLER
Note:
See TracChangeset
for help on using the changeset viewer.