| Index: ui/gfx/render_text_mac.mm
|
| diff --git a/ui/gfx/render_text_mac.mm b/ui/gfx/render_text_mac.mm
|
| index 584f08d49ea2e2ef6fba1ec6cd999b19c74a3f31..db1cbeb05494685f956ac7dd87b48ff606a1984b 100644
|
| --- a/ui/gfx/render_text_mac.mm
|
| +++ b/ui/gfx/render_text_mac.mm
|
| @@ -372,7 +372,7 @@ void RenderTextMac::ComputeRuns() {
|
| const CFRange empty_cf_range = CFRangeMake(0, 0);
|
| for (CFIndex i = 0; i < ct_runs_count; ++i) {
|
| CTRunRef ct_run =
|
| - base::mac::CFCast<CTRunRef>(CFArrayGetValueAtIndex(ct_runs, i));
|
| + base::mac::CFStaticCast<CTRunRef>(CFArrayGetValueAtIndex(ct_runs, i));
|
| const size_t glyph_count = CTRunGetGlyphCount(ct_run);
|
| const double run_width =
|
| CTRunGetTypographicBounds(ct_run, empty_cf_range, NULL, NULL, NULL);
|
| @@ -414,19 +414,18 @@ void RenderTextMac::ComputeRuns() {
|
| // TODO(asvitkine): Style boundaries are not necessarily per-run. Handle
|
| // this better. Also, support strike and diagonal_strike.
|
| CFDictionaryRef attributes = CTRunGetAttributes(ct_run);
|
| - CTFontRef ct_font = base::mac::GetValueFromDictionary<CTFontRef>(
|
| - attributes, kCTFontAttributeName);
|
| + CTFontRef ct_font = base::mac::CFStaticCast<CTFontRef>(
|
| + CFDictionaryGetValue(attributes, kCTFontAttributeName));
|
| run->ct_font.reset(ct_font, base::scoped_policy::RETAIN);
|
| run->typeface.reset(SkCreateTypefaceFromCTFont(ct_font));
|
|
|
| - const CGColorRef foreground = base::mac::GetValueFromDictionary<CGColorRef>(
|
| - attributes, kCTForegroundColorAttributeName);
|
| + const CGColorRef foreground = base::mac::CFStaticCast<CGColorRef>(
|
| + CFDictionaryGetValue(attributes, kCTForegroundColorAttributeName));
|
| if (foreground)
|
| run->foreground = skia::CGColorRefToSkColor(foreground);
|
|
|
| - const CFNumberRef underline =
|
| - base::mac::GetValueFromDictionary<CFNumberRef>(
|
| - attributes, kCTUnderlineStyleAttributeName);
|
| + const CFNumberRef underline = base::mac::CFStaticCast<CFNumberRef>(
|
| + CFDictionaryGetValue(attributes, kCTUnderlineStyleAttributeName));
|
| CTUnderlineStyle value = kCTUnderlineStyleNone;
|
| if (underline && CFNumberGetValue(underline, kCFNumberSInt32Type, &value))
|
| run->underline = (value == kCTUnderlineStyleSingle);
|
|
|