Bug 178846

Summary: Add inspector logging for MediaElementSession autoplay
Product: WebKit Reporter: youenn fablet <youennf>
Component: Tools / TestsAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson, lforschler, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description youenn fablet 2017-10-25 21:21:24 PDT
This is often a place where devs have difficulties
Comment 1 youenn fablet 2017-10-25 21:23:45 PDT
Created attachment 324953 [details]
Patch
Comment 2 Eric Carlson 2017-10-26 05:21:53 PDT
Comment on attachment 324953 [details]
Patch

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

> Source/WebCore/html/MediaElementSession.cpp:112
> +    , m_logIdentifier(reinterpret_cast<const void*>(cryptographicallyRandomNumber()))

I think it would be better to use the media element’s identifier, so it will be easier to understand logging for pages with more than one element.

> Source/WebCore/html/MediaElementSession.cpp:846
> +bool MediaElementSession::willLog(WTFLogLevel level) const

Is it possible to just use the media element method?

> Source/WebCore/html/MediaElementSession.cpp:857
> +WTFLogChannel& MediaElementSession::logChannel() const

Ditto.
Comment 3 youenn fablet 2017-10-26 10:39:32 PDT
Created attachment 325027 [details]
Patch
Comment 4 youenn fablet 2017-10-26 10:40:11 PDT
Thanks for the review.
I updated patch accordingly.
Comment 5 WebKit Commit Bot 2017-10-26 11:38:58 PDT
Comment on attachment 325027 [details]
Patch

Clearing flags on attachment: 325027

Committed r224030: <https://trac.webkit.org/changeset/224030>
Comment 6 WebKit Commit Bot 2017-10-26 11:38:59 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2017-11-15 12:43:54 PST
<rdar://problem/35568039>