Changeset 215175 in webkit
- Timestamp:
- Apr 10, 2017 3:01:46 AM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r215173 r215175 1 2017-04-10 Per Arne Vollan <pvollan@apple.com> 2 3 Add fallback fonts to video captions stylesheet. 4 https://bugs.webkit.org/show_bug.cgi?id=170495 5 6 Reviewed by Myles C. Maxfield. 7 8 The kCTFontCascadeListAttribute key is used to obtain the cascade list for a font reference. 9 10 I have not added a test, since CaptionUserPreferences::testingMode() returns true when running tests, 11 preventing this code path from being executed. 12 13 * page/CaptionUserPreferencesMediaAF.cpp: 14 (WebCore::CaptionUserPreferencesMediaAF::captionsDefaultFontCSS): 15 1 16 2017-04-10 Chris Dumez <cdumez@apple.com> 2 17 -
trunk/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp
r215160 r215175 84 84 SOFT_LINK_AVF_POINTER(CoreText, kCTFontNameAttribute, CFStringRef) 85 85 #define kCTFontNameAttribute getkCTFontNameAttribute() 86 SOFT_LINK_AVF_POINTER(CoreText, kCTFontCascadeListAttribute, CFStringRef) 87 #define kCTFontCascadeListAttribute getkCTFontCascadeListAttribute() 86 88 87 89 #define CTFontDescriptorCopyAttribute softLink_CTFontDescriptorCopyAttribute … … 425 427 if (!name) 426 428 return emptyString(); 427 429 428 430 StringBuilder builder; 429 431 … … 432 434 builder.append(static_cast<CFStringRef>(name.get())); 433 435 builder.append('"'); 436 437 auto cascadeList = adoptCF(static_cast<CFArrayRef>(CTFontDescriptorCopyAttribute(font.get(), kCTFontCascadeListAttribute))); 438 439 for (CFIndex i = 0; i < CFArrayGetCount(cascadeList.get()); i++) { 440 auto fontCascade = static_cast<CTFontDescriptorRef>(CFArrayGetValueAtIndex(cascadeList.get(), i)); 441 auto fontCascadeName = adoptCF(CTFontDescriptorCopyAttribute(fontCascade, kCTFontNameAttribute)); 442 builder.append(", \""); 443 builder.append(static_cast<CFStringRef>(fontCascadeName.get())); 444 builder.append('"'); 445 } 446 434 447 if (behavior == kMACaptionAppearanceBehaviorUseValue) 435 448 builder.appendLiteral(" !important");
Note: See TracChangeset
for help on using the changeset viewer.