From 4f93bbbe69f73e9c7695480def123cf61a0e60b8 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Fri, 14 Nov 2008 10:24:16 +0000 Subject: [PATCH] Bug 156583: Stray QuickTime, Real, or Java plugin frame can appear after switching to another tab. r=smichaud, sr=roc, a1.9.1b2=beltzner --- widget/src/cocoa/nsChildView.mm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/widget/src/cocoa/nsChildView.mm b/widget/src/cocoa/nsChildView.mm index 17d1d0761c7..a46e6e8a2f2 100644 --- a/widget/src/cocoa/nsChildView.mm +++ b/widget/src/cocoa/nsChildView.mm @@ -2831,6 +2831,19 @@ NSEvent* gLastDragEvent = nil; } +- (void)viewWillMoveToWindow:(NSWindow *)newWindow +{ + NS_OBJC_BEGIN_TRY_ABORT_BLOCK; + + if (!newWindow) + HideChildPluginViews(self); + + [super viewWillMoveToWindow:newWindow]; + + NS_OBJC_END_TRY_ABORT_BLOCK; +} + + - (void)viewWillStartLiveResize { NS_OBJC_BEGIN_TRY_ABORT_BLOCK;