Title: [161726] trunk/Source/WebCore
- Revision
- 161726
- Author
- joep...@webkit.org
- Date
- 2014-01-10 20:31:53 -0800 (Fri, 10 Jan 2014)
Log Message
Fix WebAccessibilityObjectWrapperIOS.o for iOS. Unreviewed build fix.
The upstreamed WebAccessibilityObjectWrapperIOS.mm was out of date, e.g.
it was using GSFonts. Just upstream a newer version of the file. Also
explicitly namespace qualify std::pair.
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(AXAttributeStringSetStyle):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (161725 => 161726)
--- trunk/Source/WebCore/ChangeLog 2014-01-11 04:26:14 UTC (rev 161725)
+++ trunk/Source/WebCore/ChangeLog 2014-01-11 04:31:53 UTC (rev 161726)
@@ -1,3 +1,14 @@
+2014-01-10 Joseph Pecoraro <pecor...@apple.com>
+
+ Fix WebAccessibilityObjectWrapperIOS.o for iOS. Unreviewed build fix.
+
+ The upstreamed WebAccessibilityObjectWrapperIOS.mm was out of date, e.g.
+ it was using GSFonts. Just upstream a newer version of the file. Also
+ explicitly namespace qualify std::pair.
+
+ * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+ (AXAttributeStringSetStyle):
+
2014-01-10 Jinwoo Song <jinwoo7.s...@samsung.com>
Remove willRespondToTouchEvents() which was used by chromium port
Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (161725 => 161726)
--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm 2014-01-11 04:26:14 UTC (rev 161725)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm 2014-01-11 04:31:53 UTC (rev 161726)
@@ -52,7 +52,7 @@
#import "WebCoreThread.h"
#import "VisibleUnits.h"
-#import <GraphicsServices/GraphicsServices.h>
+#import <CoreText/CoreText.h>
@interface NSObject (AccessibilityPrivate)
- (void)_accessibilityUnregister;
@@ -770,7 +770,7 @@
if (!cell)
return 0;
- return toAccessibilityTableCell(cell);
+ return static_cast<AccessibilityTableCell*>(cell);
}
- (AccessibilityTable*)tableParent
@@ -783,7 +783,7 @@
if (!parentTable)
return 0;
- return toAccessibilityTable(parentTable);
+ return static_cast<AccessibilityTable*>(parentTable);
}
- (id)accessibilityTitleElement
@@ -1479,25 +1479,26 @@
[attrString removeAttribute:UIAccessibilityTokenHeadingLevel range:range];
}
-static void AXAttributeStringSetFont(NSMutableAttributedString* attrString, GSFontRef font, NSRange range)
+static void AXAttributeStringSetFont(NSMutableAttributedString* attrString, CTFontRef font, NSRange range)
{
if (!font)
return;
- const char* nameCStr = GSFontGetFullName(font);
- const char* familyCStr = GSFontGetFamilyName(font);
- NSNumber* size = [NSNumber numberWithFloat:GSFontGetSize(font)];
- NSNumber* bold = [NSNumber numberWithBool:GSFontIsBold(font)];
- GSFontTraitMask traits = GSFontGetTraits(font);
- if (nameCStr)
- [attrString addAttribute:UIAccessibilityTokenFontName value:[NSString stringWithUTF8String:nameCStr] range:range];
- if (familyCStr)
- [attrString addAttribute:UIAccessibilityTokenFontFamily value:[NSString stringWithUTF8String:familyCStr] range:range];
+ RetainPtr<CFStringRef> fullName = adoptCF(CTFontCopyFullName(font));
+ RetainPtr<CFStringRef> familyName = adoptCF(CTFontCopyFamilyName(font));
+
+ NSNumber* size = [NSNumber numberWithFloat:CTFontGetSize(font)];
+ CTFontSymbolicTraits traits = CTFontGetSymbolicTraits(font);
+ NSNumber* bold = [NSNumber numberWithBool:(traits & kCTFontTraitBold)];
+ if (fullName)
+ [attrString addAttribute:UIAccessibilityTokenFontName value:(NSString*)fullName.get() range:range];
+ if (familyName)
+ [attrString addAttribute:UIAccessibilityTokenFontFamily value:(NSString*)familyName.get() range:range];
if ([size boolValue])
[attrString addAttribute:UIAccessibilityTokenFontSize value:size range:range];
- if ([bold boolValue] || (traits & GSBoldFontMask))
+ if ([bold boolValue] || (traits & kCTFontTraitBold))
[attrString addAttribute:UIAccessibilityTokenBold value:[NSNumber numberWithBool:YES] range:range];
- if (traits & GSItalicFontMask)
+ if (traits & kCTFontTraitItalic)
[attrString addAttribute:UIAccessibilityTokenItalic value:[NSNumber numberWithBool:YES] range:range];
}
@@ -1512,12 +1513,12 @@
static void AXAttributeStringSetStyle(NSMutableAttributedString* attrString, RenderObject* renderer, NSRange range)
{
- RenderStyle* style = renderer->style();
+ RenderStyle& style = renderer->style();
// set basic font info
- AXAttributeStringSetFont(attrString, style->font().primaryFont()->getGSFont(), range);
+ AXAttributeStringSetFont(attrString, style.font().primaryFont()->getCTFont(), range);
- int decor = style->textDecorationsInEffect();
+ int decor = style.textDecorationsInEffect();
if ((decor & (TextDecorationUnderline | TextDecorationLineThrough)) != 0) {
// find colors using quirk mode approach (strict mode would use current
// color for all but the root line box, which would use getTextDecorationColors)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes