Diff
Modified: trunk/Source/WebCore/ChangeLog (180280 => 180281)
--- trunk/Source/WebCore/ChangeLog 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebCore/ChangeLog 2015-02-18 20:05:11 UTC (rev 180281)
@@ -1,3 +1,13 @@
+2015-02-18 Chris Dumez <cdu...@apple.com>
+
+ Access FontCache global instance via singleton() static member function
+ https://bugs.webkit.org/show_bug.cgi?id=141726
+
+ Reviewed by Daniel Bates.
+
+ Access FontCache global instance via singleton() static member function,
+ as per coding style.
+
2015-02-18 Alexey Proskuryakov <a...@apple.com>
Crashes under IDBDatabase::closeConnection.
Modified: trunk/Source/WebCore/css/CSSFontFaceSource.cpp (180280 => 180281)
--- trunk/Source/WebCore/css/CSSFontFaceSource.cpp 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebCore/css/CSSFontFaceSource.cpp 2015-02-18 20:05:11 UTC (rev 180281)
@@ -105,7 +105,7 @@
{
// If the font hasn't loaded or an error occurred, then we've got nothing.
if (!isValid())
- return 0;
+ return nullptr;
if (!m_font
#if ENABLE(SVG_FONTS)
@@ -114,7 +114,7 @@
) {
// We're local. Just return a Font from the normal cache.
// We don't want to check alternate font family names here, so pass true as the checkingAlternateName parameter.
- return fontCache().fontForFamily(fontDescription, m_string, true);
+ return FontCache::singleton().fontForFamily(fontDescription, m_string, true);
}
unsigned hashKey = (fontDescription.computedPixelSize() + 1) << 5 | fontDescription.widthVariant() << 3
@@ -163,7 +163,7 @@
// and the loader may invoke arbitrary delegate or event handler code.
fontSelector->beginLoadingFontSoon(m_font.get());
- Ref<Font> placeholderFont = fontCache().lastResortFallbackFont(fontDescription);
+ Ref<Font> placeholderFont = FontCache::singleton().lastResortFallbackFont(fontDescription);
Ref<Font> placeholderFontCopyInLoadingState = Font::create(placeholderFont->platformData(), true, true);
return WTF::move(placeholderFontCopyInLoadingState);
}
Modified: trunk/Source/WebCore/css/CSSFontSelector.cpp (180280 => 180281)
--- trunk/Source/WebCore/css/CSSFontSelector.cpp 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebCore/css/CSSFontSelector.cpp 2015-02-18 20:05:11 UTC (rev 180281)
@@ -70,13 +70,13 @@
// seem to be any such guarantee.
ASSERT(m_document);
- fontCache().addClient(this);
+ FontCache::singleton().addClient(this);
}
CSSFontSelector::~CSSFontSelector()
{
clearDocument();
- fontCache().removeClient(this);
+ FontCache::singleton().removeClient(this);
}
bool CSSFontSelector::isEmpty() const
@@ -299,7 +299,7 @@
ASSERT(!m_locallyInstalledFontFaces.contains(familyName));
Vector<unsigned> locallyInstalledFontsTraitsMasks;
- fontCache().getTraitsInFamily(familyName, locallyInstalledFontsTraitsMasks);
+ FontCache::singleton().getTraitsInFamily(familyName, locallyInstalledFontsTraitsMasks);
if (unsigned numLocallyInstalledFaces = locallyInstalledFontsTraitsMasks.size()) {
auto familyLocallyInstalledFaces = std::make_unique<Vector<RefPtr<CSSFontFace>>>();
@@ -468,7 +468,7 @@
if (!face) {
if (!resolveGenericFamilyFirst)
familyForLookup = resolveGenericFamily(m_document, fontDescription, familyName);
- return FontRanges(fontCache().fontForFamily(fontDescription, familyForLookup));
+ return FontRanges(FontCache::singleton().fontForFamily(fontDescription, familyForLookup));
}
return face->fontRanges(fontDescription);
@@ -617,13 +617,13 @@
ASSERT_UNUSED(index, !index);
if (!m_document)
- return 0;
+ return nullptr;
Settings* settings = m_document->settings();
if (!settings || !settings->fontFallbackPrefersPictographs())
- return 0;
+ return nullptr;
- return fontCache().fontForFamily(fontDescription, settings->pictographFontFamily());
+ return FontCache::singleton().fontForFamily(fontDescription, settings->pictographFontFamily());
}
}
Modified: trunk/Source/WebCore/platform/MemoryPressureHandler.cpp (180280 => 180281)
--- trunk/Source/WebCore/platform/MemoryPressureHandler.cpp 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebCore/platform/MemoryPressureHandler.cpp 2015-02-18 20:05:11 UTC (rev 180281)
@@ -76,7 +76,7 @@
{
{
ReliefLogger log("Purge inactive FontData");
- fontCache().purgeInactiveFontData();
+ FontCache::singleton().purgeInactiveFontData();
}
{
Modified: trunk/Source/WebCore/platform/graphics/Font.cpp (180280 => 180281)
--- trunk/Source/WebCore/platform/graphics/Font.cpp 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebCore/platform/graphics/Font.cpp 2015-02-18 20:05:11 UTC (rev 180281)
@@ -428,7 +428,7 @@
codeUnitsLength = 2;
}
- fallbackFont = fontCache().systemFallbackForCharacters(description, this, isForPlatformFont, codeUnits, codeUnitsLength).get();
+ fallbackFont = FontCache::singleton().systemFallbackForCharacters(description, this, isForPlatformFont, codeUnits, codeUnitsLength).get();
if (fallbackFont)
fallbackFont->m_isUsedInSystemFallbackCache = true;
}
Modified: trunk/Source/WebCore/platform/graphics/FontCache.cpp (180280 => 180281)
--- trunk/Source/WebCore/platform/graphics/FontCache.cpp 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebCore/platform/graphics/FontCache.cpp 2015-02-18 20:05:11 UTC (rev 180281)
@@ -86,7 +86,7 @@
namespace WebCore {
-FontCache& fontCache()
+FontCache& FontCache::singleton()
{
static NeverDestroyed<FontCache> globalFontCache;
return globalFontCache;
Modified: trunk/Source/WebCore/platform/graphics/FontCache.h (180280 => 180281)
--- trunk/Source/WebCore/platform/graphics/FontCache.h 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebCore/platform/graphics/FontCache.h 2015-02-18 20:05:11 UTC (rev 180281)
@@ -107,7 +107,7 @@
WTF_MAKE_NONCOPYABLE(FontCache); WTF_MAKE_FAST_ALLOCATED;
public:
- friend FontCache& fontCache();
+ WEBCORE_EXPORT static FontCache& singleton();
// This method is implemented by the platform.
RefPtr<Font> systemFallbackForCharacters(const FontDescription&, const Font* originalFontData, bool isPlatformFont, const UChar* characters, int length);
@@ -153,7 +153,7 @@
private:
FontCache();
- ~FontCache();
+ ~FontCache() = delete;
void purgeTimerFired();
@@ -177,9 +177,6 @@
friend class Font;
};
-// Get the global fontCache.
-WEBCORE_EXPORT FontCache& fontCache();
-
}
#endif
Modified: trunk/Source/WebCore/platform/graphics/FontGlyphs.cpp (180280 => 180281)
--- trunk/Source/WebCore/platform/graphics/FontGlyphs.cpp 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebCore/platform/graphics/FontGlyphs.cpp 2015-02-18 20:05:11 UTC (rev 180281)
@@ -37,21 +37,20 @@
FontGlyphs::FontGlyphs(PassRefPtr<FontSelector> fontSelector)
- : m_cachedPrimaryFont(0)
+ : m_cachedPrimaryFont(nullptr)
, m_fontSelector(fontSelector)
, m_fontSelectorVersion(m_fontSelector ? m_fontSelector->version() : 0)
- , m_generation(fontCache().generation())
+ , m_generation(FontCache::singleton().generation())
{
}
FontGlyphs::FontGlyphs(const FontPlatformData& platformData)
- : m_cachedPrimaryFont(0)
- , m_fontSelector(0)
+ : m_cachedPrimaryFont(nullptr)
, m_fontSelectorVersion(0)
- , m_generation(fontCache().generation())
+ , m_generation(FontCache::singleton().generation())
, m_isForPlatformFont(true)
{
- m_realizedFallbackRanges.append(FontRanges(fontCache().fontForPlatformData(platformData)));
+ m_realizedFallbackRanges.append(FontRanges(FontCache::singleton().fontForPlatformData(platformData)));
}
FontGlyphs::~FontGlyphs()
@@ -81,6 +80,7 @@
{
ASSERT(index < description.familyCount());
+ auto& fontCache = FontCache::singleton();
while (index < description.familyCount()) {
const AtomicString& family = description.familyAt(index++);
if (family.isEmpty())
@@ -90,13 +90,13 @@
if (!ranges.isNull())
return ranges;
}
- if (auto font = fontCache().fontForFamily(description, family))
+ if (auto font = fontCache.fontForFamily(description, family))
return FontRanges(WTF::move(font));
}
// We didn't find a font. Try to find a similar font using our own specific knowledge about our platform.
// For example on OS X, we know to map any families containing the words Arabic, Pashto, or Urdu to the
// Geeza Pro font.
- return FontRanges(fontCache().similarFont(description));
+ return FontRanges(fontCache.similarFont(description));
}
const FontRanges& FontGlyphs::realizeFallbackRangesAt(const FontDescription& description, unsigned index)
@@ -105,7 +105,7 @@
return m_realizedFallbackRanges[index];
ASSERT(index == m_realizedFallbackRanges.size());
- ASSERT(fontCache().generation() == m_generation);
+ ASSERT(FontCache::singleton().generation() == m_generation);
m_realizedFallbackRanges.append(FontRanges());
auto& fontRanges = m_realizedFallbackRanges.last();
@@ -115,7 +115,7 @@
if (fontRanges.isNull() && m_fontSelector)
fontRanges = m_fontSelector->fontRangesForFamily(description, standardFamily);
if (fontRanges.isNull())
- fontRanges = FontRanges(fontCache().lastResortFallbackFont(description));
+ fontRanges = FontRanges(FontCache::singleton().lastResortFallbackFont(description));
return fontRanges;
}
Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm (180280 => 180281)
--- trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm 2015-02-18 20:05:11 UTC (rev 180281)
@@ -339,11 +339,11 @@
scaledFontData.m_syntheticBold = (fontTraits & NSBoldFontMask) && !(scaledFontTraits & NSBoldFontMask);
scaledFontData.m_syntheticOblique = (fontTraits & NSItalicFontMask) && !(scaledFontTraits & NSItalicFontMask);
- return fontCache().fontForPlatformData(scaledFontData);
+ return FontCache::singleton().fontForPlatformData(scaledFontData);
}
END_BLOCK_OBJC_EXCEPTIONS;
- return 0;
+ return nullptr;
#else
CTFontSymbolicTraits fontTraits = CTFontGetSymbolicTraits(m_platformData.font());
RetainPtr<CTFontDescriptorRef> fontDescriptor = adoptCF(CTFontCopyFontDescriptor(m_platformData.font()));
@@ -360,7 +360,7 @@
scaledFontData.m_syntheticBold = (fontTraits & kCTFontBoldTrait) && !(scaledFontTraits & kCTFontTraitBold);
scaledFontData.m_syntheticOblique = (fontTraits & kCTFontItalicTrait) && !(scaledFontTraits & kCTFontTraitItalic);
- return fontCache().fontForPlatformData(scaledFontData);
+ return FontCache::singleton().fontForPlatformData(scaledFontData);
}
return nullptr;
Modified: trunk/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp (180280 => 180281)
--- trunk/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp 2015-02-18 20:05:11 UTC (rev 180281)
@@ -346,29 +346,29 @@
PassRefPtr<OpenTypeVerticalData> FontPlatformData::verticalData() const
{
ASSERT(hash());
- return fontCache().getVerticalData(String::number(hash()), *this);
+ return FontCache::singleton().getVerticalData(String::number(hash()), *this);
}
PassRefPtr<SharedBuffer> FontPlatformData::openTypeTable(uint32_t table) const
{
FT_Face freeTypeFace = cairo_ft_scaled_font_lock_face(m_scaledFont);
if (!freeTypeFace)
- return 0;
+ return nullptr;
FT_ULong tableSize = 0;
// Tag bytes need to be reversed because OT_MAKE_TAG uses big-endian order.
uint32_t tag = FT_MAKE_TAG((table & 0xff), (table & 0xff00) >> 8, (table & 0xff0000) >> 16, table >> 24);
if (FT_Load_Sfnt_Table(freeTypeFace, tag, 0, 0, &tableSize))
- return 0;
+ return nullptr;
RefPtr<SharedBuffer> buffer = SharedBuffer::create(tableSize);
FT_ULong expectedTableSize = tableSize;
if (buffer->size() != tableSize)
- return 0;
+ return nullptr;
FT_Error error = FT_Load_Sfnt_Table(freeTypeFace, tag, 0, reinterpret_cast<FT_Byte*>(const_cast<char*>(buffer->data())), &tableSize);
if (error || tableSize != expectedTableSize)
- return 0;
+ return nullptr;
cairo_ft_scaled_font_unlock_face(m_scaledFont);
Modified: trunk/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm (180280 => 180281)
--- trunk/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm 2015-02-18 20:05:11 UTC (rev 180281)
@@ -275,13 +275,14 @@
m_complexTextRuns.append(ComplexTextRun::create(m_font.primaryFont(), cp, stringLocation + runRange.location, runRange.length, m_run.ltr()));
continue;
}
- runFont = fontCache().fontForFamily(m_font.fontDescription(), fontName.get(), false).get();
+ auto& fontCache = FontCache::singleton();
+ runFont = fontCache.fontForFamily(m_font.fontDescription(), fontName.get(), false).get();
#if !PLATFORM(IOS)
// Core Text may have used a font that is not known to NSFontManager. In that case, fall back on
// using the font as returned, even though it may not have the best NSFontRenderingMode.
if (!runFont) {
FontPlatformData runFontPlatformData((NSFont *)runCTFont, CTFontGetSize(runCTFont));
- runFont = &fontCache().fontForPlatformData(runFontPlatformData).get();
+ runFont = fontCache.fontForPlatformData(runFontPlatformData).ptr();
}
#else
// FIXME: Just assert for now, until we can devise a better fix that works with iOS.
Modified: trunk/Source/WebCore/platform/graphics/mac/FontCacheMac.mm (180280 => 180281)
--- trunk/Source/WebCore/platform/graphics/mac/FontCacheMac.mm 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebCore/platform/graphics/mac/FontCacheMac.mm 2015-02-18 20:05:11 UTC (rev 180281)
@@ -275,16 +275,16 @@
static void invalidateFontCache(void*)
{
if (!isMainThread()) {
- callOnMainThread(&invalidateFontCache, 0);
+ callOnMainThread(&invalidateFontCache, nullptr);
return;
}
- fontCache().invalidate();
+ FontCache::singleton().invalidate();
[desiredFamilyToAvailableFamilyDictionary() removeAllObjects];
}
static void fontCacheRegisteredFontsChangedNotificationCallback(CFNotificationCenterRef, void* observer, CFStringRef name, const void *, CFDictionaryRef)
{
- ASSERT_UNUSED(observer, observer == &fontCache());
+ ASSERT_UNUSED(observer, observer == &FontCache::singleton());
ASSERT_UNUSED(name, CFEqual(name, kCTFontManagerRegisteredFontsChangedNotification));
invalidateFontCache(0);
}
Modified: trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp (180280 => 180281)
--- trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp 2015-02-18 20:05:11 UTC (rev 180281)
@@ -149,7 +149,7 @@
static bool initialized;
if (!initialized) {
initialized = true;
- IMLangFontLinkType* langFontLink = fontCache().getFontLinkInterface();
+ IMLangFontLinkType* langFontLink = FontCache::singleton().getFontLinkInterface();
if (!langFontLink)
return codePageMasks;
Modified: trunk/Source/WebCore/testing/Internals.cpp (180280 => 180281)
--- trunk/Source/WebCore/testing/Internals.cpp 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebCore/testing/Internals.cpp 2015-02-18 20:05:11 UTC (rev 180281)
@@ -884,7 +884,7 @@
void Internals::invalidateFontCache()
{
- fontCache().invalidate();
+ FontCache::singleton().invalidate();
}
void Internals::setScrollViewPosition(long x, long y, ExceptionCode& ec)
Modified: trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in (180280 => 180281)
--- trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in 2015-02-18 20:05:11 UTC (rev 180281)
@@ -390,7 +390,7 @@
symbolWithPointer(?create@BitmapInfo@WebCore@@SA?AU12@ABVIntSize@2@W4BitCount@12@@Z, ?create@BitmapInfo@WebCore@@SA?AU12@AEBVIntSize@2@W4BitCount@12@@Z)
symbolWithPointer(?drawPattern@Image@WebCore@@UAEXPAVGraphicsContext@2@ABVFloatRect@2@ABVAffineTransform@2@ABVFloatPoint@2@W4ColorSpace@2@W4CompositeOperator@2@1W4BlendMode@2@@Z, ?drawPattern@Image@WebCore@@UEAAXPEAVGraphicsContext@2@AEBVFloatRect@2@AEBVAffineTransform@2@AEBVFloatPoint@2@W4ColorSpace@2@W4CompositeOperator@2@1W4BlendMode@2@@Z)
symbolWithPointer(?drawFrameMatchingSourceSize@BitmapImage@WebCore@@MAEXPAVGraphicsContext@2@ABVFloatRect@2@ABVIntSize@2@W4ColorSpace@2@W4CompositeOperator@2@@Z, ?drawFrameMatchingSourceSize@BitmapImage@WebCore@@MEAAXPEAVGraphicsContext@2@AEBVFloatRect@2@AEBVIntSize@2@W4ColorSpace@2@W4CompositeOperator@2@@Z)
- symbolWithPointer(?fontCache@WebCore@@YAAAVFontCache@1@XZ, ?fontCache@WebCore@@YAAEAVFontCache@1@XZ)
+ symbolWithPointer(?singleton@FontCache@WebCore@@SAAAV12@XZ, ?singleton@FontCache@WebCore@@SAAAV12@XZ)
symbolWithPointer(?invalidate@FontCache@WebCore@@QAEXXZ, ?invalidate@FontCache@WebCore@@QEAAXXZ)
symbolWithPointer(?mayFillWithSolidColor@BitmapImage@WebCore@@MAE_NXZ, ?mayFillWithSolidColor@BitmapImage@WebCore@@MEAA_NXZ)
symbolWithPointer(?solidColor@BitmapImage@WebCore@@MBE?AVColor@2@XZ, ?solidColor@BitmapImage@WebCore@@MEBA?AVColor@2@XZ)
Modified: trunk/Source/WebKit/mac/ChangeLog (180280 => 180281)
--- trunk/Source/WebKit/mac/ChangeLog 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebKit/mac/ChangeLog 2015-02-18 20:05:11 UTC (rev 180281)
@@ -1,3 +1,13 @@
+2015-02-18 Chris Dumez <cdu...@apple.com>
+
+ Access FontCache global instance via singleton() static member function
+ https://bugs.webkit.org/show_bug.cgi?id=141726
+
+ Reviewed by Daniel Bates.
+
+ Access FontCache global instance via singleton() static member function,
+ as per coding style.
+
2015-02-17 Chris Dumez <cdu...@apple.com>
Access MemoryPressureHandler global instance via a singleton() static member function
Modified: trunk/Source/WebKit/mac/Misc/WebCoreStatistics.mm (180280 => 180281)
--- trunk/Source/WebKit/mac/Misc/WebCoreStatistics.mm 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebKit/mac/Misc/WebCoreStatistics.mm 2015-02-18 20:05:11 UTC (rev 180281)
@@ -147,17 +147,17 @@
+ (size_t)cachedFontDataCount
{
- return fontCache().fontCount();
+ return FontCache::singleton().fontCount();
}
+ (size_t)cachedFontDataInactiveCount
{
- return fontCache().inactiveFontCount();
+ return FontCache::singleton().inactiveFontCount();
}
+ (void)purgeInactiveFontData
{
- fontCache().purgeInactiveFontData();
+ FontCache::singleton().purgeInactiveFontData();
}
+ (size_t)glyphPageCount
Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (180280 => 180281)
--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm 2015-02-18 20:05:11 UTC (rev 180281)
@@ -4875,7 +4875,7 @@
fontDescription.setIsItalic(italic);
fontDescription.setWeight(bold ? FontWeight900 : FontWeight500);
fontDescription.setSpecifiedSize(pointSize);
- RefPtr<Font> font = fontCache().fontForFamily(fontDescription, familyName);
+ RefPtr<Font> font = FontCache::singleton().fontForFamily(fontDescription, familyName);
return [font->platformData().nsFont() fontName];
}
Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (180280 => 180281)
--- trunk/Source/WebKit/mac/WebView/WebView.mm 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm 2015-02-18 20:05:11 UTC (rev 180281)
@@ -1346,7 +1346,7 @@
{
ASSERT(WebThreadIsCurrent());
WebKit::MemoryMeasure measurer("Memory warning: Purging inactive font data.");
- fontCache().purgeInactiveFontData();
+ FontCache::singleton().purgeInactiveFontData();
}
+ (void)drainLayerPool
Modified: trunk/Source/WebKit/win/ChangeLog (180280 => 180281)
--- trunk/Source/WebKit/win/ChangeLog 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebKit/win/ChangeLog 2015-02-18 20:05:11 UTC (rev 180281)
@@ -1,3 +1,13 @@
+2015-02-18 Chris Dumez <cdu...@apple.com>
+
+ Access FontCache global instance via singleton() static member function
+ https://bugs.webkit.org/show_bug.cgi?id=141726
+
+ Reviewed by Daniel Bates.
+
+ Access FontCache global instance via singleton() static member function,
+ as per coding style.
+
2015-02-09 Brian J. Burg <b...@cs.washington.edu>
Web Inspector: remove some unnecessary Inspector prefixes from class names in Inspector namespace
Modified: trunk/Source/WebKit/win/WebCoreStatistics.cpp (180280 => 180281)
--- trunk/Source/WebKit/win/WebCoreStatistics.cpp 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebKit/win/WebCoreStatistics.cpp 2015-02-18 20:05:11 UTC (rev 180281)
@@ -215,7 +215,7 @@
{
if (!count)
return E_POINTER;
- *count = (UINT) fontCache().fontCount();
+ *count = (UINT) FontCache::singleton().fontCount();
return S_OK;
}
@@ -224,13 +224,13 @@
{
if (!count)
return E_POINTER;
- *count = (UINT) fontCache().inactiveFontCount();
+ *count = (UINT) FontCache::singleton().inactiveFontCount();
return S_OK;
}
HRESULT STDMETHODCALLTYPE WebCoreStatistics::purgeInactiveFontData(void)
{
- fontCache().purgeInactiveFontData();
+ FontCache::singleton().purgeInactiveFontData();
return S_OK;
}
Modified: trunk/Source/WebKit2/ChangeLog (180280 => 180281)
--- trunk/Source/WebKit2/ChangeLog 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebKit2/ChangeLog 2015-02-18 20:05:11 UTC (rev 180281)
@@ -1,3 +1,13 @@
+2015-02-18 Chris Dumez <cdu...@apple.com>
+
+ Access FontCache global instance via singleton() static member function
+ https://bugs.webkit.org/show_bug.cgi?id=141726
+
+ Reviewed by Daniel Bates.
+
+ Access FontCache global instance via singleton() static member function,
+ as per coding style.
+
2015-02-18 Timothy Horton <timothy_hor...@apple.com>
Add WKContext SPI to clear all visited links
Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (180280 => 180281)
--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp 2015-02-18 19:57:35 UTC (rev 180280)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp 2015-02-18 20:05:11 UTC (rev 180281)
@@ -587,7 +587,7 @@
{
#ifndef NDEBUG
gcController().garbageCollectNow();
- fontCache().invalidate();
+ FontCache::singleton().invalidate();
MemoryCache::singleton().setDisabled(true);
#endif
@@ -640,12 +640,12 @@
// Close all the live pages.
Vector<RefPtr<WebPage>> pages;
copyValuesToVector(m_pageMap, pages);
- for (size_t i = 0; i < pages.size(); ++i)
- pages[i]->close();
+ for (auto& page : pages)
+ page->close();
pages.clear();
gcController().garbageCollectSoon();
- fontCache().invalidate();
+ FontCache::singleton().invalidate();
MemoryCache::singleton().setDisabled(true);
#endif
@@ -940,8 +940,9 @@
data.statisticsNumbers.set(ASCIILiteral("IconsWithDataCount"), iconDatabase().iconRecordCountWithData());
// Gather font statistics.
- data.statisticsNumbers.set(ASCIILiteral("CachedFontDataCount"), fontCache().fontCount());
- data.statisticsNumbers.set(ASCIILiteral("CachedFontDataInactiveCount"), fontCache().inactiveFontCount());
+ auto& fontCache = FontCache::singleton();
+ data.statisticsNumbers.set(ASCIILiteral("CachedFontDataCount"), fontCache.fontCount());
+ data.statisticsNumbers.set(ASCIILiteral("CachedFontDataInactiveCount"), fontCache.inactiveFontCount());
// Gather glyph page statistics.
data.statisticsNumbers.set(ASCIILiteral("GlyphPageCount"), GlyphPage::count());