Ignore:
Timestamp:
Oct 1, 2012, 5:28:32 PM (13 years ago)
Author:
[email protected]
Message:

Unreviewed, rolling out r130079.
http://trac.webkit.org/changeset/130079
https://bugs.webkit.org/show_bug.cgi?id=95866

Broke the chomium windows compile.

  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::getFontData):

  • css/CSSFontFace.h:

(CSSFontFace):

  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::getFontData):

  • css/CSSFontFaceSource.h:

(CSSFontFaceSource):

  • css/CSSFontSelector.cpp:

(WebCore::fontDataForGenericFamily):
(WebCore::CSSFontSelector::getFontData):

  • css/CSSFontSelector.h:
  • css/CSSSegmentedFontFace.cpp:

(WebCore::appendFontDataWithInvalidUnicodeRangeIfLoading):
(WebCore::CSSSegmentedFontFace::getFontData):

  • css/CSSSegmentedFontFace.h:

(CSSSegmentedFontFace):

  • dom/Document.cpp:

(WebCore::Document::registerCustomFont):

  • dom/Document.h:

(Document):

  • platform/graphics/Font.h:

(WebCore):

  • platform/graphics/FontCache.cpp:

(WebCore):
(WebCore::FontCache::getCachedFontData):
(WebCore::FontCache::getNonRetainedLastResortFallbackFont):
(WebCore::FontCache::releaseFontData):
(WebCore::FontCache::purgeInactiveFontData):
(WebCore::FontCache::getFontData):

  • platform/graphics/FontCache.h:

(FontCache):

  • platform/graphics/FontData.h:
  • platform/graphics/FontFallbackList.cpp:

(WebCore::FontFallbackList::releaseFontData):
(WebCore::FontFallbackList::fontDataAt):
(WebCore::FontFallbackList::setPlatformFont):

  • platform/graphics/FontFallbackList.h:

(FontFallbackList):

  • platform/graphics/FontFastPath.cpp:

(WebCore::Font::glyphDataAndPageForCharacter):

  • platform/graphics/FontSelector.h:

(FontSelector):

  • platform/graphics/GlyphPageTreeNode.cpp:

(WebCore::GlyphPageTreeNode::initializePage):

  • platform/graphics/SegmentedFontData.cpp:

(WebCore::SegmentedFontData::fontDataForCharacter):

  • platform/graphics/SegmentedFontData.h:

(WebCore::FontDataRange::FontDataRange):
(WebCore::FontDataRange::fontData):
(FontDataRange):
(SegmentedFontData):

  • platform/graphics/SimpleFontData.cpp:

(WebCore::SimpleFontData::verticalRightOrientationFontData):
(WebCore::SimpleFontData::uprightOrientationFontData):
(WebCore::SimpleFontData::brokenIdeographFontData):

  • platform/graphics/SimpleFontData.h:

(SimpleFontData):
(WebCore::SimpleFontData::variantFontData):
(DerivedFontData):

  • platform/graphics/chromium/FontCacheAndroid.cpp:

(WebCore::FontCache::getFontDataForCharacters):
(WebCore::FontCache::getSimilarFontPlatformData):
(WebCore::FontCache::getLastResortFallbackFont):

  • platform/graphics/chromium/FontCacheChromiumWin.cpp:

(WebCore::FontCache::fontDataFromDescriptionAndLogFont):
(GetLastResortFallbackFontProcData):
(WebCore::FontCache::getFontDataForCharacters):
(WebCore::FontCache::getSimilarFontPlatformData):
(WebCore::FontCache::getLastResortFallbackFont):

  • platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:

(WebCore::SimpleFontData::createScaledFontData):
(WebCore::SimpleFontData::smallCapsFontData):
(WebCore::SimpleFontData::emphasisMarkFontData):

  • platform/graphics/freetype/FontCacheFreeType.cpp:

(WebCore::FontCache::getFontDataForCharacters):
(WebCore::FontCache::getSimilarFontPlatformData):
(WebCore::FontCache::getLastResortFallbackFont):

  • platform/graphics/freetype/SimpleFontDataFreeType.cpp:

