WebCore:
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Mar 2008 02:34:14 +0000 (02:34 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Mar 2008 02:34:14 +0000 (02:34 +0000)
commit2bb17bbee7fe93b2d9435e5a5d9a1f9de1801a4b
tree5cd3726ef0229872a8b90755a1d88ca60b01c70f
parente3bf41a801a390c5a3dd08f55e49996aa1287626
WebCore:

2008-03-26  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Hyatt and Adam.

        Coded by me and Darin.

        - SVG kerning support (horizontal kerning only for now since we don't do vertical text layout right yet)

        Acid3 100/100

        * DerivedSources.make:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/Font.cpp:
        (WebCore::Font::floatWidth):
        (WebCore::Font::isSVGFont):
        * platform/graphics/Font.h:
        * rendering/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::calculateGlyphWidth):
        (WebCore::SVGInlineTextBox::calculateGlyphBoundaries):
        * rendering/SVGInlineTextBox.h:
        * rendering/SVGRootInlineBox.cpp:
        (WebCore::cummulatedWidthOrHeightOfTextChunk):
        (WebCore::SVGRootInlineBox::buildLayoutInformation):
        (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
        * rendering/SVGRootInlineBox.h:
        (WebCore::LastGlyphInfo::LastGlyphInfo):
        * svg/SVGFont.cpp:
        (WebCore::SVGTextRunWalker::walk):
        (WebCore::Font::svgFont):
        (WebCore::floatWidthOfSubStringUsingSVGFont):
        (WebCore::Font::floatWidthUsingSVGFont):
        (WebCore::Font::drawTextUsingSVGFont):
        (WebCore::Font::selectionRectForTextUsingSVGFont):
        * svg/SVGFontElement.cpp:
        (WebCore::SVGFontElement::invalidateGlyphCache):
        (WebCore::SVGFontElement::ensureGlyphCache):
        (WebCore::parseUnicodeRange):
        (WebCore::parseUnicodeRangeList):
        (WebCore::stringMatchesUnicodeRange):
        (WebCore::matches):
        (WebCore::SVGFontElement::getHorizontalKerningPairForStringsAndGlyphs):
        * svg/SVGFontElement.h:
        * svg/SVGGlyphElement.cpp:
        (WebCore::SVGGlyphElement::insertedIntoDocument):
        (WebCore::SVGGlyphElement::removedFromDocument):
        * svg/SVGHKernElement.cpp: Added.
        (WebCore::SVGHKernElement::SVGHKernElement):
        (WebCore::SVGHKernElement::~SVGHKernElement):
        (WebCore::SVGHKernElement::insertedIntoDocument):
        (WebCore::SVGHKernElement::removedFromDocument):
        (WebCore::SVGHKernElement::buildHorizontalKerningPair):
        * svg/SVGHKernElement.h: Added.
        (WebCore::SVGHorizontalKerningPair::SVGHorizontalKerningPair):
        (WebCore::SVGHKernElement::rendererIsNeeded):
        * svg/SVGHKernElement.idl: Added.
        * svg/SVGTextContentElement.cpp:
        (WebCore::cummulatedCharacterRangeLength):
        (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback):
        * svg/svgtags.in:

LayoutTests:

2008-03-26  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Hyatt and Adam.

        - new test case and test fixes for SVG text kerning

        * svg/text/kerning.svg: Added.
        * platform/mac/svg/text/kerning-expected.txt: Added.

        * platform/mac/svg/W3C-SVG-1.1/fonts-kern-01-t-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/masking-mask-01-b-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/render-groups-01-b-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/render-groups-03-t-expected.txt:
        * platform/mac/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31342 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-kern-01-t-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-mask-01-b-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/render-groups-01-b-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/render-groups-03-t-expected.txt
LayoutTests/platform/mac/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt
LayoutTests/platform/mac/svg/text/kerning-expected.txt [new file with mode: 0644]
LayoutTests/svg/text/kerning.svg [new file with mode: 0644]
WebCore/ChangeLog
WebCore/DerivedSources.make
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/platform/graphics/Font.cpp
WebCore/platform/graphics/Font.h
WebCore/rendering/SVGInlineTextBox.cpp
WebCore/rendering/SVGInlineTextBox.h
WebCore/rendering/SVGRootInlineBox.cpp
WebCore/rendering/SVGRootInlineBox.h
WebCore/svg/SVGFont.cpp
WebCore/svg/SVGFontElement.cpp
WebCore/svg/SVGFontElement.h
WebCore/svg/SVGGlyphElement.cpp
WebCore/svg/SVGHKernElement.cpp [new file with mode: 0644]
WebCore/svg/SVGHKernElement.h [new file with mode: 0644]
WebCore/svg/SVGHKernElement.idl [new file with mode: 0644]
WebCore/svg/SVGTextContentElement.cpp
WebCore/svg/svgtags.in