Changeset 74530 in webkit
- Timestamp:
- Dec 22, 2010 6:53:44 PM (13 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r74528 r74530 1 2010-12-22 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 REGRESSION (WK2): Plugins swallow CMD-W, CMD-Q, and probably other shortcuts 6 https://bugs.webkit.org/show_bug.cgi?id=51515 7 <rdar://problem/8740926> 8 9 Always return false for keyboard events where the command key is down. 10 11 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: 12 (WebKit::NetscapePlugin::platformHandleKeyboardEvent): 13 1 14 2010-12-22 Sam Weinig <sam@webkit.org> 2 15 -
trunk/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm
r74445 r74530 640 640 bool NetscapePlugin::platformHandleKeyboardEvent(const WebKeyboardEvent& keyboardEvent) 641 641 { 642 bool handled = false; 643 642 644 switch (m_eventModel) { 643 645 case NPEventModelCocoa: { 644 646 NPCocoaEvent event = initializeKeyboardEvent(keyboardEvent); 645 return NPP_HandleEvent(&event); 647 handled = NPP_HandleEvent(&event); 648 break; 646 649 } 647 650 … … 664 667 event.modifiers = modifiersForEvent(keyboardEvent); 665 668 event.message = keyboardEvent.nativeVirtualKeyCode() << 8 | keyboardEvent.macCharCode(); 666 return NPP_HandleEvent(&event); 669 handled = NPP_HandleEvent(&event); 670 break; 667 671 } 668 672 #endif … … 672 676 } 673 677 674 return false; 678 // Most plug-ins simply return true for all keyboard events, even those that aren't handled. 679 // This leads to bugs such as <rdar://problem/8740926>. We work around this by returning false 680 // if the keyboard event has the command modifier pressed. 681 if (keyboardEvent.metaKey()) 682 return false; 683 684 return handled; 675 685 } 676 686
Note: See TracChangeset
for help on using the changeset viewer.