Bug 8845. Define a TextRun (similar to the old WebCoreTextRun) and
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 May 2006 10:19:34 +0000 (10:19 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 May 2006 10:19:34 +0000 (10:19 +0000)
commit4a7342b7e41795941aea78352f7e30cd5dd5a12e
treef2cff33c7e66ba8699b653b0b2d270cda6800764
parent2e5b6029794be01bd33b2ab923cad96a85c12f98
    Bug 8845.  Define a TextRun (similar to the old WebCoreTextRun) and
        make it the new API for Font and GraphicsContext when drawing/measuring
        text.

        Reviewed by andersca

        * platform/Font.cpp:
        (WebCore::m_finalRoundingWidth):
        (WebCore::WidthIterator::advance):
        (WebCore::WidthIterator::normalizeVoicingMarks):
        (WebCore::Font::width):
        (WebCore::Font::canUseGlyphCache):
        (WebCore::Font::drawSimpleText):
        (WebCore::Font::drawText):
        (WebCore::Font::floatWidth):
        (WebCore::Font::floatWidthForSimpleText):
        * platform/Font.h:
        (WebCore::TextRun::m_to):
        (WebCore::TextRun::operator[]):
        (WebCore::TextRun::data):
        (WebCore::TextRun::adjustFrom):
        (WebCore::TextRun::adjustTo):
        (WebCore::TextRun::characters):
        (WebCore::TextRun::length):
        (WebCore::TextRun::from):
        (WebCore::TextRun::to):
        * platform/GraphicsContext.cpp:
        (WebCore::GraphicsContext::drawText):
        (WebCore::GraphicsContext::drawHighlightForText):
        * platform/GraphicsContext.h:
        * platform/mac/FontMac.mm:
        (WebCore::addDirectionalOverride):
        (WebCore::overrideLayoutOperation):
        (WebCore::ATSULayoutParameters::initialize):
        (WebCore::Font::selectionRectForText):
        (WebCore::Font::drawComplexText):
        (WebCore::Font::drawHighlightForText):
        (WebCore::Font::floatWidthForComplexText):
        (WebCore::Font::checkSelectionPoint):
        * platform/win/FontWin.cpp:
        (WebCore::hackishExtentForString):
        (WebCore::Font::floatWidth):
        (WebCore::Font::drawText):
        (WebCore::Font::drawHighlightForText):
        (WebCore::Font::selectionRectForText):
        (WebCore::Font::checkSelectionPoint):
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::selectionRect):
        (WebCore::InlineTextBox::paint):
        (WebCore::InlineTextBox::paintSelection):
        (WebCore::InlineTextBox::paintMarkedTextBackground):
        (WebCore::InlineTextBox::paintTextMatchMarker):
        (WebCore::InlineTextBox::offsetForPosition):
        (WebCore::InlineTextBox::positionForOffset):
        * rendering/RenderBlock.cpp:
        (WebCore::stripTrailingSpace):
        * rendering/RenderFlexibleBox.cpp:
        (WebCore::RenderFlexibleBox::layoutVerticalBox):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::imageChanged):
        (WebCore::RenderImage::paint):
        * rendering/RenderText.cpp:
        (WebCore::RenderText::cacheWidths):
        (WebCore::RenderText::widthFromCache):
        (WebCore::RenderText::trimmedMinMaxWidth):
        (WebCore::RenderText::calcMinMaxWidth):
        (WebCore::RenderText::width):
        * rendering/RenderTextField.cpp:
        (WebCore::RenderTextField::calcMinMaxWidth):
        * rendering/bidi.cpp:
        (WebCore::RenderBlock::tabWidth):
        (WebCore::RenderBlock::checkLinesForTextOverflow):
        * rendering/render_line.cpp:
        (WebCore::EllipsisBox::paint):
        * rendering/render_list.cpp:
        (WebCore::RenderListMarker::paint):
        (WebCore::RenderListMarker::calcMinMaxWidth):
        (WebCore::RenderListMarker::getRelativeMarkerRect):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
WebCore/ChangeLog
WebCore/platform/Font.cpp
WebCore/platform/Font.h
WebCore/platform/GraphicsContext.cpp
WebCore/platform/GraphicsContext.h
WebCore/platform/mac/FontMac.mm
WebCore/platform/win/FontWin.cpp
WebCore/rendering/InlineTextBox.cpp
WebCore/rendering/RenderBlock.cpp
WebCore/rendering/RenderFlexibleBox.cpp
WebCore/rendering/RenderImage.cpp
WebCore/rendering/RenderText.cpp
WebCore/rendering/RenderTextField.cpp
WebCore/rendering/bidi.cpp
WebCore/rendering/render_line.cpp
WebCore/rendering/render_list.cpp