plug-ins in windows that are inactive but visible.
With this fix you can view videos in visible background windows on YouTube
(for example) and not see any drop in frame rate.
Reviewed by timo
* Plugins/WebBaseNetscapePluginView.m:
(-[WebBaseNetscapePluginView restartNullEvents]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15861
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-08-14 David Hyatt <hyatt@apple.com>
+
+ Fix for Radar bug 4478840, Safari should not reduce null events sent to
+ plug-ins in windows that are inactive but visible.
+
+ With this fix you can view videos in visible background windows on YouTube
+ (for example) and not see any drop in frame rate.
+
+ Reviewed by timo
+
+ * Plugins/WebBaseNetscapePluginView.m:
+ (-[WebBaseNetscapePluginView restartNullEvents]):
+
2006-08-14 Maciej Stachowiak <mjs@apple.com>
Reviewed by Brady.
NSTimeInterval interval;
- // Send null events less frequently when the actual window is not key. Also, allow the DB
- // to override this behavior and send full speed events to non key windows.
// If the plugin is completely obscured (scrolled out of view, for example), then we will
// send null events at a reduced rate.
- if (!isCompletelyObscured && ([[self window] isKeyWindow] || [[self webView] _dashboardBehavior:WebDashboardBehaviorAlwaysSendActiveNullEventsToPlugIns]))
- interval = NullEventIntervalActive;
- else
- interval = NullEventIntervalNotActive;
-
+ interval = !isCompletelyObscured ? NullEventIntervalActive : NullEventIntervalNotActive;
nullEventTimer = [[NSTimer scheduledTimerWithTimeInterval:interval
target:self
selector:@selector(sendNullEvent)