WebAVMediaSelectionOption should implement -mediaType
rdar://89934589
Created attachment 454849 [details] Patch
Comment on attachment 454849 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=454849&action=review > Source/WebCore/platform/MediaSelectionOption.h:87 > +template<class Decoder> std::optional<MediaSelectionOption> MediaSelectionOption::decode(Decoder& decoder) > +{ > + MediaSelectionOption option; > + > + if (!decoder.decode(option.mediaType)) > + return { }; > + > + if (!decoder.decode(option.displayName)) > + return { }; > + > + if (!decoder.decode(option.legibleType)) > + return { }; > + > + return option; > +} Nit: this could be: template<class Decoder> bool MediaSelectionOption::decode(Decoder& decoder, MediaSelectionOption& option) { return decoder.decode(option.mediaType) && decoder.decode(option.displayName) && decoder.decode(option.legibleType); } Slightly more compact. No hard evidence if this is true or not, but my intuition says it's slightly more efficient as well.
Created attachment 454852 [details] Patch for landing
Committed r291361 (248493@main): <https://commits.webkit.org/248493@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 454852 [details].