RESOLVED FIXED 40939
Full-screened content doesn't keep the display on: Safari not grabbing a power assertion?
https://bugs.webkit.org/show_bug.cgi?id=40939
Summary Full-screened content doesn't keep the display on: Safari not grabbing a powe...
Jer Noble
Reported 2010-06-21 13:43:56 PDT
Attachments
Patch (10.70 KB, patch)
2010-06-21 13:59 PDT, Jer Noble
no flags
Patch (10.83 KB, patch)
2010-06-21 14:42 PDT, Jer Noble
no flags
Patch (11.36 KB, patch)
2010-06-21 17:03 PDT, Jer Noble
no flags
Patch (11.21 KB, patch)
2010-06-24 13:00 PDT, Jer Noble
eric.carlson: review+
Jer Noble
Comment 1 2010-06-21 13:44:08 PDT
Jer Noble
Comment 2 2010-06-21 13:59:03 PDT
WebKit Review Bot
Comment 3 2010-06-21 14:01:53 PDT
Attachment 59285 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1 WebKit/mac/WebView/WebVideoFullscreenController.h:51: _idleDisplaySleepAssertion is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] WebKit/mac/WebView/WebVideoFullscreenController.h:52: _idleSystemSleepAssertion is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Total errors found: 2 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Eric Seidel (no email)
Comment 4 2010-06-21 14:07:22 PDT
Jer Noble
Comment 5 2010-06-21 14:42:10 PDT
WebKit Review Bot
Comment 6 2010-06-21 14:43:15 PDT
Attachment 59294 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1 WebKit/mac/WebView/WebVideoFullscreenController.h:51: _idleDisplaySleepAssertion is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] WebKit/mac/WebView/WebVideoFullscreenController.h:52: _idleSystemSleepAssertion is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Total errors found: 2 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Eric Seidel (no email)
Comment 7 2010-06-21 14:50:00 PDT
Jer Noble
Comment 8 2010-06-21 17:03:57 PDT
WebKit Review Bot
Comment 9 2010-06-21 17:05:39 PDT
Attachment 59315 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1 WebKit/mac/WebView/WebVideoFullscreenController.h:51: _idleDisplaySleepAssertion is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] WebKit/mac/WebView/WebVideoFullscreenController.h:52: _idleSystemSleepAssertion is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Total errors found: 2 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Jer Noble
Comment 10 2010-06-24 13:00:08 PDT
WebKit Review Bot
Comment 11 2010-06-24 13:05:47 PDT
Attachment 59686 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1 WebKit/mac/WebView/WebVideoFullscreenController.h:51: _idleDisplaySleepAssertion is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] WebKit/mac/WebView/WebVideoFullscreenController.h:52: _idleSystemSleepAssertion is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Total errors found: 2 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Eric Carlson
Comment 12 2010-06-24 13:32:40 PDT
Comment on attachment 59686 [details] Patch WebKit/WebKit.xcodeproj/project.pbxproj:777 + CD8EAC7211CAC9A300774075 /* IOKit.framework */, Should probably ask mrowe if it worth linking with the a Framework or if you should load it dynamically. WebKit/mac/WebView/WebVideoFullscreenController.mm:235 + if (_mediaElement && _mediaElement->platformMedia().type == WebCore::PlatformMedia::QTMovieType) + rate = [_mediaElement->platformMedia().media.qtMovie rate]; It might be worth having an accessor function for the QTMovie since "[_mediaElement->platformMedia().media.qtMovie" is used in the file in several places now WebKit/mac/WebView/WebVideoFullscreenController.mm:238 + if (rate && !_isEndingFullscreen) { + [self _disableIdleSystemSleep]; + [self _disableIdleDisplaySleep]; + } else { + [self _enableIdleSystemSleep]; + [self _enableIdleDisplaySleep]; + } Is there any reason to have separate functions for system and display sleep? You always enabled or disabled so you may want to have just one function to disable and one to enable.
Jer Noble
Comment 13 2010-06-24 16:25:36 PDT
Darin Adler
Comment 14 2010-06-25 13:11:30 PDT
Comment on attachment 59686 [details] Patch This should not statically link to the IOKit framework. We should soft link instead. Unless someone more expert than I on the Safari team said otherwise.
Jer Noble
Comment 15 2010-06-25 13:17:41 PDT
(In reply to comment #14) > (From update of attachment 59686 [details]) > This should not statically link to the IOKit framework. We should soft link instead. Unless someone more expert than I on the Safari team said otherwise. I talked this over with Eric and Mark before checking in; AppKit.framework statically links against IOKit.framework, and WebKit.framework statically links against AppKit.framework. So, it should be safe to link to this statically without affecting startup time, since we effectively already statically link against IOKit.framework.
Note You need to log in before you can comment on or make changes to this bug.