Bug 118076 - [Windows] Enable CaptionUserPreferencesMediaAF on Windows
Summary: [Windows] Enable CaptionUserPreferencesMediaAF on Windows
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-06-26 13:42 PDT by Brent Fulgham
Modified: 2013-06-26 15:03 PDT (History)
7 users (show)

See Also:


Attachments
Patch (6.33 KB, patch)
2013-06-26 13:47 PDT, Brent Fulgham
eric.carlson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2013-06-26 13:42:42 PDT
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.
Comment 1 Brent Fulgham 2013-06-26 13:47:53 PDT
Created attachment 205524 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2013-06-26 13:51:46 PDT
<rdar://problem/14280545>
Comment 3 Eric Carlson 2013-06-26 14:33:26 PDT
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 4 Brent Fulgham 2013-06-26 14:50:32 PDT
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!  :-)
Comment 5 Brent Fulgham 2013-06-26 15:03:16 PDT
Committed r152035: <http://trac.webkit.org/changeset/152035>