<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Implement WebPlaybackControlsManager"
href="https://bugs.webkit.org/show_bug.cgi?id=164789#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Implement WebPlaybackControlsManager"
href="https://bugs.webkit.org/show_bug.cgi?id=164789">bug 164789</a>
from <span class="vcard"><a class="email" href="mailto:bdakin@apple.com" title="Beth Dakin <bdakin@apple.com>"> <span class="fn">Beth Dakin</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=164789#c3">comment #3</a>)
<span class="quote">> Comment on <span class=""><a href="attachment.cgi?id=294876&action=diff" name="attach_294876" title="Patch">attachment 294876</a> <a href="attachment.cgi?id=294876&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=294876&action=review">https://bugs.webkit.org/attachment.cgi?id=294876&action=review</a>
>
> > Source/WebCore/platform/mac/WebPlaybackControlsManager.h:29
> > +#import "AVKitSPI.h"
>
> Since this is a framework header, it should import other WebCore headers
> using <WebCore/ syntax.
> </span >
Okay!
<span class="quote">> > Source/WebCore/platform/mac/WebPlaybackControlsManager.h:42
> > +@interface WebPlaybackControlsManager : NSObject<AVFunctionBarPlaybackControlsControlling> {
>
> Missing space before the <.
> </span >
Fixed!
<span class="quote">> > Source/WebCore/platform/mac/WebPlaybackControlsManager.h:65
> > +@property NSTimeInterval seekToTime;
>
> This could probably be nonatomic (as could may other properties here).
>
> > Source/WebCore/platform/mac/WebPlaybackControlsManager.h:68
> > +@property BOOL hasEnabledAudio;
> > +@property BOOL hasEnabledVideo;
>
> Can be nonatomic.
> </span >
Added nonatomic.
<span class="quote">> > Source/WebCore/platform/mac/WebPlaybackControlsManager.h:70
> > +@property (nonatomic, retain, readwrite) NSArray<AVFunctionBarMediaSelectionOption *> *audioFunctionBarMediaSelectionOptions;
> > +@property (nonatomic, retain, readwrite) NSArray<AVFunctionBarMediaSelectionOption *> *legibleFunctionBarMediaSelectionOptions;
>
> We normally omit “readwrite” when possible. It’s a little unusual for a
> property whose value is NSArray to be “retain” rather than “copy”.
> </span >
We discussed this on irc and agreed that this can be removed from the header because it's a part of the protocol.
<span class="quote">> > Source/WebCore/platform/mac/WebPlaybackControlsManager.mm:98
> > + completionHandler(@[], nil);
>
> Missing space between the brackets.
> </span >
Fixed.
<span class="quote">> > Source/WebCore/platform/mac/WebPlaybackControlsManager.mm:104
> > + completionHandler(@[], nil);
>
> Ditto.
> </span >
Fixed.
<span class="quote">> > Source/WebCore/platform/mac/WebPlaybackControlsManager.mm:132
> > + _audioFunctionBarMediaSelectionOptions = audioOptions;
>
> I’d make a copy of audioOptions here (and change the property from “retain”
> to “copy”.
> </span >
See above.
<span class="quote">> > Source/WebCore/platform/mac/WebPlaybackControlsManager.mm:149
> > + if (audioMediaSelectionOption && self.audioFunctionBarMediaSelectionOptions)
>
> We normally don’t use trivial accessors from within a class’s own
> implementation, but just use the ivar directly.
> </span >
Fixed.
<span class="quote">> > Source/WebCore/platform/mac/WebPlaybackControlsManager.mm:162
> > + _legibleFunctionBarMediaSelectionOptions = legibleOptions;
>
> I’d make a copy of legibleOptions here (and change the property from
> “retain” to “copy”.</span >
See above.
Thank you!!</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>