haikuwebkit/LayoutTests/svg/text/text-vkern-on-horizontal-te...

9 lines
396 B
Plaintext
Raw Permalink Normal View History

2010-05-11 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Move buildLayoutInformationForTextBox() from SVGRootInlineBox in SVGInlineTextBox where it belongs https://bugs.webkit.org/show_bug.cgi?id=38799 Cleanup SVGRootInlineBox/SVGInlineTextBox. Move buildLayoutInformationForTextBox to SVGInlineTextBox. Move lots of helper methods into new SVGTextLayoutUtilities class. Adapted all callsites. Fixed bug in kerning handling, hkern was applyable to vertical text as well. Covered by two new tests. Tests: svg/text/text-hkern-on-vertical-text.svg svg/text/text-vkern-on-horizontal-text.svg * Android.mk: Add SVGTextLayoutUtilities.cpp/h to build. * GNUmakefile.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * rendering/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::calculateGlyphWidth): Use textRenderer()->characters() instead of textRenderer()->text()->characters() as shortcut. (WebCore::SVGInlineTextBox::svgCharacterHitsPosition): Fix style issue, no else if after a return branch. (WebCore::SVGInlineTextBox::paintSelection): Use !color.alpha() instead of color.alpha() == 0. (WebCore::SVGInlineTextBox::buildLayoutInformation): Moved from SVGRootInlineBox::buildLayoutInformationForTextBox. * rendering/SVGInlineTextBox.h: Fix indention. (WebCore::SVGInlineTextBox::selectionTop): Inlined. (WebCore::SVGInlineTextBox::selectionHeight): Inlined. * rendering/SVGRenderTreeAsText.cpp: Include SVGTextLayoutUtilities.h * rendering/SVGRootInlineBox.cpp: Move almost all static text layout helper functions in SVGTextLayoutUtilities (WebCore::calculateTextLengthCorrectionForTextChunk): Fixed style issue in long if conditions spanning multiple lines. (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation): Use different topLeftPositionOfCharacterRange() taking start/end iterators. (WebCore::SVGRootInlineBox::buildLayoutInformation): Use the moved SVGInlineTextBox::buildLayoutInformation() method. (WebCore::SVGRootInlineBox::buildTextChunks): Fixed small style issue, remove unneeded parenthesis. (WebCore::SVGRootInlineBox::layoutTextChunks): Fix style issue in debugging code. * rendering/SVGRootInlineBox.h: Rename 'LastGlyphInfo' to 'SVGLastGlyphInfo' and move to SVGTextLayoutUtilities. (WebCore::SVGRootInlineBox::svgTextChunks): Inlined for speed. * rendering/SVGTextLayoutUtilities.cpp: Added. (WebCore::isVerticalWritingMode): (WebCore::dominantBaselineToShift): (WebCore::alignmentBaselineToShift): (WebCore::glyphOrientationToAngle): (WebCore::glyphOrientationIsMultiplyOf180Degrees): (WebCore::applyGlyphAdvanceAndShiftRespectingOrientation): (WebCore::topLeftPositionOfCharacterRange): (WebCore::cummulatedWidthOfInlineBoxCharacterRange): (WebCore::cummulatedHeightOfInlineBoxCharacterRange): (WebCore::svgTextRunForInlineTextBox): (WebCore::calculateCSSKerning): (WebCore::applySVGKerning): * rendering/SVGTextLayoutUtilities.h: Added. (WebCore::): (WebCore::SVGTextPaintInfo::SVGTextPaintInfo): (WebCore::SVGLastGlyphInfo::SVGLastGlyphInfo): 2010-05-11 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Move buildLayoutInformationForTextBox() from SVGRootInlineBox in SVGInlineTextBox where it belongs https://bugs.webkit.org/show_bug.cgi?id=38799 * platform/mac/svg/text/text-hkern-on-vertical-text-expected.checksum: Added. * platform/mac/svg/text/text-hkern-on-vertical-text-expected.png: Added. * platform/mac/svg/text/text-hkern-on-vertical-text-expected.txt: Added. * platform/mac/svg/text/text-vkern-on-horizontal-text-expected.checksum: Added. * platform/mac/svg/text/text-vkern-on-horizontal-text-expected.png: Added. * platform/mac/svg/text/text-vkern-on-horizontal-text-expected.txt: Added. * svg/text/text-hkern-on-vertical-text.svg: Added. * svg/text/text-vkern-on-horizontal-text.svg: Added. Canonical link: https://commits.webkit.org/50387@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@59148 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-05-11 12:11:09 +00:00
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
[Cocoa] Unify font's ascent, descent, and x-height between macOS and iOS https://bugs.webkit.org/show_bug.cgi?id=161877 Reviewed by Simon Fraser. Source/WebCore: macOS and iOS have slightly different handling of ascent, descent, and x-height. This patch migrates them to have the same handling of them. There are slight behavior changes here because our previous code converted between floats and doubles in unnecessary places, and does not handle rounding in consistent ways. The differences are all miniscule, but nevertheless lead to test results needing to be updated. Coincidentally, by performing this unification, there are no longer any places on macOS Sierra which are using the CGFontRef member of PlatformFontData. This patch removes the member on that operating system for memory savings as well as clarity. Covered by existing tests. * platform/graphics/FontPlatformData.cpp: * platform/graphics/FontPlatformData.h: * platform/graphics/cocoa/FontCocoa.mm: (WebCore::Font::platformInit): * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::platformIsEqual): (WebCore::FontPlatformData::ctFont): LayoutTests: Updating expected results. * imported/blink/svg/text/obb-paintserver-expected.html: Covered tiny unrelated 1px difference. * imported/blink/svg/text/obb-paintserver.html: Ditto. * platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.txt: * platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.txt: * platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-forward-br-expected.txt: * platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-forward-p-expected.txt: * platform/ios-simulator/fast/text/whitespace/pre-wrap-spaces-after-newline-expected.txt: * platform/ios-simulator/svg/W3C-SVG-1.1-SE/coords-units-03-b-expected.txt: * platform/ios-simulator/svg/custom/glyph-transformation-with-hkern-expected.txt: Copied from LayoutTests/svg/custom/glyph-transformation-with-hkern-expected.txt. * platform/ios-simulator/svg/custom/repaint-shadow-expected.txt: Copied from LayoutTests/svg/custom/repaint-shadow-expected.txt. * platform/ios-simulator/svg/text/text-hkern-on-vertical-text-expected.txt: Copied from LayoutTests/svg/text/text-hkern-on-vertical-text-expected.txt. * platform/ios-simulator/svg/text/text-vkern-on-horizontal-text-expected.txt: Copied from LayoutTests/svg/text/text-vkern-on-horizontal-text-expected.txt. * platform/ios-simulator/tables/mozilla/bugs/bug55527-expected.txt: * platform/mac-yosemite/fast/text/emoji-expected.txt: * platform/mac-yosemite/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.txt: * platform/mac/css2.1/t1202-counter-04-b-expected.txt: * platform/mac/css2.1/t1202-counters-04-b-expected.txt: * platform/mac/fast/text/emoji-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/color-prop-05-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/coords-units-03-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/filters-felem-01-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/filters-image-03-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/interact-pointer-03-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/linking-uri-01-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/painting-marker-07-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/paths-dom-02-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-17-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-20-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/pservers-pattern-03-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/pservers-pattern-04-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/struct-use-14-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/styling-pres-02-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/svgdom-over-01-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/text-tref-03-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/text-tspan-02-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-07-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/animate-elem-24-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/filters-light-04-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1/filters-turb-02-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1/fonts-elem-05-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/fonts-elem-06-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/fonts-glyph-02-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/fonts-glyph-03-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/fonts-kern-01-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/render-elems-06-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/render-elems-07-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/render-elems-08-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/text-align-08-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1/text-fonts-03-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/text-text-04-t-expected.txt: * platform/mac/svg/batik/text/xmlSpace-expected.txt: * platform/mac/svg/custom/glyph-selection-bidi-mirror-expected.txt: * platform/mac/svg/custom/glyph-setting-d-attribute-expected.txt: * platform/mac/svg/foreignObject/text-tref-02-b-expected.txt: * platform/mac/svg/text/kerning-expected.txt: * platform/mac/svg/text/multichar-glyph-expected.txt: * svg/custom/glyph-transformation-with-hkern-expected.txt: * svg/custom/repaint-shadow-expected.txt: * svg/text/text-hkern-on-vertical-text-expected.txt: * svg/text/text-vkern-on-horizontal-text-expected.txt: Canonical link: https://commits.webkit.org/180078@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-13 22:38:46 +00:00
RenderSVGRoot {svg} at (5,28) size 50x22
2010-05-11 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Move buildLayoutInformationForTextBox() from SVGRootInlineBox in SVGInlineTextBox where it belongs https://bugs.webkit.org/show_bug.cgi?id=38799 Cleanup SVGRootInlineBox/SVGInlineTextBox. Move buildLayoutInformationForTextBox to SVGInlineTextBox. Move lots of helper methods into new SVGTextLayoutUtilities class. Adapted all callsites. Fixed bug in kerning handling, hkern was applyable to vertical text as well. Covered by two new tests. Tests: svg/text/text-hkern-on-vertical-text.svg svg/text/text-vkern-on-horizontal-text.svg * Android.mk: Add SVGTextLayoutUtilities.cpp/h to build. * GNUmakefile.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * rendering/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::calculateGlyphWidth): Use textRenderer()->characters() instead of textRenderer()->text()->characters() as shortcut. (WebCore::SVGInlineTextBox::svgCharacterHitsPosition): Fix style issue, no else if after a return branch. (WebCore::SVGInlineTextBox::paintSelection): Use !color.alpha() instead of color.alpha() == 0. (WebCore::SVGInlineTextBox::buildLayoutInformation): Moved from SVGRootInlineBox::buildLayoutInformationForTextBox. * rendering/SVGInlineTextBox.h: Fix indention. (WebCore::SVGInlineTextBox::selectionTop): Inlined. (WebCore::SVGInlineTextBox::selectionHeight): Inlined. * rendering/SVGRenderTreeAsText.cpp: Include SVGTextLayoutUtilities.h * rendering/SVGRootInlineBox.cpp: Move almost all static text layout helper functions in SVGTextLayoutUtilities (WebCore::calculateTextLengthCorrectionForTextChunk): Fixed style issue in long if conditions spanning multiple lines. (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation): Use different topLeftPositionOfCharacterRange() taking start/end iterators. (WebCore::SVGRootInlineBox::buildLayoutInformation): Use the moved SVGInlineTextBox::buildLayoutInformation() method. (WebCore::SVGRootInlineBox::buildTextChunks): Fixed small style issue, remove unneeded parenthesis. (WebCore::SVGRootInlineBox::layoutTextChunks): Fix style issue in debugging code. * rendering/SVGRootInlineBox.h: Rename 'LastGlyphInfo' to 'SVGLastGlyphInfo' and move to SVGTextLayoutUtilities. (WebCore::SVGRootInlineBox::svgTextChunks): Inlined for speed. * rendering/SVGTextLayoutUtilities.cpp: Added. (WebCore::isVerticalWritingMode): (WebCore::dominantBaselineToShift): (WebCore::alignmentBaselineToShift): (WebCore::glyphOrientationToAngle): (WebCore::glyphOrientationIsMultiplyOf180Degrees): (WebCore::applyGlyphAdvanceAndShiftRespectingOrientation): (WebCore::topLeftPositionOfCharacterRange): (WebCore::cummulatedWidthOfInlineBoxCharacterRange): (WebCore::cummulatedHeightOfInlineBoxCharacterRange): (WebCore::svgTextRunForInlineTextBox): (WebCore::calculateCSSKerning): (WebCore::applySVGKerning): * rendering/SVGTextLayoutUtilities.h: Added. (WebCore::): (WebCore::SVGTextPaintInfo::SVGTextPaintInfo): (WebCore::SVGLastGlyphInfo::SVGLastGlyphInfo): 2010-05-11 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Move buildLayoutInformationForTextBox() from SVGRootInlineBox in SVGInlineTextBox where it belongs https://bugs.webkit.org/show_bug.cgi?id=38799 * platform/mac/svg/text/text-hkern-on-vertical-text-expected.checksum: Added. * platform/mac/svg/text/text-hkern-on-vertical-text-expected.png: Added. * platform/mac/svg/text/text-hkern-on-vertical-text-expected.txt: Added. * platform/mac/svg/text/text-vkern-on-horizontal-text-expected.checksum: Added. * platform/mac/svg/text/text-vkern-on-horizontal-text-expected.png: Added. * platform/mac/svg/text/text-vkern-on-horizontal-text-expected.txt: Added. * svg/text/text-hkern-on-vertical-text.svg: Added. * svg/text/text-vkern-on-horizontal-text.svg: Added. Canonical link: https://commits.webkit.org/50387@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@59148 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-05-11 12:11:09 +00:00
RenderSVGHiddenContainer {defs} at (0,0) size 0x0
[Cocoa] Unify font's ascent, descent, and x-height between macOS and iOS https://bugs.webkit.org/show_bug.cgi?id=161877 Reviewed by Simon Fraser. Source/WebCore: macOS and iOS have slightly different handling of ascent, descent, and x-height. This patch migrates them to have the same handling of them. There are slight behavior changes here because our previous code converted between floats and doubles in unnecessary places, and does not handle rounding in consistent ways. The differences are all miniscule, but nevertheless lead to test results needing to be updated. Coincidentally, by performing this unification, there are no longer any places on macOS Sierra which are using the CGFontRef member of PlatformFontData. This patch removes the member on that operating system for memory savings as well as clarity. Covered by existing tests. * platform/graphics/FontPlatformData.cpp: * platform/graphics/FontPlatformData.h: * platform/graphics/cocoa/FontCocoa.mm: (WebCore::Font::platformInit): * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::platformIsEqual): (WebCore::FontPlatformData::ctFont): LayoutTests: Updating expected results. * imported/blink/svg/text/obb-paintserver-expected.html: Covered tiny unrelated 1px difference. * imported/blink/svg/text/obb-paintserver.html: Ditto. * platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.txt: * platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.txt: * platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-forward-br-expected.txt: * platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-forward-p-expected.txt: * platform/ios-simulator/fast/text/whitespace/pre-wrap-spaces-after-newline-expected.txt: * platform/ios-simulator/svg/W3C-SVG-1.1-SE/coords-units-03-b-expected.txt: * platform/ios-simulator/svg/custom/glyph-transformation-with-hkern-expected.txt: Copied from LayoutTests/svg/custom/glyph-transformation-with-hkern-expected.txt. * platform/ios-simulator/svg/custom/repaint-shadow-expected.txt: Copied from LayoutTests/svg/custom/repaint-shadow-expected.txt. * platform/ios-simulator/svg/text/text-hkern-on-vertical-text-expected.txt: Copied from LayoutTests/svg/text/text-hkern-on-vertical-text-expected.txt. * platform/ios-simulator/svg/text/text-vkern-on-horizontal-text-expected.txt: Copied from LayoutTests/svg/text/text-vkern-on-horizontal-text-expected.txt. * platform/ios-simulator/tables/mozilla/bugs/bug55527-expected.txt: * platform/mac-yosemite/fast/text/emoji-expected.txt: * platform/mac-yosemite/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.txt: * platform/mac/css2.1/t1202-counter-04-b-expected.txt: * platform/mac/css2.1/t1202-counters-04-b-expected.txt: * platform/mac/fast/text/emoji-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/color-prop-05-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/coords-units-03-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/filters-felem-01-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/filters-image-03-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/interact-pointer-03-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/linking-uri-01-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/painting-marker-07-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/paths-dom-02-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-17-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-20-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/pservers-pattern-03-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/pservers-pattern-04-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/struct-use-14-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/styling-pres-02-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/svgdom-over-01-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/text-tref-03-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/text-tspan-02-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-07-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/animate-elem-24-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/filters-light-04-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1/filters-turb-02-f-expected.txt: * platform/mac/svg/W3C-SVG-1.1/fonts-elem-05-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/fonts-elem-06-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/fonts-glyph-02-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/fonts-glyph-03-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/fonts-kern-01-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/render-elems-06-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/render-elems-07-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/render-elems-08-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/text-align-08-b-expected.txt: * platform/mac/svg/W3C-SVG-1.1/text-fonts-03-t-expected.txt: * platform/mac/svg/W3C-SVG-1.1/text-text-04-t-expected.txt: * platform/mac/svg/batik/text/xmlSpace-expected.txt: * platform/mac/svg/custom/glyph-selection-bidi-mirror-expected.txt: * platform/mac/svg/custom/glyph-setting-d-attribute-expected.txt: * platform/mac/svg/foreignObject/text-tref-02-b-expected.txt: * platform/mac/svg/text/kerning-expected.txt: * platform/mac/svg/text/multichar-glyph-expected.txt: * svg/custom/glyph-transformation-with-hkern-expected.txt: * svg/custom/repaint-shadow-expected.txt: * svg/text/text-hkern-on-vertical-text-expected.txt: * svg/text/text-vkern-on-horizontal-text-expected.txt: Canonical link: https://commits.webkit.org/180078@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-13 22:38:46 +00:00
RenderSVGText {text} at (0,-9) size 25x11 contains 1 chunk(s)
RenderSVGInlineText {#text} at (0,0) size 25x11
2010-05-11 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Move buildLayoutInformationForTextBox() from SVGRootInlineBox in SVGInlineTextBox where it belongs https://bugs.webkit.org/show_bug.cgi?id=38799 Cleanup SVGRootInlineBox/SVGInlineTextBox. Move buildLayoutInformationForTextBox to SVGInlineTextBox. Move lots of helper methods into new SVGTextLayoutUtilities class. Adapted all callsites. Fixed bug in kerning handling, hkern was applyable to vertical text as well. Covered by two new tests. Tests: svg/text/text-hkern-on-vertical-text.svg svg/text/text-vkern-on-horizontal-text.svg * Android.mk: Add SVGTextLayoutUtilities.cpp/h to build. * GNUmakefile.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * rendering/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::calculateGlyphWidth): Use textRenderer()->characters() instead of textRenderer()->text()->characters() as shortcut. (WebCore::SVGInlineTextBox::svgCharacterHitsPosition): Fix style issue, no else if after a return branch. (WebCore::SVGInlineTextBox::paintSelection): Use !color.alpha() instead of color.alpha() == 0. (WebCore::SVGInlineTextBox::buildLayoutInformation): Moved from SVGRootInlineBox::buildLayoutInformationForTextBox. * rendering/SVGInlineTextBox.h: Fix indention. (WebCore::SVGInlineTextBox::selectionTop): Inlined. (WebCore::SVGInlineTextBox::selectionHeight): Inlined. * rendering/SVGRenderTreeAsText.cpp: Include SVGTextLayoutUtilities.h * rendering/SVGRootInlineBox.cpp: Move almost all static text layout helper functions in SVGTextLayoutUtilities (WebCore::calculateTextLengthCorrectionForTextChunk): Fixed style issue in long if conditions spanning multiple lines. (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation): Use different topLeftPositionOfCharacterRange() taking start/end iterators. (WebCore::SVGRootInlineBox::buildLayoutInformation): Use the moved SVGInlineTextBox::buildLayoutInformation() method. (WebCore::SVGRootInlineBox::buildTextChunks): Fixed small style issue, remove unneeded parenthesis. (WebCore::SVGRootInlineBox::layoutTextChunks): Fix style issue in debugging code. * rendering/SVGRootInlineBox.h: Rename 'LastGlyphInfo' to 'SVGLastGlyphInfo' and move to SVGTextLayoutUtilities. (WebCore::SVGRootInlineBox::svgTextChunks): Inlined for speed. * rendering/SVGTextLayoutUtilities.cpp: Added. (WebCore::isVerticalWritingMode): (WebCore::dominantBaselineToShift): (WebCore::alignmentBaselineToShift): (WebCore::glyphOrientationToAngle): (WebCore::glyphOrientationIsMultiplyOf180Degrees): (WebCore::applyGlyphAdvanceAndShiftRespectingOrientation): (WebCore::topLeftPositionOfCharacterRange): (WebCore::cummulatedWidthOfInlineBoxCharacterRange): (WebCore::cummulatedHeightOfInlineBoxCharacterRange): (WebCore::svgTextRunForInlineTextBox): (WebCore::calculateCSSKerning): (WebCore::applySVGKerning): * rendering/SVGTextLayoutUtilities.h: Added. (WebCore::): (WebCore::SVGTextPaintInfo::SVGTextPaintInfo): (WebCore::SVGLastGlyphInfo::SVGLastGlyphInfo): 2010-05-11 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Move buildLayoutInformationForTextBox() from SVGRootInlineBox in SVGInlineTextBox where it belongs https://bugs.webkit.org/show_bug.cgi?id=38799 * platform/mac/svg/text/text-hkern-on-vertical-text-expected.checksum: Added. * platform/mac/svg/text/text-hkern-on-vertical-text-expected.png: Added. * platform/mac/svg/text/text-hkern-on-vertical-text-expected.txt: Added. * platform/mac/svg/text/text-vkern-on-horizontal-text-expected.checksum: Added. * platform/mac/svg/text/text-vkern-on-horizontal-text-expected.png: Added. * platform/mac/svg/text/text-vkern-on-horizontal-text-expected.txt: Added. * svg/text/text-hkern-on-vertical-text.svg: Added. * svg/text/text-vkern-on-horizontal-text.svg: Added. Canonical link: https://commits.webkit.org/50387@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@59148 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-05-11 12:11:09 +00:00
chunk 1 text run 1 at (0.00,0.00) startOffset 0 endOffset 4 width 25.00: "1234"