Title: [215696] trunk/Source/WebCore
Revision
215696
Author
aes...@apple.com
Date
2017-04-24 14:33:05 -0700 (Mon, 24 Apr 2017)

Log Message

[macOS] Fix two minor issues with MediaSelectionOption::Type
https://bugs.webkit.org/show_bug.cgi?id=171235

Reviewed by Sam Weinig.

* platform/MediaSelectionOption.h: Gave type a default value, and added explicit
constructors to make gcc and msvc happy.
* platform/mac/WebPlaybackControlsManager.mm:
(toAVTouchBarMediaSelectionOptionType): Added an ASSERT_NOT_REACHED if none of the switch
cases match.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (215695 => 215696)


--- trunk/Source/WebCore/ChangeLog	2017-04-24 21:17:24 UTC (rev 215695)
+++ trunk/Source/WebCore/ChangeLog	2017-04-24 21:33:05 UTC (rev 215696)
@@ -1,5 +1,18 @@
 2017-04-24  Andy Estes  <aes...@apple.com>
 
+        [macOS] Fix two minor issues with MediaSelectionOption::Type
+        https://bugs.webkit.org/show_bug.cgi?id=171235
+
+        Reviewed by Sam Weinig.
+
+        * platform/MediaSelectionOption.h: Gave type a default value, and added explicit
+        constructors to make gcc and msvc happy.
+        * platform/mac/WebPlaybackControlsManager.mm:
+        (toAVTouchBarMediaSelectionOptionType): Added an ASSERT_NOT_REACHED if none of the switch
+        cases match.
+
+2017-04-24  Andy Estes  <aes...@apple.com>
+
         [macOS] Enable media selection button on AVTouchBarScrubber
         https://bugs.webkit.org/show_bug.cgi?id=171149
         <rdar://problem/29875010>

Modified: trunk/Source/WebCore/platform/MediaSelectionOption.h (215695 => 215696)


--- trunk/Source/WebCore/platform/MediaSelectionOption.h	2017-04-24 21:17:24 UTC (rev 215695)
+++ trunk/Source/WebCore/platform/MediaSelectionOption.h	2017-04-24 21:33:05 UTC (rev 215696)
@@ -36,8 +36,15 @@
         LegibleAuto,
     };
 
+    MediaSelectionOption() = default;
+    MediaSelectionOption(const String& displayName, Type type)
+        : displayName { displayName }
+        , type { type }
+    {
+    }
+
     String displayName;
-    Type type;
+    Type type { Type::Regular };
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm (215695 => 215696)


--- trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm	2017-04-24 21:17:24 UTC (rev 215695)
+++ trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm	2017-04-24 21:33:05 UTC (rev 215696)
@@ -233,6 +233,7 @@
         return AVTouchBarMediaSelectionOptionTypeLegibleAuto;
     }
 
+    ASSERT_NOT_REACHED();
     return AVTouchBarMediaSelectionOptionTypeRegular;
 }
 #endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to