Reviewed by Geoff Garen.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jul 2005 19:48:45 +0000 (19:48 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jul 2005 19:48:45 +0000 (19:48 +0000)
        - improve handling of plug-ins when the WebView or a superview is hidden with -[NSView setHidden]

        * Plugins.subproj/WebBaseNetscapePluginView.m: (-[WebBaseNetscapePluginView saveAndSetPortStateForUpdate:]):
        Add "hidden" to the list of reasons to clip out all plug-in drawing.

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

WebKit/ChangeLog
WebKit/Plugins.subproj/WebBaseNetscapePluginView.m

index dd80657ac4e7840120fc56804b0f223c4eab3ada..e8b6aaecef568092dbb45b435001dd6faed646f7 100644 (file)
@@ -1,3 +1,12 @@
+2005-07-19  Darin Adler  <darin@apple.com>
+
+        Reviewed by Geoff Garen.
+
+        - improve handling of plug-ins when the WebView or a superview is hidden with -[NSView setHidden]
+
+        * Plugins.subproj/WebBaseNetscapePluginView.m: (-[WebBaseNetscapePluginView saveAndSetPortStateForUpdate:]):
+        Add "hidden" to the list of reasons to clip out all plug-in drawing.
+
 2005-07-18  John Sullivan  <sullivan@apple.com>
         
         Written by Trey Matteson  <trey@usa.net>
index 08269a633c5b229a311509153ad0a61c34950a2e..d82789046555a39771e5ab481aefa630704e02b8 100644 (file)
@@ -229,7 +229,11 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
     // 4) we're inside of viewWillMoveToWindow: with a nil window. In this case, superviews may already have nil 
     // superviews and nil windows and results from convertRect:toView: are incorrect.
     NSWindow *realWindow = [self window];
-    if (window.width <= 0 || window.height <= 0 || window.x < -100000 || realWindow == nil || [realWindow isMiniaturized] || [NSApp isHidden] || ![self superviewsHaveSuperviews]) {
+    if (window.width <= 0 || window.height <= 0 || window.x < -100000
+            || realWindow == nil || [realWindow isMiniaturized]
+            || [NSApp isHidden]
+            || ![self superviewsHaveSuperviews]
+            || [self isHiddenOrHasHiddenAncestor]) {
         // The following code tries to give plug-ins the same size they will eventually have.
         // The specifiedWidth and specifiedHeight variables are used to predict the size that
         // WebCore will eventually resize us to.