[webkit-reviews] review granted: [Bug 173278] Screen sleeps while doing WebRTC video : [Attachment 312710] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 12 15:34:05 PDT 2017


Eric Carlson <eric.carlson at apple.com> has granted Jer Noble
<jer.noble at apple.com>'s request for review:
Bug 173278: Screen sleeps while doing WebRTC video
https://bugs.webkit.org/show_bug.cgi?id=173278

Attachment 312710: Patch

https://bugs.webkit.org/attachment.cgi?id=312710&action=review




--- Comment #5 from Eric Carlson <eric.carlson at apple.com> ---
Comment on attachment 312710
  --> https://bugs.webkit.org/attachment.cgi?id=312710
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=312710&action=review

> Source/WebCore/html/HTMLMediaElement.cpp:6362
> +    if (m_mediaStreamSrcObject) {
> +	   // Do not block system from sleeping if element is only rendering
local (capture) sources.
> +	   if (WTF::allOf(m_mediaStreamSrcObject->getTracks(), []
(RefPtr<MediaStreamTrack>& track) {
> +	       return track && track->isCaptureTrack();
> +	   }))
> +	       return SleepType::None;
> +    }

Nit: This indentation is confusing, even though it is technically correct. It
would be much easier to understand if the allOf was on a single line:

if (WTF::allOf(m_mediaStreamSrcObject->getTracks(), []
(RefPtr<MediaStreamTrack>& track) { return track && track->isCaptureTrack();
}))
    return SleepType::None;


More information about the webkit-reviews mailing list