Reviewed by Anders.
authorkdecker@apple.com <kdecker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 May 2008 20:50:36 +0000 (20:50 +0000)
committerkdecker@apple.com <kdecker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 May 2008 20:50:36 +0000 (20:50 +0000)
        Fixed: <rdar://problem/5840884>_recursive_resumeNullEventsForAllNetscapePlugins and _pauseNullEvents not defined

        Re-added these SPI methods because they are needed by some clients. They were accidentally removed
        in changeset <http://trac.webkit.org/changeset/31028>

        * Plugins/WebBaseNetscapePluginView.h: Added stopTimers, restartTimers to the header.
        * WebView/WebFrame.mm:
        (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]): Re-addd.
        (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]): Ditto.
        * WebView/WebFrameInternal.h: Ditto.
        * WebView/WebHTMLView.mm: Ditto.
        (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]): Ditto.
        (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]): Ditto.
        * WebView/WebHTMLViewInternal.h: Ditto.
        * WebView/WebHTMLViewPrivate.h: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33052 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/mac/ChangeLog
WebKit/mac/Plugins/WebBaseNetscapePluginView.h
WebKit/mac/WebView/WebFrame.mm
WebKit/mac/WebView/WebFrameInternal.h
WebKit/mac/WebView/WebHTMLView.mm
WebKit/mac/WebView/WebHTMLViewInternal.h
WebKit/mac/WebView/WebHTMLViewPrivate.h

index c6cb0d4..a6a89b5 100644 (file)
@@ -1,3 +1,23 @@
+2008-05-12  Kevin Decker  <kdecker@apple.com>
+
+        Reviewed by Anders.
+
+        Fixed: <rdar://problem/5840884>_recursive_resumeNullEventsForAllNetscapePlugins and _pauseNullEvents not defined
+        
+        Re-added these SPI methods because they are needed by some clients. They were accidentally removed
+        in changeset <http://trac.webkit.org/changeset/31028>
+        
+        * Plugins/WebBaseNetscapePluginView.h: Added stopTimers, restartTimers to the header.
+        * WebView/WebFrame.mm:
+        (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]): Re-addd.
+        (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]): Ditto.
+        * WebView/WebFrameInternal.h: Ditto.
+        * WebView/WebHTMLView.mm: Ditto.
+        (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]): Ditto.
+        (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]): Ditto.
+        * WebView/WebHTMLViewInternal.h: Ditto.
+        * WebView/WebHTMLViewPrivate.h: Ditto.
+
 2008-05-12  Anders Carlsson  <andersca@apple.com>
 
         Reviewed by Alexey.
index ae9279e..4b6b954 100644 (file)
@@ -152,6 +152,8 @@ typedef struct _NPPluginTextInputFuncs NPPluginTextInputFuncs;
 - (BOOL)start;
 - (BOOL)isStarted;
 - (void)stop;
+- (void)stopTimers;
+- (void)restartTimers;
 
 - (WebFrame *)webFrame;
 - (WebDataSource *)dataSource;
index 95d14f4..c6d2dfd 100644 (file)
@@ -42,6 +42,7 @@
 #import "WebFrameLoaderClient.h"
 #import "WebFrameViewInternal.h"
 #import "WebHTMLView.h"
+#import "WebHTMLViewInternal.h"
 #import "WebKitStatisticsPrivate.h"
 #import "WebNSURLExtras.h"
 #import "WebScriptDebugger.h"
@@ -470,6 +471,30 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
     return dataSource(_private->coreFrame->loader()->documentLoader());
 }
 
