Title: [145127] trunk/Source/WebCore
Revision
145127
Author
eric.carl...@apple.com
Date
2013-03-07 13:27:42 -0800 (Thu, 07 Mar 2013)

Log Message

[Mac] allow iOS to use CaptionUserPreferencesMac
https://bugs.webkit.org/show_bug.cgi?id=111770

Reviewed by Dean Jackson.

No new tests, covered by existing tests.

* page/CaptionUserPreferencesMac.h:
* page/CaptionUserPreferencesMac.mm:
(WebCore::userCaptionPreferencesChangedNotificationCallback): Respond to notifications on
    the web thread.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (145126 => 145127)


--- trunk/Source/WebCore/ChangeLog	2013-03-07 21:24:18 UTC (rev 145126)
+++ trunk/Source/WebCore/ChangeLog	2013-03-07 21:27:42 UTC (rev 145127)
@@ -1,3 +1,17 @@
+2013-03-07  Eric Carlson  <eric.carl...@apple.com>
+
+        [Mac] allow iOS to use CaptionUserPreferencesMac
+        https://bugs.webkit.org/show_bug.cgi?id=111770
+
+        Reviewed by Dean Jackson.
+
+        No new tests, covered by existing tests.
+
+        * page/CaptionUserPreferencesMac.h:
+        * page/CaptionUserPreferencesMac.mm:
+        (WebCore::userCaptionPreferencesChangedNotificationCallback): Respond to notifications on
+            the web thread.
+
 2013-03-07  Mike West  <mk...@chromium.org>
 
         Move side-effects on hover/active state out of hit-testing

Modified: trunk/Source/WebCore/page/CaptionUserPreferencesMac.h (145126 => 145127)


--- trunk/Source/WebCore/page/CaptionUserPreferencesMac.h	2013-03-07 21:24:18 UTC (rev 145126)
+++ trunk/Source/WebCore/page/CaptionUserPreferencesMac.h	2013-03-07 21:27:42 UTC (rev 145127)
@@ -26,7 +26,7 @@
 #ifndef CaptionUserPreferencesMac_h
 #define CaptionUserPreferencesMac_h
 
-#if ENABLE(VIDEO_TRACK) && !PLATFORM(IOS)
+#if ENABLE(VIDEO_TRACK)
 
 #include "CSSPropertyNames.h"
 #include "CaptionUserPreferences.h"

Modified: trunk/Source/WebCore/page/CaptionUserPreferencesMac.mm (145126 => 145127)


--- trunk/Source/WebCore/page/CaptionUserPreferencesMac.mm	2013-03-07 21:24:18 UTC (rev 145126)
+++ trunk/Source/WebCore/page/CaptionUserPreferencesMac.mm	2013-03-07 21:27:42 UTC (rev 145127)
@@ -25,7 +25,7 @@
 
 #import "config.h"
 
-#if ENABLE(VIDEO_TRACK) && !PLATFORM(IOS)
+#if ENABLE(VIDEO_TRACK)
 
 #import "CaptionUserPreferencesMac.h"
 
@@ -45,6 +45,10 @@
 #import <wtf/RetainPtr.h>
 #import <wtf/text/StringBuilder.h>
 
+#if PLATFORM(IOS)
+#import "WebCoreThreadRun.h"
+#endif
+
 #if HAVE(MEDIA_ACCESSIBILITY_FRAMEWORK)
 #import "MediaAccessibility/MediaAccessibility.h"
 #endif
@@ -80,7 +84,13 @@
 #if HAVE(MEDIA_ACCESSIBILITY_FRAMEWORK)
 static void userCaptionPreferencesChangedNotificationCallback(CFNotificationCenterRef, void* observer, CFStringRef, const void *, CFDictionaryRef)
 {
+#if !PLATFORM(IOS)
     static_cast<CaptionUserPreferencesMac*>(observer)->captionPreferencesChanged();
+#else
+    WebThreadRun(^{
+        static_cast<CaptionUserPreferencesMac*>(observer)->captionPreferencesChanged();
+    });
+#endif
 }
 #endif
 
@@ -527,4 +537,4 @@
 
 }
 
-#endif // ENABLE(VIDEO_TRACK) && !PLATFORM(IOS)
+#endif // ENABLE(VIDEO_TRACK)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to