Splitting this out of bug #18697, I see I wrote this comment when writing SleepDisablerGlib: // We don't support suspend ("System") inhibitors, only idle inhibitors. // To get suspend inhibitors, we'd need to use the fancy GNOME // SessionManager API, which requires registering as a client application, // which is not practical from the web process. Secondly, because the only // current use of a suspend inhibitor in WebKit, // HTMLMediaElement::shouldDisableSleep, is suspicious. There's really no // valid reason for WebKit to ever block suspend, only idle. There are three things wrong with this comment: * Nowadays, GNOME suspends the computer automatically on inactivity, and we actually do want to prevent that. * Inhibiting idle does affect the autosuspend countdown. So the current code should prevent automatic suspend, just not manual suspend. (I think I stand by my comment that we do not want to inhibit normal suspend, since that would just be annoying.) * I don't know why I thought HTMLMediaElement::shouldDisableSleep was suspicious. Anyway, I guess the behavior we want is to ignore the Type argument and just always inhibit idle. That is, treat type=System the same way we current treat type=Display. I couldn't decide which to do when I wrote this code, but in retrospect that would have been a better option.
(In reply to Michael Catanzaro from comment #0) > Splitting this out of bug #18697 I meant bug #186971
Created attachment 361680 [details] Patch
Comment on attachment 361680 [details] Patch Clearing flags on attachment: 361680 Committed r241290: <https://trac.webkit.org/changeset/241290>
All reviewed patches have been landed. Closing bug.