(WebCore::SimpleFontData::createScaledFontData):
(WebCore::SimpleFontData::smallCapsFontData):
(WebCore::SimpleFontData::emphasisMarkFontData):

  • platform/graphics/mac/ComplexTextControllerCoreText.mm:

(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):

  • platform/graphics/mac/FontCacheMac.mm:

(WebCore::FontCache::getFontDataForCharacters):
(WebCore::FontCache::getSimilarFontPlatformData):
(WebCore::FontCache::getLastResortFallbackFont):

  • platform/graphics/mac/FontComplexTextMac.cpp:

(WebCore::Font::fontDataForCombiningCharacterSequence):

  • platform/graphics/mac/SimpleFontDataMac.mm:

(WebCore::SimpleFontData::platformDestroy):
(WebCore::SimpleFontData::createScaledFontData):
(WebCore::SimpleFontData::smallCapsFontData):
(WebCore::SimpleFontData::emphasisMarkFontData):

  • platform/graphics/pango/FontCachePango.cpp:

(WebCore::FontCache::getFontDataForCharacters):
(WebCore::FontCache::getSimilarFontPlatformData):
(WebCore::FontCache::getLastResortFallbackFont):

  • platform/graphics/pango/SimpleFontDataPango.cpp:

(WebCore::SimpleFontData::createScaledFontData):
(WebCore::SimpleFontData::smallCapsFontData):
(WebCore::SimpleFontData::emphasisMarkFontData):

  • platform/graphics/qt/FontCacheQt.cpp:

(WebCore::FontCache::getFontDataForCharacters):
(WebCore::FontCache::getSimilarFontPlatformData):
(WebCore::FontCache::getLastResortFallbackFont):

  • platform/graphics/qt/SimpleFontDataQt.cpp:

(WebCore::SimpleFontData::createScaledFontData):
(WebCore::SimpleFontData::smallCapsFontData):
(WebCore::SimpleFontData::emphasisMarkFontData):

  • platform/graphics/skia/FontCacheSkia.cpp:

(WebCore::FontCache::getFontDataForCharacters):
(WebCore::FontCache::getSimilarFontPlatformData):
(WebCore::FontCache::getLastResortFallbackFont):

  • platform/graphics/skia/SimpleFontDataSkia.cpp:

(WebCore::SimpleFontData::createScaledFontData):
(WebCore::SimpleFontData::smallCapsFontData):
(WebCore::SimpleFontData::emphasisMarkFontData):

  • platform/graphics/win/FontCacheWin.cpp:

(WebCore::FontCache::getFontDataForCharacters):
(WebCore::FontCache::getSimilarFontPlatformData):
(WebCore::FontCache::fontDataFromDescriptionAndLogFont):
(WebCore::FontCache::getLastResortFallbackFont):

  • platform/graphics/win/SimpleFontDataWin.cpp:

(WebCore::SimpleFontData::createScaledFontData):
(WebCore::SimpleFontData::smallCapsFontData):
(WebCore::SimpleFontData::emphasisMarkFontData):

  • platform/graphics/wince/FontCacheWinCE.cpp:
  • platform/graphics/wince/SimpleFontDataWinCE.cpp:

(WebCore::SimpleFontData::createScaledFontData):
(WebCore::SimpleFontData::smallCapsFontData):
(WebCore::SimpleFontData::emphasisMarkFontData):

  • platform/graphics/wx/FontCacheWx.cpp:

(WebCore::FontCache::getFontDataForCharacters):
(WebCore::FontCache::getSimilarFontPlatformData):
(WebCore::FontCache::getLastResortFallbackFont):

  • platform/graphics/wx/SimpleFontDataWx.cpp:

(WebCore::SimpleFontData::createScaledFontData):
(WebCore::SimpleFontData::smallCapsFontData):
(WebCore::SimpleFontData::emphasisMarkFontData):

File:
1 edited

