Title: [144336] trunk/Source
Revision
144336
Author
eric.carl...@apple.com
Date
2013-02-28 11:35:15 -0800 (Thu, 28 Feb 2013)

Log Message

[Mac] use HAVE() macro instead of version check
https://bugs.webkit.org/show_bug.cgi?id=111087

Reviewed by Dean Jackson.

Source/WebCore:

No new tests, covered by existing tests.

* page/CaptionUserPreferencesMac.h: Use HAVE(MEDIA_ACCESSIBILITY_FRAMEWORK).
* page/CaptionUserPreferencesMac.mm: Ditto.
(WebCore::CaptionUserPreferencesMac::CaptionUserPreferencesMac): Ditto.
(WebCore::CaptionUserPreferencesMac::~CaptionUserPreferencesMac): Ditto.

* page/PageGroup.cpp:
(WebCore::PageGroup::captionPreferences): Ditto.

Source/WTF:

* wtf/Platform.h: Define HAVE_MEDIA_ACCESSIBILITY_FRAMEWORK.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (144335 => 144336)


--- trunk/Source/WTF/ChangeLog	2013-02-28 19:33:48 UTC (rev 144335)
+++ trunk/Source/WTF/ChangeLog	2013-02-28 19:35:15 UTC (rev 144336)
@@ -1,3 +1,12 @@
+2013-02-28  Eric Carlson  <eric.carl...@apple.com>
+
+        [Mac] use HAVE() macro instead of version check
+        https://bugs.webkit.org/show_bug.cgi?id=111087
+
+        Reviewed by Dean Jackson.
+
+        * wtf/Platform.h: Define HAVE_MEDIA_ACCESSIBILITY_FRAMEWORK.
+
 2013-02-27  Balazs Kilvady  <kilva...@homejinni.com>
 
         Bug in atomicIncrement implementation for MIPS GCC

Modified: trunk/Source/WTF/wtf/Platform.h (144335 => 144336)


--- trunk/Source/WTF/wtf/Platform.h	2013-02-28 19:33:48 UTC (rev 144335)
+++ trunk/Source/WTF/wtf/Platform.h	2013-02-28 19:35:15 UTC (rev 144336)
@@ -1020,6 +1020,10 @@
 #define HAVE_AVFOUNDATION_TEXT_TRACK_SUPPORT 1
 #endif
 
+#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+#define HAVE_MEDIA_ACCESSIBILITY_FRAMEWORK 1
+#endif
+
 #if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(EFL) || (PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO)) || PLATFORM(BLACKBERRY)
 #define WTF_USE_REQUEST_ANIMATION_FRAME_TIMER 1
 #endif

Modified: trunk/Source/WebCore/ChangeLog (144335 => 144336)


--- trunk/Source/WebCore/ChangeLog	2013-02-28 19:33:48 UTC (rev 144335)
+++ trunk/Source/WebCore/ChangeLog	2013-02-28 19:35:15 UTC (rev 144336)
@@ -1,3 +1,20 @@
+2013-02-28  Eric Carlson  <eric.carl...@apple.com>
+
+        [Mac] use HAVE() macro instead of version check
+        https://bugs.webkit.org/show_bug.cgi?id=111087
+
+        Reviewed by Dean Jackson.
+
+        No new tests, covered by existing tests.
+
+        * page/CaptionUserPreferencesMac.h: Use HAVE(MEDIA_ACCESSIBILITY_FRAMEWORK).
+        * page/CaptionUserPreferencesMac.mm: Ditto.
+        (WebCore::CaptionUserPreferencesMac::CaptionUserPreferencesMac): Ditto.
+        (WebCore::CaptionUserPreferencesMac::~CaptionUserPreferencesMac): Ditto.
+
+        * page/PageGroup.cpp:
+        (WebCore::PageGroup::captionPreferences): Ditto.
+
 2013-02-28  Chris Fleizach  <cfleiz...@apple.com>
 
         WebSpeech: support the boundary event

Modified: trunk/Source/WebCore/page/CaptionUserPreferencesMac.h (144335 => 144336)


