Diff
Modified: trunk/Source/WebCore/ChangeLog (193511 => 193512)
--- trunk/Source/WebCore/ChangeLog 2015-12-05 07:11:16 UTC (rev 193511)
+++ trunk/Source/WebCore/ChangeLog 2015-12-05 07:55:41 UTC (rev 193512)
@@ -1,3 +1,26 @@
+2015-12-04 Myles C. Maxfield <[email protected]>
+
+ Remove CORETEXT_WEB_FONTS
+ https://bugs.webkit.org/show_bug.cgi?id=151891
+
+ Reviewed by Simon Fraser.
+
+ The only platform where this was turned off (Mavericks) is no longer supported.
+
+ No new tests because there is no behavior difference.
+
+ * platform/graphics/cocoa/FontCocoa.mm:
+ (WebCore::Font::platformCreateScaledFont): Deleted.
+ * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
+ (WebCore::FontPlatformData::registeredFont):
+ (WebCore::FontPlatformData::ctFont):
+ * platform/graphics/mac/FontCustomPlatformData.cpp:
+ (WebCore::FontCustomPlatformData::fontPlatformData): Deleted.
+ (WebCore::createFontCustomPlatformData): Deleted.
+ * platform/graphics/mac/FontCustomPlatformData.h:
+ (WebCore::FontCustomPlatformData::FontCustomPlatformData): Deleted.
+ * platform/text/TextFlags.h:
+
2015-12-04 Zalan Bujtas <[email protected]>
Garbage in page tiles when document is too long.
Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm (193511 => 193512)
--- trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm 2015-12-05 07:11:16 UTC (rev 193511)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm 2015-12-05 07:55:41 UTC (rev 193512)
@@ -283,14 +283,6 @@
RefPtr<Font> Font::platformCreateScaledFont(const FontDescription&, float scaleFactor) const
{
-#if !CORETEXT_WEB_FONTS
- if (isCustomFont()) {
- FontPlatformData scaledFontData(m_platformData);
- scaledFontData.m_size = scaledFontData.m_size * scaleFactor;
- return Font::create(scaledFontData, true, false);
- }
-#endif
-
float size = m_platformData.size() * scaleFactor;
#if USE(APPKIT)
Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm (193511 => 193512)
--- trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm 2015-12-05 07:11:16 UTC (rev 193511)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm 2015-12-05 07:55:41 UTC (rev 193512)
@@ -102,7 +102,7 @@
CTFontRef FontPlatformData::registeredFont() const
{
CTFontRef platformFont = font();
- ASSERT(!CORETEXT_WEB_FONTS || platformFont);
+ ASSERT(platformFont);
if (platformFont && adoptCF(CTFontCopyAttribute(platformFont, kCTFontURLAttribute)))
return platformFont;
return nullptr;
@@ -175,19 +175,13 @@
if (m_ctFont)
return m_ctFont.get();
- ASSERT(m_cgFont.get());
+ ASSERT(m_font);
+ ASSERT(m_cgFont);
m_ctFont = m_font;
- if (m_ctFont) {
- CTFontDescriptorRef fontDescriptor;
- RetainPtr<CFStringRef> postScriptName = adoptCF(CTFontCopyPostScriptName(m_ctFont.get()));
- fontDescriptor = cascadeToLastResortFontDescriptor();
- m_ctFont = adoptCF(CTFontCreateCopyWithAttributes(m_ctFont.get(), m_size, 0, fontDescriptor));
- } else {
-#if CORETEXT_WEB_FONTS
- ASSERT_NOT_REACHED();
-#endif
- m_ctFont = adoptCF(CTFontCreateWithGraphicsFont(m_cgFont.get(), m_size, 0, cascadeToLastResortFontDescriptor()));
- }
+ CTFontDescriptorRef fontDescriptor;
+ RetainPtr<CFStringRef> postScriptName = adoptCF(CTFontCopyPostScriptName(m_ctFont.get()));
+ fontDescriptor = cascadeToLastResortFontDescriptor();
+ m_ctFont = adoptCF(CTFontCreateCopyWithAttributes(m_ctFont.get(), m_size, 0, fontDescriptor));
if (m_widthVariant != RegularWidth) {
int featureTypeValue = kTextSpacingType;
Modified: trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp (193511 => 193512)
--- trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp 2015-12-05 07:11:16 UTC (rev 193511)
+++ trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp 2015-12-05 07:55:41 UTC (rev 193512)
@@ -39,38 +39,20 @@
int size = fontDescription.computedPixelSize();
FontOrientation orientation = fontDescription.orientation();
FontWidthVariant widthVariant = fontDescription.widthVariant();
-#if CORETEXT_WEB_FONTS
RetainPtr<CTFontRef> font = adoptCF(CTFontCreateWithFontDescriptor(m_fontDescriptor.get(), size, nullptr));
font = preparePlatformFont(font.get(), fontDescription.textRenderingMode(), &fontFaceFeatures, &fontFaceVariantSettings, fontDescription.featureSettings(), fontDescription.variantSettings());
return FontPlatformData(font.get(), size, bold, italic, orientation, widthVariant, fontDescription.textRenderingMode());
-#else
- UNUSED_PARAM(fontFaceFeatures);
- UNUSED_PARAM(fontFaceVariantSettings);
- return FontPlatformData(m_cgFont.get(), size, bold, italic, orientation, widthVariant, fontDescription.textRenderingMode());
-#endif
}
std::unique_ptr<FontCustomPlatformData> createFontCustomPlatformData(SharedBuffer& buffer)
{
RetainPtr<CFDataRef> bufferData = buffer.createCFData();
-#if CORETEXT_WEB_FONTS
RetainPtr<CTFontDescriptorRef> fontDescriptor = adoptCF(CTFontManagerCreateFontDescriptorFromData(bufferData.get()));
if (!fontDescriptor)
return nullptr;
return std::make_unique<FontCustomPlatformData>(fontDescriptor.get());
-
-#else
-
- RetainPtr<CGDataProviderRef> dataProvider = adoptCF(CGDataProviderCreateWithCFData(bufferData.get()));
-
- RetainPtr<CGFontRef> cgFontRef = adoptCF(CGFontCreateWithDataProvider(dataProvider.get()));
- if (!cgFontRef)
- return nullptr;
-
- return std::make_unique<FontCustomPlatformData>(cgFontRef.get());
-#endif
}
bool FontCustomPlatformData::supportsFormat(const String& format)
Modified: trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h (193511 => 193512)
--- trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h 2015-12-05 07:11:16 UTC (rev 193511)
+++ trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h 2015-12-05 07:55:41 UTC (rev 193512)
@@ -40,13 +40,8 @@
struct FontCustomPlatformData {
WTF_MAKE_NONCOPYABLE(FontCustomPlatformData);
public:
-#if CORETEXT_WEB_FONTS
explicit FontCustomPlatformData(CTFontDescriptorRef fontDescriptor)
: m_fontDescriptor(fontDescriptor)
-#else
- explicit FontCustomPlatformData(CGFontRef cgFont)
- : m_cgFont(cgFont)
-#endif
{
}
@@ -56,11 +51,7 @@
static bool supportsFormat(const String&);
-#if CORETEXT_WEB_FONTS
RetainPtr<CTFontDescriptorRef> m_fontDescriptor;
-#else
- RetainPtr<CGFontRef> m_cgFont;
-#endif
};
std::unique_ptr<FontCustomPlatformData> createFontCustomPlatformData(SharedBuffer&);
Modified: trunk/Source/WebCore/platform/text/TextFlags.h (193511 => 193512)
--- trunk/Source/WebCore/platform/text/TextFlags.h 2015-12-05 07:11:16 UTC (rev 193511)
+++ trunk/Source/WebCore/platform/text/TextFlags.h 2015-12-05 07:55:41 UTC (rev 193512)
@@ -26,15 +26,6 @@
#ifndef TextFlags_h
#define TextFlags_h
-// <rdar://problem/16980736>: Web fonts crash on certain OSes when using CTFontManagerCreateFontDescriptorFromData()
-// FIXME: When we have moved entirely to CORETEXT_WEB_FONTS, remove the isCustomFont member variable from Font, since it will no longer be used.
-// See https://bug-145873-attachments.webkit.org/attachment.cgi?id=254710
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101000
-#define CORETEXT_WEB_FONTS 0
-#else
-#define CORETEXT_WEB_FONTS 1
-#endif
-
namespace WebCore {
enum TextRenderingMode { AutoTextRendering, OptimizeSpeed, OptimizeLegibility, GeometricPrecision };