Legend:

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

    r130079 r130105  
    3434#include "FontCache.h"
    3535#include "FontDescription.h"
     36#include "GlyphPageTreeNode.h"
    3637#include "SimpleFontData.h"
    3738
     
    9596}
    9697
    97 PassRefPtr<SimpleFontData> CSSFontFaceSource::getFontData(const FontDescription& fontDescription, bool syntheticBold, bool syntheticItalic, CSSFontSelector* fontSelector)
     98SimpleFontData* CSSFontFaceSource::getFontData(const FontDescription& fontDescription, bool syntheticBold, bool syntheticItalic, CSSFontSelector* fontSelector)
    9899{
    99100    // If the font hasn't loaded or an error occurred, then we've got nothing.
     
    114115                       | (fontDescription.textOrientation() == TextOrientationUpright ? 8 : 0) | (fontDescription.orientation() == Vertical ? 4 : 0) | (syntheticBold ? 2 : 0) | (syntheticItalic ? 1 : 0);
    115116
    116     RefPtr<SimpleFontData>& fontData = m_fontDataTable.add(hashKey, 0).iterator->second;
    117     if (fontData)
    118         return fontData; // No release, because fontData is a reference to a RefPtr that is held in the m_fontDataTable.
     117    SimpleFontData*& cachedData = m_fontDataTable.add(hashKey, 0).iterator->second;
     118    if (cachedData)
     119        return cachedData;
     120
     121    OwnPtr<SimpleFontData> fontData;
    119122
    120123    // If we are still loading, then we let the system pick a font.
     
    155158                    }
    156159
    157                     fontData = SimpleFontData::create(SVGFontData::create(fontFaceElement), fontDescription.computedPixelSize(), syntheticBold, syntheticItalic);
     160                    fontData = adoptPtr(new SimpleFontData(SVGFontData::create(fontFaceElement), fontDescription.computedPixelSize(), syntheticBold, syntheticItalic));
    158161                }
    159162            } else
     
    164167                    return 0;
    165168
    166                 fontData = SimpleFontData::create(m_font->platformDataFromCustomData(fontDescription.computedPixelSize(), syntheticBold, syntheticItalic,
    167                     fontDescription.orientation(), fontDescription.textOrientation(), fontDescription.widthVariant(), fontDescription.renderingMode()), true, false);
     169                fontData = adoptPtr(new SimpleFontData(m_font->platformDataFromCustomData(fontDescription.computedPixelSize(), syntheticBold, syntheticItalic, fontDescription.orientation(),
     170                                                                                   fontDescription.textOrientation(), fontDescription.widthVariant(), fontDescription.renderingMode()), true, false));
    168171            }
    169172        } else {
     
    171174            // In-Document SVG Fonts
    172175            if (m_svgFontFaceElement)
    173                 fontData = SimpleFontData::create(SVGFontData::create(m_svgFontFaceElement.get()), fontDescription.computedPixelSize(), syntheticBold, syntheticItalic);
     176                fontData = adoptPtr(new SimpleFontData(SVGFontData::create(m_svgFontFaceElement.get()), fontDescription.computedPixelSize(), syntheticBold, syntheticItalic));
    174177#endif
    175178        }
     
    182185        FontCachePurgePreventer fontCachePurgePreventer;
    183186        SimpleFontData* temporaryFont = fontCache()->getNonRetainedLastResortFallbackFont(fontDescription);
    184         fontData = SimpleFontData::create(temporaryFont->platformData(), true, true);
     187        fontData = adoptPtr(new SimpleFontData(temporaryFont->platformData(), true, true));
    185188    }
    186189
    187     if (Document* document = fontSelector->document())
    188         document->registerCustomFont(fontData);
    189     else
    190         fontData.clear();
    191 
    192     return fontData; // No release, because fontData is a reference to a RefPtr that is held in the m_fontDataTable.
     190    if (Document* document = fontSelector->document()) {
     191        cachedData = fontData.get();
     192        document->registerCustomFont(fontData.release());
     193    }
     194
     195    return cachedData;
    193196}
    194197
Note: See TracChangeset for help on using the changeset viewer.