[webkit-reviews] review denied: [Bug 171227] Indicate presence of audio when handling autoplay events : [Attachment 307998] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 24 13:12:53 PDT 2017


Sam Weinig <sam at webkit.org> has denied Matt Rajca <mrajca at apple.com>'s request
for review:
Bug 171227: Indicate presence of audio when handling autoplay events
https://bugs.webkit.org/show_bug.cgi?id=171227

Attachment 307998: Patch

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




--- Comment #2 from Sam Weinig <sam at webkit.org> ---
Comment on attachment 307998
  --> https://bugs.webkit.org/attachment.cgi?id=307998
Patch

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

> Source/WebCore/page/AutoplayEvent.h:41
> +enum AutoplayEventFlags {
> +    AutoplayEventFlagsNone = 0,
> +    AutoplayEventFlagsHasAudio = 1 << 0,
> +};

Generally we are using enum class for things like this theses days.

> Source/WebKit2/UIProcess/API/C/WKPage.cpp:2249
> +	       m_client.handleAutoplayEvent(toAPI(&page),
static_cast<WKAutoplayEvent>(event), static_cast<WKAutoplayEventFlags>(flags),
m_client.base.clientInfo);

This should use an explicit conversion function that enumerates the enums,
rather than assuming the WebCore type and the API type will have the same bit
values. This is also true for WKAutoplayEvent.


More information about the webkit-reviews mailing list