Ignore:
Timestamp:
Apr 24, 2014, 12:05:47 PM (11 years ago)
Author:
[email protected]
Message:

FontCache::fontCache() never returns nullptr so it can be made to return a reference instead
https://bugs.webkit.org/show_bug.cgi?id=132110

Reviewed by Tim Horton.

Updates callers to use '.' instead of '->'.

No new tests are necessary because there should be no behavior change.

Source/WebCore:

  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::getFontData):

  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::CSSFontSelector):
(WebCore::CSSFontSelector::~CSSFontSelector):
(WebCore::CSSFontSelector::addFontFaceRule):
(WebCore::fontDataForGenericFamily):
(WebCore::CSSFontSelector::getFallbackFontData):

  • platform/MemoryPressureHandler.cpp:

(WebCore::MemoryPressureHandler::releaseMemory):

  • platform/graphics/FontCache.cpp:

(WebCore::fontCache): Return a reference

  • platform/graphics/FontCache.h:

(WebCore::FontCachePurgePreventer::FontCachePurgePreventer):
(WebCore::FontCachePurgePreventer::~FontCachePurgePreventer):

  • platform/graphics/FontGlyphs.cpp:

(WebCore::FontGlyphs::FontGlyphs):
(WebCore::FontGlyphs::releaseFontData):
(WebCore::FontGlyphs::realizeFontDataAt):
(WebCore::FontGlyphs::glyphDataAndPageForCharacter):

  • platform/graphics/freetype/FontPlatformDataFreeType.cpp:

(WebCore::FontPlatformData::verticalData):

  • platform/graphics/ios/SimpleFontDataIOS.mm:

(WebCore::SimpleFontData::platformCreateScaledFontData):

  • platform/graphics/mac/ComplexTextControllerCoreText.mm:

(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):

  • platform/graphics/mac/FontCacheMac.mm:

(WebCore::invalidateFontCache):
(WebCore::fontCacheRegisteredFontsChangedNotificationCallback):

  • platform/graphics/mac/SimpleFontDataMac.mm:

(WebCore::SimpleFontData::platformDestroy):
(WebCore::SimpleFontData::platformCreateScaledFontData):

  • platform/graphics/win/FontCacheWin.cpp:

(WebCore::getCJKCodePageMasks):

  • platform/graphics/win/SimpleFontDataWin.cpp:

(WebCore::SimpleFontData::containsCharacters):

  • platform/graphics/wince/FontCacheWinCE.cpp:

(WebCore::getCJKCodePageMasks):

  • platform/graphics/wince/FontPlatformData.cpp:

(WebCore::FontFamilyCodePageInfo::codePages):
(WebCore::FixedSizeFontData::create):

  • platform/graphics/wince/GlyphPageTreeNodeWinCE.cpp:

(WebCore::GlyphPage::fill):

  • platform/graphics/wince/SimpleFontDataWinCE.cpp:

(WebCore::SimpleFontData::platformCreateScaledFontData):
(WebCore::SimpleFontData::containsCharacters):

Source/WebKit/efl:

  • ewk/ewk_settings.cpp:

(ewk_settings_memory_cache_clear):

Source/WebKit/ios:

  • Misc/EmojiFallbackFontSelector.cpp:

(EmojiFallbackFontSelector::getFallbackFontData):

Source/WebKit/mac:

  • Misc/WebCoreStatistics.mm:

(+[WebCoreStatistics cachedFontDataCount]):
(+[WebCoreStatistics cachedFontDataInactiveCount]):
(+[WebCoreStatistics purgeInactiveFontData]):

  • WebView/WebView.mm:

(+[WebView purgeInactiveFontData]):

Source/WebKit/win:

  • WebCoreStatistics.cpp:

(WebCoreStatistics::cachedFontDataCount):
(WebCoreStatistics::cachedFontDataInactiveCount):
(WebCoreStatistics::purgeInactiveFontData):

Source/WebKit2:

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::terminate):
(WebKit::WebProcess::didClose):
(WebKit::WebProcess::getWebCoreStatistics):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/CSSFontFaceSource.cpp

    r165676 r167768  
    109109        // We're local. Just return a SimpleFontData from the normal cache.
    110110        // We don't want to check alternate font family names here, so pass true as the checkingAlternateName parameter.
    111         return fontCache()->getCachedFontData(fontDescription, m_string, true);
     111        return fontCache().getCachedFontData(fontDescription, m_string, true);
    112112    }
    113113
     
    173173        // This temporary font is not retained and should not be returned.
    174174        FontCachePurgePreventer fontCachePurgePreventer;
    175         SimpleFontData* temporaryFont = fontCache()->getNonRetainedLastResortFallbackFont(fontDescription);
     175        SimpleFontData* temporaryFont = fontCache().getNonRetainedLastResortFallbackFont(fontDescription);
    176176        fontData = SimpleFontData::create(temporaryFont->platformData(), true, true);
    177177    }
Note: See TracChangeset for help on using the changeset viewer.