Bug 145311 - [Mac] Device picker menu should be persistent
Summary: [Mac] Device picker menu should be persistent
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-05-22 11:17 PDT by Eric Carlson
Modified: 2015-05-22 12:16 PDT (History)
2 users (show)

See Also:


Attachments
Proposed patch. (13.07 KB, patch)
2015-05-22 11:29 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2015-05-22 11:17:13 PDT
Don't delete the device menu picker when the last client goes away because device selection should be persistent.
Comment 1 Radar WebKit Bug Importer 2015-05-22 11:17:46 PDT
<rdar://problem/21077978>
Comment 2 Eric Carlson 2015-05-22 11:29:26 PDT
Created attachment 253596 [details]
Proposed patch.
Comment 3 WebKit Commit Bot 2015-05-22 11:32:06 PDT
Attachment 253596 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:31:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 1 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Brent Fulgham 2015-05-22 11:53:10 PDT
Comment on attachment 253596 [details]
Proposed patch.

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

> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:-173
> -        [m_outputDeviceMenuController removeObserver:m_outputDeviceMenuControllerDelegate.get() forKeyPath:externalOutputDevicePickedKeyName];

How do these observers get removed when the target picker goes away? I guess the point of this patch is to keep this object alive for as long as WebKit is running?
Comment 5 Eric Carlson 2015-05-22 12:08:30 PDT
(In reply to comment #4)
> Comment on attachment 253596 [details]
> Proposed patch.
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=253596&action=review
> 
> > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:-173
> > -        [m_outputDeviceMenuController removeObserver:m_outputDeviceMenuControllerDelegate.get() forKeyPath:externalOutputDevicePickedKeyName];
> 
> How do these observers get removed when the target picker goes away? I guess
> the point of this patch is to keep this object alive for as long as WebKit
> is running?

They don't. This technically isn't a problem because this is a singleton, but I will add that code to the destructor for completeness.
Comment 6 Eric Carlson 2015-05-22 12:15:55 PDT
Committed r184788: https://trac.webkit.org/r184788