+#if ENABLE(NETSCAPE_PLUGIN_API) 
+- (void)_recursive_resumeNullEventsForAllNetscapePlugins
+{
+    Frame* coreFrame = core(self);
+    for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
+        NSView <WebDocumentView> *documentView = [[kit(frame) frameView] documentView];
+        if ([documentView isKindOfClass:[WebHTMLView class]])
+            [(WebHTMLView *)documentView _resumeNullEventsForAllNetscapePlugins];
+    }
+}
+#endif
+
+#if ENABLE(NETSCAPE_PLUGIN_API) 
+- (void)_recursive_pauseNullEventsForAllNetscapePlugins
+{
+    Frame* coreFrame = core(self);
+    for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
+        NSView <WebDocumentView> *documentView = [[kit(frame) frameView] documentView];
+        if ([documentView isKindOfClass:[WebHTMLView class]])
+            [(WebHTMLView *)documentView _pauseNullEventsForAllNetscapePlugins];
+    }
+}
+#endif
+
 - (void)_addData:(NSData *)data
 {
     Document* document = _private->coreFrame->document();
index 21f269a..fd58460 100644 (file)
@@ -138,6 +138,11 @@ WebView *getWebView(WebFrame *webFrame);
 // should be used instead.
 - (WebDataSource *)_dataSource;
 
+#if ENABLE(NETSCAPE_PLUGIN_API) 
+- (void)_recursive_resumeNullEventsForAllNetscapePlugins; 
+- (void)_recursive_pauseNullEventsForAllNetscapePlugins; 
+#endif 
+
 - (BOOL)_needsLayout;
 - (void)_drawRect:(NSRect)rect;
 - (NSArray*)_computePageRectsWithPrintWidthScaleFactor:(float)printWidthScaleFactor printHeight:(float)printHeight;
index 61382ce..13c3959 100644 (file)
@@ -4555,6 +4555,36 @@ static BOOL writingDirectionKeyBindingsEnabled()
     return _private->mouseDownEvent;
 }
 
+#if ENABLE(NETSCAPE_PLUGIN_API) 
+- (void)_pauseNullEventsForAllNetscapePlugins 
+{ 
+    NSArray *subviews = [self subviews]; 
+    unsigned int subviewCount = [subviews count]; 
+    unsigned int subviewIndex; 
+    
+    for (subviewIndex = 0; subviewIndex < subviewCount; subviewIndex++) { 
+        NSView *subview = [subviews objectAtIndex:subviewIndex]; 
+        if ([subview isKindOfClass:[WebBaseNetscapePluginView class]]) 
+            [(WebBaseNetscapePluginView *)subview stopTimers];
+    } 
+} 
+#endif 
+
+#if ENABLE(NETSCAPE_PLUGIN_API) 
+- (void)_resumeNullEventsForAllNetscapePlugins 
+{ 
+    NSArray *subviews = [self subviews]; 
+    unsigned int subviewCount = [subviews count]; 
+    unsigned int subviewIndex; 
+    
+    for (subviewIndex = 0; subviewIndex < subviewCount; subviewIndex++) { 
+        NSView *subview = [subviews objectAtIndex:subviewIndex]; 
+        if ([subview isKindOfClass:[WebBaseNetscapePluginView class]]) 
+            [(WebBaseNetscapePluginView *)subview restartTimers]; 
+    } 
+} 
+#endif 
+
 - (id<WebHTMLHighlighter>)_highlighterForType:(NSString*)type
 {
     return [_private->highlighters objectForKey:type];
index e802ed0..a97eee0 100644 (file)
@@ -41,6 +41,11 @@ namespace WebCore {
 - (void)_selectionChanged;
 - (void)_updateFontPanel;
 - (BOOL)_canSmartCopyOrDelete;
+#if ENABLE(NETSCAPE_PLUGIN_API) 
+- (void)_pauseNullEventsForAllNetscapePlugins; 
+- (void)_resumeNullEventsForAllNetscapePlugins; 
+#endif 
+
 - (id <WebHTMLHighlighter>)_highlighterForType:(NSString*)type;
 - (WebFrame *)_frame;
 - (void)_lookUpInDictionaryFromMenu:(id)sender;
index 5974ba4..45e0134 100644 (file)
@@ -36,6 +36,8 @@
 @protocol WebHTMLHighlighter
 - (NSRect)highlightRectForLine:(NSRect)lineRect representedNode:(DOMNode *)node;
 - (void)paintHighlightForBox:(NSRect)boxRect onLine:(NSRect)lineRect behindText:(BOOL)text entireLine:(BOOL)line representedNode:(DOMNode *)node;
+- (void)_resumeNullEventsForAllNetscapePlugins;
+- (void)_pauseNullEventsForAllNetscapePlugins;
 
 // the following methods are deprecated and will be removed once Mail switches to the new methods <rdar://problem/5050528>
 - (NSRect)highlightRectForLine:(NSRect)lineRect;