Changeset 35408 in webkit
- Timestamp:
- Jul 28, 2008 9:59:20 AM (16 years ago)
- Location:
- trunk/WebKit/mac
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/mac/ChangeLog
r35377 r35408 1 2008-07-28 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Adam. 4 5 <rdar://problem/6105529> 6 https://bugs.webkit.org/show_bug.cgi?id=19659 7 Turning off plugins causes crash 8 9 When an active page has plug-ins, and plug-ins are disabled, they will be stopped and will 10 end up in a state where they don't have an event handler. Because of this, we need to 11 check that the plug-in has been started before calling the event handler. 12 13 * Plugins/WebBaseNetscapePluginView.mm: 14 (-[WebBaseNetscapePluginView sendActivateEvent:]): 15 (-[WebBaseNetscapePluginView sendDrawRectEvent:]): 16 (-[WebBaseNetscapePluginView setHasFocus:]): 17 (-[WebBaseNetscapePluginView mouseDown:]): 18 (-[WebBaseNetscapePluginView mouseUp:]): 19 (-[WebBaseNetscapePluginView mouseEntered:]): 20 (-[WebBaseNetscapePluginView mouseExited:]): 21 (-[WebBaseNetscapePluginView handleMouseMoved:]): 22 (-[WebBaseNetscapePluginView mouseDragged:]): 23 (-[WebBaseNetscapePluginView scrollWheel:]): 24 (-[WebBaseNetscapePluginView keyUp:]): 25 (-[WebBaseNetscapePluginView keyDown:]): 26 (-[WebBaseNetscapePluginView flagsChanged:]): 27 (-[WebBaseNetscapePluginView cut:]): 28 (-[WebBaseNetscapePluginView copy:]): 29 (-[WebBaseNetscapePluginView paste:]): 30 (-[WebBaseNetscapePluginView selectAll:]): 31 (-[WebBaseNetscapePluginView drawRect:]): 32 (-[WebBaseNetscapePluginView inputContext]): 33 1 34 2008-07-26 Daniel Jalkut <jalkut@red-sweater.com> 2 35 -
trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
r35275 r35408 773 773 - (void)sendActivateEvent:(BOOL)activate 774 774 { 775 if (!isStarted) 776 return; 777 775 778 eventHandler->windowFocusChanged(activate); 776 779 } … … 778 781 - (void)sendDrawRectEvent:(NSRect)rect 779 782 { 783 ASSERT(eventHandler); 784 780 785 eventHandler->drawRect(rect); 781 786 } … … 832 837 - (void)setHasFocus:(BOOL)flag 833 838 { 839 if (!isStarted) 840 return; 841 834 842 if (hasFocus == flag) 835 843 return; … … 870 878 - (void)mouseDown:(NSEvent *)theEvent 871 879 { 880 if (!isStarted) 881 return; 882 872 883 eventHandler->mouseDown(theEvent); 873 884 } … … 875 886 - (void)mouseUp:(NSEvent *)theEvent 876 887 { 888 if (!isStarted) 889 return; 890 877 891 eventHandler->mouseUp(theEvent); 878 892 } … … 880 894 - (void)mouseEntered:(NSEvent *)theEvent 881 895 { 896 if (!isStarted) 897 return; 898 882 899 eventHandler->mouseEntered(theEvent); 883 900 } … … 885 902 - (void)mouseExited:(NSEvent *)theEvent 886 903 { 904 if (!isStarted) 905 return; 906 887 907 eventHandler->mouseExited(theEvent); 888 908 … … 896 916 - (void)handleMouseMoved:(NSEvent *)theEvent 897 917 { 918 if (!isStarted) 919 return; 920 898 921 eventHandler->mouseMoved(theEvent); 899 922 } … … 901 924 - (void)mouseDragged:(NSEvent *)theEvent 902 925 { 926 if (!isStarted) 927 return; 928 903 929 eventHandler->mouseDragged(theEvent); 904 930 } … … 906 932 - (void)scrollWheel:(NSEvent *)theEvent 907 933 { 934 if (!isStarted) { 935 [super scrollWheel:theEvent]; 936 return; 937 } 938 908 939 if (!eventHandler->scrollWheel(theEvent)) 909 940 [super scrollWheel:theEvent]; … … 912 943 - (void)keyUp:(NSEvent *)theEvent 913 944 { 945 if (!isStarted) 946 return; 947 914 948 eventHandler->keyUp(theEvent); 915 949 } … … 917 951 - (void)keyDown:(NSEvent *)theEvent 918 952 { 953 if (!isStarted) 954 return; 955 919 956 eventHandler->keyDown(theEvent); 920 957 } … … 922 959 - (void)flagsChanged:(NSEvent *)theEvent 923 960 { 961 if (!isStarted) 962 return; 963 924 964 eventHandler->flagsChanged(theEvent); 925 965 } … … 927 967 - (void)cut:(id)sender 928 968 { 969 if (!isStarted) 970 return; 971 929 972 eventHandler->keyDown([NSApp currentEvent]); 930 973 } … … 932 975 - (void)copy:(id)sender 933 976 { 977 if (!isStarted) 978 return; 979 934 980 eventHandler->keyDown([NSApp currentEvent]); 935 981 } … … 937 983 - (void)paste:(id)sender 938 984 { 985 if (!isStarted) 986 return; 987 939 988 eventHandler->keyDown([NSApp currentEvent]); 940 989 } … … 942 991 - (void)selectAll:(id)sender 943 992 { 993 if (!isStarted) 994 return; 995 944 996 eventHandler->keyDown([NSApp currentEvent]); 945 997 } … … 1564 1616 - (void)drawRect:(NSRect)rect 1565 1617 { 1566 if (!isStarted) { 1567 return; 1568 } 1618 if (!isStarted) 1619 return; 1569 1620 1570 1621 if ([NSGraphicsContext currentContextDrawingToScreen]) … … 1888 1939 { 1889 1940 #ifndef NP_NO_CARBON 1890 if ( [self isStarted] &&eventModel == NPEventModelCarbon)1941 if (![self isStarted] || eventModel == NPEventModelCarbon) 1891 1942 return nil; 1892 1943 #endif
Note: See TracChangeset
for help on using the changeset viewer.