Commit a5c12661 authored by eric.carlson@apple.com's avatar eric.carlson@apple.com
Browse files

[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.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145127 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent dc030f2c
2013-03-07 Eric Carlson <eric.carlson@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 <mkwst@chromium.org>
 
Move side-effects on hover/active state out of hit-testing
......@@ -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"
......
......@@ -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 @@ namespace WebCore {
#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 @@ String CaptionUserPreferencesMac::displayNameForTrack(TextTrack* track) const
}
#endif // ENABLE(VIDEO_TRACK) && !PLATFORM(IOS)
#endif // ENABLE(VIDEO_TRACK)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment