Commit ef410ecd authored by mrowe@apple.com's avatar mrowe@apple.com

<rdar://problem/7224378> REGRESSION(r48360): Dragging a tab with a plug-in out...

<rdar://problem/7224378> REGRESSION(r48360): Dragging a tab with a plug-in out of a window, the plug-in gets slow and confused

Reviewed by Anders Carlsson.

In r48360, the fix for <rdar://problem/7090444>, I neglected to consider the case where the plug-in had already been started and
-start would do an early-return rather than calling -restartTimers and -addWindowObservers itself.

* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView viewDidMoveToWindow]): Reinstate the call to -restartTimers and -addWindowObservers, but guard them
with a check that the view is still in the window.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48394 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 569d7bc8
2009-09-15 Mark Rowe <mrowe@apple.com>
Reviewed by Anders Carlsson.
<rdar://problem/7224378> REGRESSION(r48360): Dragging a tab with a plug-in out of a window, the plug-in gets slow and confused
In r48360, the fix for <rdar://problem/7090444>, I neglected to consider the case where the plug-in had already been started and
-start would do an early-return rather than calling -restartTimers and -addWindowObservers itself.
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView viewDidMoveToWindow]): Reinstate the call to -restartTimers and -addWindowObservers, but guard them
with a check that the view is still in the window.
2009-09-14 Brady Eidson <beidson@apple.com>
Reviewed by Alexey Proskuryakov.
......
......@@ -482,9 +482,16 @@ using namespace WebCore;
selector:@selector(preferencesHaveChanged:)
name:WebPreferencesChangedNotification
object:nil];
// View moved to an actual window. Start it if not already started.
[self start];
// Starting the plug-in can result in it removing itself from the window so we need to ensure that we're still in
// place before doing anything that requires a window.
if ([self window]) {
[self restartTimers];
[self addWindowObservers];
}
} else if ([[self webView] hostWindow]) {
// View moved out of an actual window, but still has a host window.
// Call setWindow to explicitly "clip out" the plug-in from sight.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment