Fix for bug 8809, lift the Mac-specific WebTextRenderer code for
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 May 2006 08:49:41 +0000 (08:49 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 May 2006 08:49:41 +0000 (08:49 +0000)
commit992d7fb9b3782c387c1c186e8665f15ce1ee48f1
tree853c06e39e1a865a237ae290c70cb2e69f1e1d2f
parentfc101cae7d1c9b83ba55b9372f99ae64cc8f6c55
    Fix for bug 8809, lift the Mac-specific WebTextRenderer code for
        drawing and measuring of runs up into the Font class.  The fast code
        path is in Font.cpp and is designed to be mostly cross-platform.  The
        slow code path is in FontMac.cpp and is Mac-specific.

        Reviewed by darin

        * WebCore.xcodeproj/project.pbxproj:
        * platform/Font.cpp:
        (WebCore::isSpace):
        (WebCore::):
        (WebCore::isRoundingHackCharacter):
        (WebCore::m_finalRoundingWidth):
        (WebCore::WidthIterator::advance):
        (WebCore::WidthIterator::normalizeVoicingMarks):
        (WebCore::Font::primaryFont):
        (WebCore::Font::setAlwaysUseComplexPath):
        (WebCore::Font::canUseGlyphCache):
        (WebCore::Font::drawSimpleText):
        (WebCore::Font::drawText):
        (WebCore::Font::floatWidth):
        (WebCore::Font::floatWidthForSimpleText):
        * platform/Font.h:
        * platform/FontData.h:
        (WebCore::FontData::platformData):
        * platform/GlyphBuffer.h: Added.
        (WebCore::GlyphBuffer::GlyphBuffer):
        (WebCore::GlyphBuffer::isEmpty):
        (WebCore::GlyphBuffer::size):
        (WebCore::GlyphBuffer::glyphs):
        (WebCore::GlyphBuffer::advances):
        (WebCore::GlyphBuffer::fontDataAt):
        (WebCore::GlyphBuffer::swap):
        (WebCore::GlyphBuffer::glyphAt):
        (WebCore::GlyphBuffer::advanceAt):
        (WebCore::GlyphBuffer::add):
        * platform/mac/FontData.mm:
        (WebCore::isSpace):
        (WebCore::isRoundingHackCharacter):
        (WebCore::FontData::widthForGlyph):
        (WebCore::m_ATSUMirrors):
        (WebCore::FontData::xHeight):
        (WebCore::FontData::smallCapsFontData):
        (WebCore::findSubstituteFont):
        (WebCore::rendererForAlternateFont):
        (WebCore::findSubstituteRenderer):
        (WebCore::FontData::findSubstituteFontData):
        (WebCore::computeWidthForSpace):
        (WebCore::FontData::updateGlyphMapEntry):
        (WebCore::extendGlyphMap):
        (WebCore::extendWidthMap):
        (WebCore::createATSULayoutParameters):
        (WebCore::FontData::glyphForCharacter):
        (WebCore::advanceWidthIterator):
        (WebCore::shouldUseATSU):
        * platform/mac/FontMac.mm:
        (WebCore::ATSULayoutParameters::m_padPerSpace):
        (WebCore::addDirectionalOverride):
        (WebCore::initializeATSUStyle):
        (WebCore::overrideLayoutOperation):
        (WebCore::ATSULayoutParameters::initialize):
        (WebCore::disposeATSULayoutParameters):
        (WebCore::Font::drawComplexText):
        (WebCore::Font::floatWidthForComplexText):
        (WebCore::Font::drawGlyphs):
        * platform/mac/WebCoreTextRenderer.mm:
        (WebCoreSetAlwaysUseATSU):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14283 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/platform/Font.cpp
WebCore/platform/Font.h
WebCore/platform/FontData.h
WebCore/platform/GlyphBuffer.h [new file with mode: 0644]
WebCore/platform/mac/FontData.mm
WebCore/platform/mac/FontMac.mm
WebCore/platform/mac/WebCoreTextRenderer.mm