Summary: | [GStreamer] SleepDisabler not destroyed when video playback stops | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> | ||||||||
Component: | WebKitGTK | Assignee: | Philippe Normand <pnormand> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | bugs-noreply, calvaris, cdumez, cgarcia, changseok, eric.carlson, esprehn+autocc, ews-watchlist, glenn, gustavo, gyuyoung.kim, jer.noble, mcatanzaro, menard, philipj, pnormand, sergio, smoley, vjaquez | ||||||||
Priority: | P2 | Keywords: | DoNotImportToRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | PC | ||||||||||
OS: | Linux | ||||||||||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=186971 https://bugs.webkit.org/show_bug.cgi?id=219355 https://bugs.webkit.org/show_bug.cgi?id=219354 |
||||||||||
Attachments: |
|
Description
Michael Catanzaro
2020-11-30 06:46:05 PST
Created attachment 432274 [details]
Patch
Eric, is this an issue on Apple ports too? The new test fails on the mac EWS. (In reply to Philippe Normand from comment #2) > Eric, is this an issue on Apple ports too? The new test fails on the mac EWS. I haven't seen reports of it, so I don't believe it is a problem on the Apple ports. I'm not surprised the test fails as written though because we don't explicitly call `updateSleepDisabling` when playback ends. I assume it is called as a side effect of something that happens later on Apple ports. It would be better to make it explicit, something like this maybe: diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp index 3f21dfe8ed17..69f4bb870622 100644 --- a/Source/WebCore/html/HTMLMediaElement.cpp +++ b/Source/WebCore/html/HTMLMediaElement.cpp @@ -5809,8 +5809,10 @@ void HTMLMediaElement::dispatchEvent(Event& event) { DEBUG_LOG(LOGIDENTIFIER, event.type()); - if (m_removedBehaviorRestrictionsAfterFirstUserGesture && event.type() == eventNames().endedEvent) + if (m_removedBehaviorRestrictionsAfterFirstUserGesture && event.type() == eventNames().endedEvent) { document().userActivatedMediaFinishedPlaying(); + updateSleepDisabling(); + } HTMLElement::dispatchEvent(event); Yes, indeed. Explicit is better! Created attachment 432323 [details]
Patch
Created attachment 432326 [details]
Patch
Committed r279313 (239189@main): <https://commits.webkit.org/239189@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 432326 [details]. |