[Webkit-unassigned] [Bug 180197] New: Ensure SleepDisabler is not held by pages in page cache

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 30 07:20:34 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=180197

            Bug ID: 180197
           Summary: Ensure SleepDisabler is not held by pages in page
                    cache
           Product: WebKit
           Version: Other
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Media Elements
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mcatanzaro at igalia.com
                CC: bugs-noreply at webkitgtk.org

After implementing PAL::SleepDisabler for GTK in bug #178485, I decided to try removing the early return at the top of HTMLMediaElement::shouldDisableSleep for non-Cocoa ports, hoping that HTMLMediaElement would create a SleepDisabler during video playback and destroy it at the end of video playback, to keep the display from turning off when a video is playing. I tested it on youtube.com and noticed the following unexpected behavior:

 (1) When playing a video on YouTube, no SleepDisabler is initially created during normal video playback, so the display will turn off undesirably.
 (2) But a SleepDisabler *is* created when pressing the browser's Back button during video playback.
 (3) The SleepDisabler is then only destroyed when (a) closing the browser tab that had been displaying YouTube, or (b) when pressing Forward to bring back the original YouTube page.

So I think monitor sleep is disabled when the YouTube page is in the page cache, and not reenabled until the page exits the page cache. That's not good! I wonder if this is a GTK-specific problem, or if it's also broken on macOS and iOS.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171130/d84351e1/attachment-0001.html>


More information about the webkit-unassigned mailing list