This bug begins using the CaptionUserPreferencesMediaAF class on the Apple Windows port: 1. Enable sources in the build for the Apple Windows port. 2. Modify some of the feature activation logic in WTF/wtf/Platform.h to use the Media Accessibility Framework if present. 3. Enable Video Tracking localized strings for the Windows port. This change should not modify any behavior, as the Windows port does not yet support In-Band Caption display.
Created attachment 205524 [details] Patch
<rdar://problem/14280545>
Comment on attachment 205524 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=205524&action=review > Source/WTF/wtf/Platform.h:957 > +#if (PLATFORM(MAC) || (OS(WINDOWS) && USE(CG))) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 > #define WTF_USE_AVFOUNDATION 1 > #endif Did you mean to include this in this patch? > Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp:139 > +SOFT_LINK_DLL_IMPORT(CoreText, CTFontDescriptorCopyAttribute, CFTypeRef, __cdecl, (CTFontDescriptorRef descriptor, CFStringRef attribute), (descriptor, attribute)); > +#define CTFontDescriptorCopyAttribute softLink_CTFontDescriptorCopyAttribute > + > +SOFT_LINK_VARIABLE_DLL_IMPORT(CoreText, kCTFontNameAttribute, CFStringRef) > +#define kCTFontNameAttribute get_kCTFontNameAttribute() > + Doesn't this need to be inside of "PLATFORM(WIN)"? > Source/WebCore/platform/LocalizedStrings.cpp:1055 > +#if USE(CF) Why "USE(CF)" instead of Mac and Windows explicitly? > Source/WebCore/platform/LocalizedStrings.h:246 > -#if PLATFORM(MAC) > +#if USE(CF) Ditto.
Comment on attachment 205524 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=205524&action=review >> Source/WTF/wtf/Platform.h:957 >> #endif > > Did you mean to include this in this patch? I'll remove it. We don't need this turned on for this patch. >> Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp:139 >> + > > Doesn't this need to be inside of "PLATFORM(WIN)"? It is -- the CoreText stuff is part of the same stanza as the soft-link for the MediaAccessibility library, which is conditionally compiled for Windows only. >> Source/WebCore/platform/LocalizedStrings.cpp:1055 >> +#if USE(CF) > > Why "USE(CF)" instead of Mac and Windows explicitly? Yeah -- that would probably be better. I'll change that. >> Source/WebCore/platform/LocalizedStrings.h:246 >> +#if USE(CF) > > Ditto. Ditto! :-)
Committed r152035: <http://trac.webkit.org/changeset/152035>