--- trunk/Source/WebCore/page/CaptionUserPreferencesMac.h	2013-02-28 19:33:48 UTC (rev 144335)
+++ trunk/Source/WebCore/page/CaptionUserPreferencesMac.h	2013-02-28 19:35:15 UTC (rev 144336)
@@ -40,7 +40,7 @@
     static PassOwnPtr<CaptionUserPreferencesMac> create(PageGroup* group) { return adoptPtr(new CaptionUserPreferencesMac(group)); }
     virtual ~CaptionUserPreferencesMac();
 
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+#if HAVE(MEDIA_ACCESSIBILITY_FRAMEWORK)
     virtual bool userHasCaptionPreferences() const OVERRIDE;
     virtual bool userPrefersCaptions() const OVERRIDE;
     virtual void setUserPrefersCaptions(bool) OVERRIDE;
@@ -60,7 +60,7 @@
 private:
     CaptionUserPreferencesMac(PageGroup*);
 
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+#if HAVE(MEDIA_ACCESSIBILITY_FRAMEWORK)
     String captionsWindowCSS() const;
     String captionsBackgroundCSS() const;
     String captionsTextColorCSS() const;

Modified: trunk/Source/WebCore/page/CaptionUserPreferencesMac.mm (144335 => 144336)


--- trunk/Source/WebCore/page/CaptionUserPreferencesMac.mm	2013-02-28 19:33:48 UTC (rev 144335)
+++ trunk/Source/WebCore/page/CaptionUserPreferencesMac.mm	2013-02-28 19:35:15 UTC (rev 144336)
@@ -45,11 +45,11 @@
 #import <wtf/RetainPtr.h>
 #import <wtf/text/StringBuilder.h>
 
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+#if HAVE(MEDIA_ACCESSIBILITY_FRAMEWORK)
 #import "MediaAccessibility/MediaAccessibility.h"
 #endif
 
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+#if HAVE(MEDIA_ACCESSIBILITY_FRAMEWORK)
 
 SOFT_LINK_FRAMEWORK_OPTIONAL(MediaAccessibility)
 
@@ -77,7 +77,7 @@
 
 namespace WebCore {
 
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+#if HAVE(MEDIA_ACCESSIBILITY_FRAMEWORK)
 static void userCaptionPreferencesChangedNotificationCallback(CFNotificationCenterRef, void* observer, CFStringRef, const void *, CFDictionaryRef)
 {
     static_cast<CaptionUserPreferencesMac*>(observer)->captionPreferencesChanged();
@@ -86,7 +86,7 @@
 
 CaptionUserPreferencesMac::CaptionUserPreferencesMac(PageGroup* group)
     : CaptionUserPreferences(group)
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+#if HAVE(MEDIA_ACCESSIBILITY_FRAMEWORK)
     , m_listeningForPreferenceChanges(false)
 #endif
 {
@@ -94,13 +94,13 @@
 
 CaptionUserPreferencesMac::~CaptionUserPreferencesMac()
 {
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+#if HAVE(MEDIA_ACCESSIBILITY_FRAMEWORK)
     if (kMAXCaptionAppearanceSettingsChangedNotification)
         CFNotificationCenterRemoveObserver(CFNotificationCenterGetLocalCenter(), this, kMAXCaptionAppearanceSettingsChangedNotification, NULL);
 #endif
 }
 
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+#if HAVE(MEDIA_ACCESSIBILITY_FRAMEWORK)
 bool CaptionUserPreferencesMac::userPrefersCaptions() const
 {
     if (testingMode() || !MediaAccessibilityLibrary())

Modified: trunk/Source/WebCore/page/PageGroup.cpp (144335 => 144336)


--- trunk/Source/WebCore/page/PageGroup.cpp	2013-02-28 19:33:48 UTC (rev 144335)
+++ trunk/Source/WebCore/page/PageGroup.cpp	2013-02-28 19:35:15 UTC (rev 144336)
@@ -39,7 +39,7 @@
 #include "StorageNamespace.h"
 
 #if ENABLE(VIDEO_TRACK)
-#if PLATFORM(MAC) && !PLATFORM(IOS)
+#if HAVE(MEDIA_ACCESSIBILITY_FRAMEWORK)
 #include "CaptionUserPreferencesMac.h"
 #else
 #include "CaptionUserPreferences.h"
@@ -420,7 +420,7 @@
 CaptionUserPreferences* PageGroup::captionPreferences()
 {
     if (!m_captionPreferences)
-#if PLATFORM(MAC) && !PLATFORM(IOS)
+#if HAVE(MEDIA_ACCESSIBILITY_FRAMEWORK)
         m_captionPreferences = CaptionUserPreferencesMac::create(this);
 #else
         m_captionPreferences = CaptionUserPreferences::create(this);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to