Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1108)

Unified Diff: Source/web/mac/WebSubstringUtil.mm

Issue 879533003: Remove Mac native font type members from FontPlatformData (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased TestExpectations Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/fonts/skia/FontCustomPlatformDataSkia.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/mac/WebSubstringUtil.mm
diff --git a/Source/web/mac/WebSubstringUtil.mm b/Source/web/mac/WebSubstringUtil.mm
index 07923b5b6d48ecf73133c7170c4cb49d53547b04..3a695c5a1c906381fc289d73e2a5225d4a46b3de 100644
--- a/Source/web/mac/WebSubstringUtil.mm
+++ b/Source/web/mac/WebSubstringUtil.mm
@@ -78,7 +78,9 @@ static NSAttributedString* attributedSubstringFromRange(const Range* range)
continue;
LayoutStyle* style = renderer->style();
- NSFont* font = style->font().primaryFont()->getNSFont();
+ const FontPlatformData& fontPlatformData = style->font().primaryFont()->platformData();
+ // Toll-free bridge types CTFont and NSFont.
+ NSFont* font = const_cast<NSFont*>(reinterpret_cast<const NSFont*>((fontPlatformData.ctFont())));
Ken Russell (switch to Gerrit) 2015/03/23 18:58:59 Can this use the toNSFont helper from platform/fon
// If the platform font can't be loaded, it's likely that the site is
// using a web font. For now, just use the default font instead.
// TODO(rsesek): Change the font activation flags to allow other processes
« no previous file with comments | « Source/platform/fonts/skia/FontCustomPlatformDataSkia.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698