2011-03-14 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Dirk Schulze.
REGRESSION (r68976): Incorrect bidi rendering in SVG text
https://bugs.webkit.org/show_bug.cgi?id=53980
rework the test engine or SVG "text-intro" tests so we can turn them back on
https://bugs.webkit.org/show_bug.cgi?id=6524
svg/W3C-SVG-1.1/text-intro-0*.svg fail when MS Office fonts are present
https://bugs.webkit.org/show_bug.cgi?id=11662
svg/batik/text/textBiDi.svg failing
https://bugs.webkit.org/show_bug.cgi?id=17392
SVG bidi examples at w3C I18N WG tutorials are not rendered correctly.
https://bugs.webkit.org/show_bug.cgi?id=24374
Implement proper bidirectionality support for SVG text. The actual bidi support is working
fine, the problem is that SVG demands to reorder x/y/dx/dy/rotate value lists, in order to
main correspondance between the attributes and the potentially reordered text.
Land a new suite of SVG & i18n tests, covering unicode-bidi/direction and text-anchor support
with BiDi text (Arabic mixed with Latin) in LayoutTests/svg/W3C-I18N.
Enable long-disabled SVG BiDi tests, and international fonts support in svg/W3C-SVG-1.1
by providing a SVGFont replacment, replacing the need for MS Office Fonts to be present.
These tests have some value and we'd like to have them enabled again.
* platform/mac/svg/W3C-I18N: Added.
* platform/mac/svg/W3C-I18N/g-dirLTR-ubNone-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/g-dirLTR-ubNone-expected.png: Added.
* platform/mac/svg/W3C-I18N/g-dirLTR-ubNone-expected.txt: Added.
* platform/mac/svg/W3C-I18N/g-dirLTR-ubOverride-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/g-dirLTR-ubOverride-expected.png: Added.
* platform/mac/svg/W3C-I18N/g-dirLTR-ubOverride-expected.txt: Added.
* platform/mac/svg/W3C-I18N/g-dirRTL-ubNone-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/g-dirRTL-ubNone-expected.png: Added.
* platform/mac/svg/W3C-I18N/g-dirRTL-ubNone-expected.txt: Added.
* platform/mac/svg/W3C-I18N/g-dirRTL-ubOverride-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/g-dirRTL-ubOverride-expected.png: Added.
* platform/mac/svg/W3C-I18N/g-dirRTL-ubOverride-expected.txt: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.png: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.txt: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.png: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.txt: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.png: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.txt: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.png: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.txt: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.png: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.txt: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.png: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.txt: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.png: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.txt: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.png: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.txt: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.png: Added.
* platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.txt: Added.
* platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.png: Added.
* platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.txt: Added.
* platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.png: Added.
* platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.txt: Added.
* platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.png: Added.
* platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.txt: Added.
* platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.png: Added.
* platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.txt: Added.
* platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.png: Added.
* platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.txt: Added.
* platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.png: Added.
* platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.txt: Added.
* platform/mac/svg/W3C-I18N/text-anchor-no-markup-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/text-anchor-no-markup-expected.png: Added.
* platform/mac/svg/W3C-I18N/text-anchor-no-markup-expected.txt: Added.
* platform/mac/svg/W3C-I18N/text-dirLTR-ubNone-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/text-dirLTR-ubNone-expected.png: Added.
* platform/mac/svg/W3C-I18N/text-dirLTR-ubNone-expected.txt: Added.
* platform/mac/svg/W3C-I18N/text-dirLTR-ubOverride-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/text-dirLTR-ubOverride-expected.png: Added.
* platform/mac/svg/W3C-I18N/text-dirLTR-ubOverride-expected.txt: Added.
* platform/mac/svg/W3C-I18N/text-dirRTL-ubNone-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/text-dirRTL-ubNone-expected.png: Added.
* platform/mac/svg/W3C-I18N/text-dirRTL-ubNone-expected.txt: Added.
* platform/mac/svg/W3C-I18N/text-dirRTL-ubOverride-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/text-dirRTL-ubOverride-expected.png: Added.
* platform/mac/svg/W3C-I18N/text-dirRTL-ubOverride-expected.txt: Added.
* platform/mac/svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context-expected.png: Added.
* platform/mac/svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context-expected.txt: Added.
* platform/mac/svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context-expected.png: Added.
* platform/mac/svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context-expected.txt: Added.
* platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context-expected.png: Added.
* platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context-expected.txt: Added.
* platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context-expected.png: Added.
* platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context-expected.txt: Added.
* platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context-expected.png: Added.
* platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context-expected.txt: Added.
* platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context-expected.png: Added.
* platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context-expected.txt: Added.
* platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context-expected.png: Added.
* platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context-expected.txt: Added.
* platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context-expected.png: Added.
* platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context-expected.txt: Added.
* platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context-expected.png: Added.
* platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context-expected.txt: Added.
* platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context-expected.png: Added.
* platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context-expected.txt: Added.
* platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context-expected.png: Added.
* platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context-expected.txt: Added.
* platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context-expected.png: Added.
* platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context-expected.txt: Added.
* platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context-expected.png: Added.
* platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context-expected.txt: Added.
* platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context-expected.png: Added.
* platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context-expected.txt: Added.
* platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context-expected.png: Added.
* platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context-expected.txt: Added.
* platform/mac/svg/W3C-I18N/tspan-direction-ltr-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/tspan-direction-ltr-expected.png: Added.
* platform/mac/svg/W3C-I18N/tspan-direction-ltr-expected.txt: Added.
* platform/mac/svg/W3C-I18N/tspan-direction-rtl-expected.checksum: Added.
* platform/mac/svg/W3C-I18N/tspan-direction-rtl-expected.png: Added.
* platform/mac/svg/W3C-I18N/tspan-direction-rtl-expected.txt: Added.
* platform/mac/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.checksum: Added.
* platform/mac/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.png: Added.
* platform/mac/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.txt: Added.
* platform/mac/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.checksum: Added.
* platform/mac/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.png: Added.
* platform/mac/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.txt: Added.
* platform/mac/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.checksum: Added.
* platform/mac/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.png: Added.
* platform/mac/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.txt: Added.
* platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/animate-elem-06-t-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/text-align-08-b-expected.checksum: Added.
* platform/mac/svg/W3C-SVG-1.1/text-align-08-b-expected.png: Added.
* platform/mac/svg/W3C-SVG-1.1/text-align-08-b-expected.txt: Added.
* platform/mac/svg/W3C-SVG-1.1/text-fonts-03-t-expected.checksum: Added.
* platform/mac/svg/W3C-SVG-1.1/text-fonts-03-t-expected.png: Added.
* platform/mac/svg/W3C-SVG-1.1/text-fonts-03-t-expected.txt: Added.
* platform/mac/svg/W3C-SVG-1.1/text-intro-01-t-expected.checksum: Added.
* platform/mac/svg/W3C-SVG-1.1/text-intro-01-t-expected.png: Added.
* platform/mac/svg/W3C-SVG-1.1/text-intro-01-t-expected.txt: Added.
* platform/mac/svg/W3C-SVG-1.1/text-intro-02-b-expected.checksum: Added.
* platform/mac/svg/W3C-SVG-1.1/text-intro-02-b-expected.png: Added.
* platform/mac/svg/W3C-SVG-1.1/text-intro-02-b-expected.txt: Added.
* platform/mac/svg/W3C-SVG-1.1/text-intro-03-b-expected.checksum: Added.
* platform/mac/svg/W3C-SVG-1.1/text-intro-03-b-expected.png: Added.
* platform/mac/svg/W3C-SVG-1.1/text-intro-03-b-expected.txt: Added.
* platform/mac/svg/W3C-SVG-1.1/text-intro-04-t-expected.checksum: Added.
* platform/mac/svg/W3C-SVG-1.1/text-intro-04-t-expected.png: Added.
* platform/mac/svg/W3C-SVG-1.1/text-intro-04-t-expected.txt: Added.
* platform/mac/svg/text/bidi-reorder-value-lists-expected.checksum: Added.
* platform/mac/svg/text/bidi-reorder-value-lists-expected.png: Added.
* platform/mac/svg/text/bidi-reorder-value-lists-expected.txt: Added.
* platform/mac/svg/text/bidi-text-anchor-direction-expected.checksum: Added.
* platform/mac/svg/text/bidi-text-anchor-direction-expected.png: Added.
* platform/mac/svg/text/bidi-text-anchor-direction-expected.txt: Added.
* platform/mac/svg/text/bidi-text-query-expected.checksum: Added.
* platform/mac/svg/text/bidi-text-query-expected.png: Added.
* platform/mac/svg/text/bidi-text-query-expected.txt: Added.
* platform/mac/svg/text/bidi-tspans-expected.checksum: Added.
* platform/mac/svg/text/bidi-tspans-expected.png: Added.
* platform/mac/svg/text/bidi-tspans-expected.txt: Added.
* platform/mac/svg/text/small-fonts-2-expected.txt:
* platform/mac/svg/text/text-align-02-b-expected.txt:
* platform/mac/svg/text/text-align-04-b-expected.txt:
* svg/W3C-I18N: Added.
* svg/W3C-I18N/NOTE: Added.
* svg/W3C-I18N/g-dirLTR-ubNone.svg: Added.
* svg/W3C-I18N/g-dirLTR-ubOverride.svg: Added.
* svg/W3C-I18N/g-dirRTL-ubNone.svg: Added.
* svg/W3C-I18N/g-dirRTL-ubOverride.svg: Added.
* svg/W3C-I18N/resources: Added.
* svg/W3C-I18N/resources/img1.png: Added.
* svg/W3C-I18N/resources/img11.png: Added.
* svg/W3C-I18N/resources/img12.png: Added.
* svg/W3C-I18N/resources/img13.png: Added.
* svg/W3C-I18N/resources/img14.png: Added.
* svg/W3C-I18N/resources/img15.png: Added.
* svg/W3C-I18N/resources/img16.png: Added.
* svg/W3C-I18N/resources/img17.png: Added.
* svg/W3C-I18N/resources/img18.png: Added.
* svg/W3C-I18N/resources/img19.png: Added.
* svg/W3C-I18N/resources/img2.png: Added.
* svg/W3C-I18N/resources/img20.png: Added.
* svg/W3C-I18N/resources/img21.png: Added.
* svg/W3C-I18N/resources/img24.png: Added.
* svg/W3C-I18N/resources/img25.png: Added.
* svg/W3C-I18N/resources/img3.png: Added.
* svg/W3C-I18N/resources/img4.png: Added.
* svg/W3C-I18N/resources/img5.png: Added.
* svg/W3C-I18N/resources/tanchor-left-right.png: Added.
* svg/W3C-I18N/resources/tanchor-left.png: Added.
* svg/W3C-I18N/resources/tanchor-right.png: Added.
* svg/W3C-I18N/text-anchor-dirLTR-anchorEnd.svg: Added.
* svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle.svg: Added.
* svg/W3C-I18N/text-anchor-dirLTR-anchorStart.svg: Added.
* svg/W3C-I18N/text-anchor-dirNone-anchorEnd.svg: Added.
* svg/W3C-I18N/text-anchor-dirNone-anchorMiddle.svg: Added.
* svg/W3C-I18N/text-anchor-dirNone-anchorStart.svg: Added.
* svg/W3C-I18N/text-anchor-dirRTL-anchorEnd.svg: Added.
* svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle.svg: Added.
* svg/W3C-I18N/text-anchor-dirRTL-anchorStart.svg: Added.
* svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd.svg: Added.
* svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle.svg: Added.
* svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart.svg: Added.
* svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd.svg: Added.
* svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle.svg: Added.
* svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart.svg: Added.
* svg/W3C-I18N/text-anchor-no-markup.svg: Added.
* svg/W3C-I18N/text-dirLTR-ubNone.svg: Added.
* svg/W3C-I18N/text-dirLTR-ubOverride.svg: Added.
* svg/W3C-I18N/text-dirRTL-ubNone.svg: Added.
* svg/W3C-I18N/text-dirRTL-ubOverride.svg: Added.
* svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context.svg: Added.
* svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context.svg: Added.
* svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context.svg: Added.
* svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context.svg: Added.
* svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context.svg: Added.
* svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context.svg: Added.
* svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context.svg: Added.
* svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context.svg: Added.
* svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context.svg: Added.
* svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context.svg: Added.
* svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context.svg: Added.
* svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context.svg: Added.
* svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context.svg: Added.
* svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context.svg: Added.
* svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context.svg: Added.
* svg/W3C-I18N/tspan-direction-ltr.svg: Added.
* svg/W3C-I18N/tspan-direction-rtl.svg: Added.
* svg/W3C-SVG-1.1-SE/text-intro-02-b.svg: Added.
* svg/W3C-SVG-1.1-SE/text-intro-05-t.svg: Added.
* svg/W3C-SVG-1.1-SE/text-intro-09-b.svg: Added.
* svg/W3C-SVG-1.1/resources/SVGExotic.svg: Added.
* svg/W3C-SVG-1.1/text-align-08-b.svg: Copied from LayoutTests/svg/W3C-SVG-1.1/text-align-08-b.svg-disabled.
* svg/W3C-SVG-1.1/text-align-08-b.svg-disabled: Removed.
* svg/W3C-SVG-1.1/text-fonts-03-t.svg: Copied from LayoutTests/svg/W3C-SVG-1.1/text-fonts-03-t.svg-disabled.
* svg/W3C-SVG-1.1/text-fonts-03-t.svg-disabled: Removed.
* svg/W3C-SVG-1.1/text-intro-01-t.svg: Copied from LayoutTests/svg/W3C-SVG-1.1/text-intro-01-t.svg-disabled.
* svg/W3C-SVG-1.1/text-intro-01-t.svg-disabled: Removed.
* svg/W3C-SVG-1.1/text-intro-02-b.svg: Copied from LayoutTests/svg/W3C-SVG-1.1/text-intro-02-b.svg-disabled.
* svg/W3C-SVG-1.1/text-intro-02-b.svg-disabled: Removed.
* svg/W3C-SVG-1.1/text-intro-03-b.svg: Copied from LayoutTests/svg/W3C-SVG-1.1/text-intro-03-b.svg-disabled.
* svg/W3C-SVG-1.1/text-intro-03-b.svg-disabled: Removed.
* svg/W3C-SVG-1.1/text-intro-04-t.svg: Copied from LayoutTests/svg/W3C-SVG-1.1/text-intro-04-t.svg-disabled.
* svg/W3C-SVG-1.1/text-intro-04-t.svg-disabled: Removed.
* svg/custom/glyph-transformation-with-hkern-expected.txt:
* svg/text/bidi-reorder-value-lists.svg: Added.
* svg/text/bidi-text-anchor-direction.svg: Added.
* svg/text/bidi-text-query.svg: Added.
* svg/text/bidi-tspans.svg: Added.
2011-03-14 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Dirk Schulze.
REGRESSION (r68976): Incorrect bidi rendering in SVG text
https://bugs.webkit.org/show_bug.cgi?id=53980
rework the test engine or SVG "text-intro" tests so we can turn them back on
https://bugs.webkit.org/show_bug.cgi?id=6524
svg/W3C-SVG-1.1/text-intro-0*.svg fail when MS Office fonts are present
https://bugs.webkit.org/show_bug.cgi?id=11662
svg/batik/text/textBiDi.svg failing
https://bugs.webkit.org/show_bug.cgi?id=17392
SVG bidi examples at w3C I18N WG tutorials are not rendered correctly.
https://bugs.webkit.org/show_bug.cgi?id=24374
Implement proper bidirectionality support for SVG text.
BiDi didn't work properly until now, because the x/y/dx/dy/rotate value lists are stored in logical order (aka. in
the order the characters appear in the markup), and when laying out bidi text, we associated the current character
in visual order with the current x/y/dx/dy/rotate value in logical order, messing up RTL text layout.
The BiDi algorithm itself, inherited by RenderBlockLineLayout, works just fine, the inline box tree is correct.
Long story:
Before the inline box tree is created, SVGTextLayoutAttributesBuilder builds a list of x/y/dx/dy/rotate/<text metrics>
for each RenderSVGInlineText* object, called SVGTextLayoutAttributes. This happens in logical order, as specified in
the markup. <text x="10 20" y="10">abcdef</text> creates a SVGTextLayoutAttributes object in the renderer associated with
"abcdef" that contains (10, 20) for x, (10) for y, the dx/dy/rotate lists are empty, and the SVGTextMetrics list holds 6
width/height values for each of the glyphs (and some other infromation, see SVGTextMetrics class).
The SVGTextLayoutAttributes object is _used by_ RenderBlockLineLayout when applying the BiDi algorithm as SVG demands
that BiDi reordering does not happen across text chunks (a text chunk is defined by an absolute position, eg. x="10").
To summarize: SVGTextLayoutAttributes are stored in all RenderSVGInlineText renderers, caching the metrics of all
characters, their position based on the DOM attributes x/y/dx/dy/rotate. Using that information it's possible to
determine whether a position starts a new text chunk, and that's used by RenderBlockLineLayout to create the
inline box tree, in _visual order_, as it will appear on screen.
After the inline box tree is created, the SVGRootInlineBox traverses its children in visual order and feeds the
found text boxes to SVGTextLayoutEngine, which lays out the text on a line or a path, according to SVG text layout
rules. For each character of the passed in InlineTextBox, it determines the x/y/dx/dy/rotate value, and the position
in the <text metrics> list of the renderer. The problem here is that the passed in text boxes are in visual order,
the x/y/.. lists are all in logical order.
Example: <text direction="rtl" unicde-bidi="bidi-override" x="10 20">abcdef</text>, reverse the text direction:
the visual order now is: "fedcba", where 'f' should be associated with x="10" and 'e' with x="20".
Fix that problem, by computing a list of text boxes in _logical_ order in advance and pass it to SVGTextLayoutEngine,
before it starts processing the boxes in visual order, fed by SVGRootInlineBox. When laying oout text, we can now
process text in visual order, but grab the x/y/.. coordinates from the renderer in logical order.
Some more work was needed to truly fix Arabic. The SVGTextLayoutAttributesBuilder measured all characters isolated,
which is not a problem with latin text, but results in wrong advances for Arabic text, as isolated forms, instead of
shaped forms are measured. This broke text-anchor support, text queries on Arabic text etc. Fixed now, covered by
dozens of new tests.
Tests: svg/W3C-I18N/g-dirLTR-ubNone.svg
svg/W3C-I18N/g-dirLTR-ubOverride.svg
svg/W3C-I18N/g-dirRTL-ubNone.svg
svg/W3C-I18N/g-dirRTL-ubOverride.svg
svg/W3C-I18N/text-anchor-dirLTR-anchorEnd.svg
svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle.svg
svg/W3C-I18N/text-anchor-dirLTR-anchorStart.svg
svg/W3C-I18N/text-anchor-dirNone-anchorEnd.svg
svg/W3C-I18N/text-anchor-dirNone-anchorMiddle.svg
svg/W3C-I18N/text-anchor-dirNone-anchorStart.svg
svg/W3C-I18N/text-anchor-dirRTL-anchorEnd.svg
svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle.svg
svg/W3C-I18N/text-anchor-dirRTL-anchorStart.svg
svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd.svg
svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle.svg
svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart.svg
svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd.svg
svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle.svg
svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart.svg
svg/W3C-I18N/text-anchor-no-markup.svg
svg/W3C-I18N/text-dirLTR-ubNone.svg
svg/W3C-I18N/text-dirLTR-ubOverride.svg
svg/W3C-I18N/text-dirRTL-ubNone.svg
svg/W3C-I18N/text-dirRTL-ubOverride.svg
svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context.svg
svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context.svg
svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context.svg
svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context.svg
svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context.svg
svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context.svg
svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context.svg
svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context.svg
svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context.svg
svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context.svg
svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context.svg
svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context.svg
svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context.svg
svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context.svg
svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context.svg
svg/W3C-I18N/tspan-direction-ltr.svg
svg/W3C-I18N/tspan-direction-rtl.svg
svg/W3C-SVG-1.1-SE/text-intro-02-b.svg
svg/W3C-SVG-1.1-SE/text-intro-05-t.svg
svg/W3C-SVG-1.1-SE/text-intro-09-b.svg
svg/W3C-SVG-1.1/text-align-08-b.svg
svg/W3C-SVG-1.1/text-fonts-03-t.svg
svg/W3C-SVG-1.1/text-intro-01-t.svg
svg/W3C-SVG-1.1/text-intro-02-b.svg
svg/W3C-SVG-1.1/text-intro-03-b.svg
svg/W3C-SVG-1.1/text-intro-04-t.svg
svg/text/bidi-reorder-value-lists.svg
svg/text/bidi-text-anchor-direction.svg
svg/text/bidi-text-query.svg
svg/text/bidi-tspans.svg
* rendering/RenderBlockLineLayout.cpp: Remove hack that forced LTR support when unicode-bidi="normal" and handling SVG text.
(WebCore::RenderBlock::determineStartPosition):
* rendering/svg/SVGInlineTextBox.cpp: s/fragment.positionListOffset/fragment.characterOffset/
(WebCore::SVGInlineTextBox::offsetForPositionInFragment):
(WebCore::SVGInlineTextBox::constructTextRun):
(WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
* rendering/svg/SVGRenderTreeAsText.cpp: Ditto.
(WebCore::writeSVGInlineTextBox):
* rendering/svg/SVGRootInlineBox.cpp: Add new buildTextBoxListInLogicalOrder(), collecting all text boxes recursively in logical order (aka. as specified in markup).
This is needed as we have to process x/y/dx/dy/rotate value lists of text/tspan/.. elements in logical order, not in visual
order as the characters are presented on screen.
(WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
(WebCore::SVGRootInlineBox::buildTextBoxListInLogicalOrder):
(WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
* rendering/svg/SVGRootInlineBox.h:
* rendering/svg/SVGTextChunk.cpp: Cleanup code, minimize SVGTextChunks memory consumption.
(WebCore::SVGTextChunk::SVGTextChunk): A text chunk now know whether its base progress direction is left-to-right or right-to-left.
(WebCore::SVGTextChunk::calculateLength):
(WebCore::SVGTextChunk::calculateTextAnchorShift): Make text-anchor direction aware. text-anchor="start/end" meaning depends on the context (ltr vs. rtl).
* rendering/svg/SVGTextChunk.h: Adapt code, merging three members into a bitfield.
(WebCore::SVGTextChunk::isVerticalText):
(WebCore::SVGTextChunk::hasDesiredTextLength):
(WebCore::SVGTextChunk::hasTextAnchor):
(WebCore::SVGTextChunk::hasLengthAdjustSpacing):
(WebCore::SVGTextChunk::hasLengthAdjustSpacingAndGlyphs):
* rendering/svg/SVGTextChunkBuilder.cpp: Adapt to SVGTextChunk code changes.
(WebCore::SVGTextChunkBuilder::addTextChunk):
(WebCore::SVGTextChunkBuilder::processTextChunk):
* rendering/svg/SVGTextFragment.h: Add metricsListOffset, needed only while laying out text.
(WebCore::SVGTextFragment::SVGTextFragment): Rename positionListOffset to characterOffset, as it describes an offset in the textRenderer->characters() array.
* rendering/svg/SVGTextLayoutAttributesBuilder.cpp
(WebCore::SVGTextLayoutAttributesBuilder::propagateLayoutAttributes): Fix measuring Arabic text in LTR/RTL modes. Assure that each SVGTextMetrics object
that we cache, refers to the _rendered_ character. For Arabic text that means, that we're
measuring the shaped width of the glyph, not the glyph in its isolated form. Without that
fix reordering boxes containing Arabic is wrong.
* rendering/svg/SVGTextLayoutEngine.cpp: SVGTextLayoutEngine is fed with text boxes to be laid out in _visual_ order, left-to-right, after the BiDi algorithm
has been applied by RenderBlockLineLayout to create the inline box tree. The coordinates lists x/y/dx/dy/rotate have
to be processed in _logical_ order. SVGRootInlineBox now passes a list of text boxes in logical order to SVGTextLayoutEngine,
to assure it grabs the coordinates from the correct InlineTextBox. See examples at the top of the ChangeLog.
(WebCore::SVGTextLayoutEngine::SVGTextLayoutEngine):
(WebCore::SVGTextLayoutEngine::recordTextFragment): No need to measure text here anymore, SVGTextLayoutAttributesBuilder now provides exact advances for each glyph.
The width of a SVGTextFragment is always equal to the sum of each glyph advance. (This was not the case for
Arabic until now.)
(WebCore::SVGTextLayoutEngine::finalizeTransformMatrices):
(WebCore::SVGTextLayoutEngine::nextLogicalBoxAndOffset): Computes the next logical box and the offset to the next coordinate value in its position list.
(WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
* rendering/svg/SVGTextLayoutEngine.h: Add CharacterRange helper struct.
(WebCore::SVGTextLayoutEngine::CharacterRange::CharacterRange):
* rendering/svg/SVGTextMetrics.cpp: Remove unused measureAllCharactersIndividually() method.
(WebCore::constructTextRun): Pass direction and unicode-bidi="override" values to the TextRun, otherwhise LTR is always asumed.
* rendering/svg/SVGTextMetrics.h:
(WebCore::SVGTextMetrics::setWidth): Add private setter, only SVGTextLayoutAttributesBuilder is allowed to modify the metrics (to fix up glyph widths for Arabic).
* rendering/svg/SVGTextQuery.cpp: s/fragment.positionListOffset/fragment.characterOffset/
(WebCore::SVGTextQuery::subStringLengthCallback):
(WebCore::SVGTextQuery::startPositionOfCharacterCallback):
(WebCore::SVGTextQuery::endPositionOfCharacterCallback):
(WebCore::calculateGlyphBoundaries):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 27072a3..0f3f75d 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,289 @@
+2011-03-14 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ REGRESSION (r68976): Incorrect bidi rendering in SVG text
+ https://bugs.webkit.org/show_bug.cgi?id=53980
+
+ rework the test engine or SVG "text-intro" tests so we can turn them back on
+ https://bugs.webkit.org/show_bug.cgi?id=6524
+
+ svg/W3C-SVG-1.1/text-intro-0*.svg fail when MS Office fonts are present
+ https://bugs.webkit.org/show_bug.cgi?id=11662
+
+ svg/batik/text/textBiDi.svg failing
+ https://bugs.webkit.org/show_bug.cgi?id=17392
+
+ SVG bidi examples at w3C I18N WG tutorials are not rendered correctly.
+ https://bugs.webkit.org/show_bug.cgi?id=24374
+
+ Implement proper bidirectionality support for SVG text. The actual bidi support is working
+ fine, the problem is that SVG demands to reorder x/y/dx/dy/rotate value lists, in order to
+ main correspondance between the attributes and the potentially reordered text.
+
+ Land a new suite of SVG & i18n tests, covering unicode-bidi/direction and text-anchor support
+ with BiDi text (Arabic mixed with Latin) in LayoutTests/svg/W3C-I18N.
+
+ Enable long-disabled SVG BiDi tests, and international fonts support in svg/W3C-SVG-1.1
+ by providing a SVGFont replacment, replacing the need for MS Office Fonts to be present.
+ These tests have some value and we'd like to have them enabled again.
+
+ * platform/mac/svg/W3C-I18N: Added.
+ * platform/mac/svg/W3C-I18N/g-dirLTR-ubNone-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/g-dirLTR-ubNone-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/g-dirLTR-ubNone-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/g-dirLTR-ubOverride-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/g-dirLTR-ubOverride-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/g-dirLTR-ubOverride-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/g-dirRTL-ubNone-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/g-dirRTL-ubNone-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/g-dirRTL-ubNone-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/g-dirRTL-ubOverride-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/g-dirRTL-ubOverride-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/g-dirRTL-ubOverride-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-no-markup-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-no-markup-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/text-anchor-no-markup-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/text-dirLTR-ubNone-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/text-dirLTR-ubNone-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/text-dirLTR-ubNone-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/text-dirLTR-ubOverride-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/text-dirLTR-ubOverride-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/text-dirLTR-ubOverride-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/text-dirRTL-ubNone-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/text-dirRTL-ubNone-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/text-dirRTL-ubNone-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/text-dirRTL-ubOverride-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/text-dirRTL-ubOverride-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/text-dirRTL-ubOverride-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/tspan-direction-ltr-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/tspan-direction-ltr-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/tspan-direction-ltr-expected.txt: Added.
+ * platform/mac/svg/W3C-I18N/tspan-direction-rtl-expected.checksum: Added.
+ * platform/mac/svg/W3C-I18N/tspan-direction-rtl-expected.png: Added.
+ * platform/mac/svg/W3C-I18N/tspan-direction-rtl-expected.txt: Added.
+ * platform/mac/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.checksum: Added.
+ * platform/mac/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.png: Added.
+ * platform/mac/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.txt: Added.
+ * platform/mac/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.checksum: Added.
+ * platform/mac/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.png: Added.
+ * platform/mac/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.txt: Added.
+ * platform/mac/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.checksum: Added.
+ * platform/mac/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.png: Added.
+ * platform/mac/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.txt: Added.
+ * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt:
+ * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt:
+ * platform/mac/svg/W3C-SVG-1.1/animate-elem-06-t-expected.txt:
+ * platform/mac/svg/W3C-SVG-1.1/text-align-08-b-expected.checksum: Added.
+ * platform/mac/svg/W3C-SVG-1.1/text-align-08-b-expected.png: Added.
+ * platform/mac/svg/W3C-SVG-1.1/text-align-08-b-expected.txt: Added.
+ * platform/mac/svg/W3C-SVG-1.1/text-fonts-03-t-expected.checksum: Added.
+ * platform/mac/svg/W3C-SVG-1.1/text-fonts-03-t-expected.png: Added.
+ * platform/mac/svg/W3C-SVG-1.1/text-fonts-03-t-expected.txt: Added.
+ * platform/mac/svg/W3C-SVG-1.1/text-intro-01-t-expected.checksum: Added.
+ * platform/mac/svg/W3C-SVG-1.1/text-intro-01-t-expected.png: Added.
+ * platform/mac/svg/W3C-SVG-1.1/text-intro-01-t-expected.txt: Added.
+ * platform/mac/svg/W3C-SVG-1.1/text-intro-02-b-expected.checksum: Added.
+ * platform/mac/svg/W3C-SVG-1.1/text-intro-02-b-expected.png: Added.
+ * platform/mac/svg/W3C-SVG-1.1/text-intro-02-b-expected.txt: Added.
+ * platform/mac/svg/W3C-SVG-1.1/text-intro-03-b-expected.checksum: Added.
+ * platform/mac/svg/W3C-SVG-1.1/text-intro-03-b-expected.png: Added.
+ * platform/mac/svg/W3C-SVG-1.1/text-intro-03-b-expected.txt: Added.
+ * platform/mac/svg/W3C-SVG-1.1/text-intro-04-t-expected.checksum: Added.
+ * platform/mac/svg/W3C-SVG-1.1/text-intro-04-t-expected.png: Added.
+ * platform/mac/svg/W3C-SVG-1.1/text-intro-04-t-expected.txt: Added.
+ * platform/mac/svg/text/bidi-reorder-value-lists-expected.checksum: Added.
+ * platform/mac/svg/text/bidi-reorder-value-lists-expected.png: Added.
+ * platform/mac/svg/text/bidi-reorder-value-lists-expected.txt: Added.
+ * platform/mac/svg/text/bidi-text-anchor-direction-expected.checksum: Added.
+ * platform/mac/svg/text/bidi-text-anchor-direction-expected.png: Added.
+ * platform/mac/svg/text/bidi-text-anchor-direction-expected.txt: Added.
+ * platform/mac/svg/text/bidi-text-query-expected.checksum: Added.
+ * platform/mac/svg/text/bidi-text-query-expected.png: Added.
+ * platform/mac/svg/text/bidi-text-query-expected.txt: Added.
+ * platform/mac/svg/text/bidi-tspans-expected.checksum: Added.
+ * platform/mac/svg/text/bidi-tspans-expected.png: Added.
+ * platform/mac/svg/text/bidi-tspans-expected.txt: Added.
+ * platform/mac/svg/text/small-fonts-2-expected.txt:
+ * platform/mac/svg/text/text-align-02-b-expected.txt:
+ * platform/mac/svg/text/text-align-04-b-expected.txt:
+ * svg/W3C-I18N: Added.
+ * svg/W3C-I18N/NOTE: Added.
+ * svg/W3C-I18N/g-dirLTR-ubNone.svg: Added.
+ * svg/W3C-I18N/g-dirLTR-ubOverride.svg: Added.
+ * svg/W3C-I18N/g-dirRTL-ubNone.svg: Added.
+ * svg/W3C-I18N/g-dirRTL-ubOverride.svg: Added.
+ * svg/W3C-I18N/resources: Added.
+ * svg/W3C-I18N/resources/img1.png: Added.
+ * svg/W3C-I18N/resources/img11.png: Added.
+ * svg/W3C-I18N/resources/img12.png: Added.
+ * svg/W3C-I18N/resources/img13.png: Added.
+ * svg/W3C-I18N/resources/img14.png: Added.
+ * svg/W3C-I18N/resources/img15.png: Added.
+ * svg/W3C-I18N/resources/img16.png: Added.
+ * svg/W3C-I18N/resources/img17.png: Added.
+ * svg/W3C-I18N/resources/img18.png: Added.
+ * svg/W3C-I18N/resources/img19.png: Added.
+ * svg/W3C-I18N/resources/img2.png: Added.
+ * svg/W3C-I18N/resources/img20.png: Added.
+ * svg/W3C-I18N/resources/img21.png: Added.
+ * svg/W3C-I18N/resources/img24.png: Added.
+ * svg/W3C-I18N/resources/img25.png: Added.
+ * svg/W3C-I18N/resources/img3.png: Added.
+ * svg/W3C-I18N/resources/img4.png: Added.
+ * svg/W3C-I18N/resources/img5.png: Added.
+ * svg/W3C-I18N/resources/tanchor-left-right.png: Added.
+ * svg/W3C-I18N/resources/tanchor-left.png: Added.
+ * svg/W3C-I18N/resources/tanchor-right.png: Added.
+ * svg/W3C-I18N/text-anchor-dirLTR-anchorEnd.svg: Added.
+ * svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle.svg: Added.
+ * svg/W3C-I18N/text-anchor-dirLTR-anchorStart.svg: Added.
+ * svg/W3C-I18N/text-anchor-dirNone-anchorEnd.svg: Added.
+ * svg/W3C-I18N/text-anchor-dirNone-anchorMiddle.svg: Added.
+ * svg/W3C-I18N/text-anchor-dirNone-anchorStart.svg: Added.
+ * svg/W3C-I18N/text-anchor-dirRTL-anchorEnd.svg: Added.
+ * svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle.svg: Added.
+ * svg/W3C-I18N/text-anchor-dirRTL-anchorStart.svg: Added.
+ * svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd.svg: Added.
+ * svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle.svg: Added.
+ * svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart.svg: Added.
+ * svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd.svg: Added.
+ * svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle.svg: Added.
+ * svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart.svg: Added.
+ * svg/W3C-I18N/text-anchor-no-markup.svg: Added.
+ * svg/W3C-I18N/text-dirLTR-ubNone.svg: Added.
+ * svg/W3C-I18N/text-dirLTR-ubOverride.svg: Added.
+ * svg/W3C-I18N/text-dirRTL-ubNone.svg: Added.
+ * svg/W3C-I18N/text-dirRTL-ubOverride.svg: Added.
+ * svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context.svg: Added.
+ * svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context.svg: Added.
+ * svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context.svg: Added.
+ * svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context.svg: Added.
+ * svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context.svg: Added.
+ * svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context.svg: Added.
+ * svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context.svg: Added.
+ * svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context.svg: Added.
+ * svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context.svg: Added.
+ * svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context.svg: Added.
+ * svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context.svg: Added.
+ * svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context.svg: Added.
+ * svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context.svg: Added.
+ * svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context.svg: Added.
+ * svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context.svg: Added.
+ * svg/W3C-I18N/tspan-direction-ltr.svg: Added.
+ * svg/W3C-I18N/tspan-direction-rtl.svg: Added.
+ * svg/W3C-SVG-1.1-SE/text-intro-02-b.svg: Added.
+ * svg/W3C-SVG-1.1-SE/text-intro-05-t.svg: Added.
+ * svg/W3C-SVG-1.1-SE/text-intro-09-b.svg: Added.
+ * svg/W3C-SVG-1.1/resources/SVGExotic.svg: Added.
+ * svg/W3C-SVG-1.1/text-align-08-b.svg: Copied from LayoutTests/svg/W3C-SVG-1.1/text-align-08-b.svg-disabled.
+ * svg/W3C-SVG-1.1/text-align-08-b.svg-disabled: Removed.
+ * svg/W3C-SVG-1.1/text-fonts-03-t.svg: Copied from LayoutTests/svg/W3C-SVG-1.1/text-fonts-03-t.svg-disabled.
+ * svg/W3C-SVG-1.1/text-fonts-03-t.svg-disabled: Removed.
+ * svg/W3C-SVG-1.1/text-intro-01-t.svg: Copied from LayoutTests/svg/W3C-SVG-1.1/text-intro-01-t.svg-disabled.
+ * svg/W3C-SVG-1.1/text-intro-01-t.svg-disabled: Removed.
+ * svg/W3C-SVG-1.1/text-intro-02-b.svg: Copied from LayoutTests/svg/W3C-SVG-1.1/text-intro-02-b.svg-disabled.
+ * svg/W3C-SVG-1.1/text-intro-02-b.svg-disabled: Removed.
+ * svg/W3C-SVG-1.1/text-intro-03-b.svg: Copied from LayoutTests/svg/W3C-SVG-1.1/text-intro-03-b.svg-disabled.
+ * svg/W3C-SVG-1.1/text-intro-03-b.svg-disabled: Removed.
+ * svg/W3C-SVG-1.1/text-intro-04-t.svg: Copied from LayoutTests/svg/W3C-SVG-1.1/text-intro-04-t.svg-disabled.
+ * svg/W3C-SVG-1.1/text-intro-04-t.svg-disabled: Removed.
+ * svg/custom/glyph-transformation-with-hkern-expected.txt:
+ * svg/text/bidi-reorder-value-lists.svg: Added.
+ * svg/text/bidi-text-anchor-direction.svg: Added.
+ * svg/text/bidi-text-query.svg: Added.
+ * svg/text/bidi-tspans.svg: Added.
+
2011-03-15 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/g-dirLTR-ubNone-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirLTR-ubNone-expected.checksum
new file mode 100644
index 0000000..5a24d8c
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirLTR-ubNone-expected.checksum
@@ -0,0 +1 @@
+aa4249f50f933aec6d5d9a88fb9db993
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/g-dirLTR-ubNone-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirLTR-ubNone-expected.png
new file mode 100644
index 0000000..030193c
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirLTR-ubNone-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/g-dirLTR-ubNone-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirLTR-ubNone-expected.txt
new file mode 100644
index 0000000..562a3bf
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirLTR-ubNone-expected.txt
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGContainer {g} at (175,221) size 417x36
+ RenderSVGText {text} at (105,133) size 250x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 250x21
+ chunk 1 (middle anchor) text run 1 at (105.20,150.00) startOffset 0 endOffset 4 width 45.00: "W3C "
+ chunk 1 (middle anchor) text run 1 at (150.20,150.00) startOffset 0 endOffset 12 width 71.40 RTL: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644}"
+ chunk 1 (middle anchor) text run 1 at (221.60,150.00) startOffset 0 endOffset 15 width 133.20: " dirLTR ubNone!"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/g-dirLTR-ubOverride-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirLTR-ubOverride-expected.checksum
new file mode 100644
index 0000000..ee14c6a
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirLTR-ubOverride-expected.checksum
@@ -0,0 +1 @@
+ce6ecbaff1afa58a026490d6f3921127
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/g-dirLTR-ubOverride-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirLTR-ubOverride-expected.png
new file mode 100644
index 0000000..706c7ec
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirLTR-ubOverride-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/g-dirLTR-ubOverride-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirLTR-ubOverride-expected.txt
new file mode 100644
index 0000000..ae1862f
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirLTR-ubOverride-expected.txt
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGContainer {g} at (153,221) size 461x36
+ RenderSVGText {text} at (92,133) size 276x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 276x21
+ chunk 1 (middle anchor) text run 1 at (92.30,150.00) startOffset 0 endOffset 4 width 45.00: "W3C "
+ chunk 1 (middle anchor) text run 1 at (137.30,150.00) startOffset 0 endOffset 12 width 71.40 RTL: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644}"
+ chunk 1 (middle anchor) text run 1 at (208.70,150.00) startOffset 0 endOffset 19 width 159.00: " dirLTR ubOverride!"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/g-dirRTL-ubNone-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirRTL-ubNone-expected.checksum
new file mode 100644
index 0000000..680c91d
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirRTL-ubNone-expected.checksum
@@ -0,0 +1 @@
+a1c32db0276a1a0077b52ce5c2c7f81d
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/g-dirRTL-ubNone-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirRTL-ubNone-expected.png
new file mode 100644
index 0000000..dec1ea5
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirRTL-ubNone-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/g-dirRTL-ubNone-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirRTL-ubNone-expected.txt
new file mode 100644
index 0000000..a632fd4
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirRTL-ubNone-expected.txt
@@ -0,0 +1,26 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGContainer {g} at (175,221) size 417x36
+ RenderSVGText {text} at (105,133) size 250x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 250x21
+ chunk 1 (middle anchor) text run 1 at (105.20,150.00) startOffset 0 endOffset 1 width 4.80 RTL: "!"
+ chunk 1 (middle anchor) text run 1 at (110.00,150.00) startOffset 0 endOffset 13 width 123.60: "dirRTL ubNone"
+ chunk 1 (middle anchor) text run 1 at (233.60,150.00) startOffset 0 endOffset 14 width 81.00 RTL: " \x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644} "
+ chunk 1 (middle anchor) text run 1 at (314.60,150.00) startOffset 0 endOffset 3 width 40.20: "W3C"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/g-dirRTL-ubOverride-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirRTL-ubOverride-expected.checksum
new file mode 100644
index 0000000..41cca9b
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirRTL-ubOverride-expected.checksum
@@ -0,0 +1 @@
+8f14907c26b44d76e278c07d6e1c6933
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/g-dirRTL-ubOverride-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirRTL-ubOverride-expected.png
new file mode 100644
index 0000000..3ca2fd8
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirRTL-ubOverride-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/g-dirRTL-ubOverride-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirRTL-ubOverride-expected.txt
new file mode 100644
index 0000000..9815ce2
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/g-dirRTL-ubOverride-expected.txt
@@ -0,0 +1,26 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGContainer {g} at (153,221) size 461x36
+ RenderSVGText {text} at (92,133) size 276x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 276x21
+ chunk 1 (middle anchor) text run 1 at (92.30,150.00) startOffset 0 endOffset 1 width 4.80 RTL: "!"
+ chunk 1 (middle anchor) text run 1 at (97.10,150.00) startOffset 0 endOffset 17 width 149.40: "dirRTL ubOverride"
+ chunk 1 (middle anchor) text run 1 at (246.50,150.00) startOffset 0 endOffset 14 width 81.00 RTL: " \x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644} "
+ chunk 1 (middle anchor) text run 1 at (327.50,150.00) startOffset 0 endOffset 3 width 40.20: "W3C"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.checksum
new file mode 100644
index 0000000..438272c
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.checksum
@@ -0,0 +1 @@
+b8347a378d2080e3d0478ae10ac7b52b
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.png
new file mode 100644
index 0000000..3471029
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.txt
new file mode 100644
index 0000000..a07f011
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.txt
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (60,183) size 434x214
+ RenderSVGText {text} at (36,150) size 194x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 194x13
+ chunk 1 (end anchor) text run 1 at (36.20,160.00) startOffset 0 endOffset 42 width 193.80: "Making the world wide web truly world wide"
+ RenderSVGText {text} at (78,185) size 152x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 152x13
+ chunk 1 (end anchor) text run 1 at (78.80,195.00) startOffset 0 endOffset 31 width 151.20 RTL: "\x{5DC}\x{5D9}\x{5E6}\x{5D5}\x{5E8} \x{5DE}\x{5D4}\x{5E8}\x{5E9}\x{5EA} \x{5E8}\x{5E9}\x{5EA} \x{5DB}\x{5DC}\x{5DC} \x{5E2}\x{5D5}\x{5DC}\x{5DE}\x{5D9}\x{5EA} \x{5D1}\x{5D0}\x{5DE}\x{5EA}"
+ RenderSVGText {text} at (110,225) size 120x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 120x13
+ chunk 1 (end anchor) text run 1 at (110.60,235.00) startOffset 0 endOffset 38 width 119.40 RTL: "\x{62C}\x{639}\x{644} \x{634}\x{628}\x{643}\x{629} \x{627}\x{644}\x{648}\x{64A}\x{628} \x{627}\x{644}\x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{62D}\x{642}\x{64B}\x{651}\x{627}"
+ RenderSVGImage {image} at (280,183) size 214x44
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.4 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.checksum
new file mode 100644
index 0000000..015b3a9
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.checksum
@@ -0,0 +1 @@
+2c41db060dc5d0b7970642ccde29d622
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.png
new file mode 100644
index 0000000..ab2780a
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.txt
new file mode 100644
index 0000000..881de4e
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.txt
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (221,183) size 324x214
+ RenderSVGText {text} at (133,150) size 194x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 194x13
+ chunk 1 (middle anchor) text run 1 at (133.10,160.00) startOffset 0 endOffset 42 width 193.80: "Making the world wide web truly world wide"
+ RenderSVGText {text} at (154,185) size 152x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 152x13
+ chunk 1 (middle anchor) text run 1 at (154.40,195.00) startOffset 0 endOffset 31 width 151.20 RTL: "\x{5DC}\x{5D9}\x{5E6}\x{5D5}\x{5E8} \x{5DE}\x{5D4}\x{5E8}\x{5E9}\x{5EA} \x{5E8}\x{5E9}\x{5EA} \x{5DB}\x{5DC}\x{5DC} \x{5E2}\x{5D5}\x{5DC}\x{5DE}\x{5D9}\x{5EA} \x{5D1}\x{5D0}\x{5DE}\x{5EA}"
+ RenderSVGText {text} at (170,225) size 120x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 120x13
+ chunk 1 (middle anchor) text run 1 at (170.30,235.00) startOffset 0 endOffset 38 width 119.40 RTL: "\x{62C}\x{639}\x{644} \x{634}\x{628}\x{643}\x{629} \x{627}\x{644}\x{648}\x{64A}\x{628} \x{627}\x{644}\x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{62D}\x{642}\x{64B}\x{651}\x{627}"
+ RenderSVGImage {image} at (280,183) size 214x44
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.4 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.checksum
new file mode 100644
index 0000000..55a7205
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.checksum
@@ -0,0 +1 @@
+10007031cdbe14637c1913dbe7dd6b06
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.png
new file mode 100644
index 0000000..6255ae1
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.txt
new file mode 100644
index 0000000..c538fe6
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.txt
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (280,183) size 427x214
+ RenderSVGText {text} at (230,150) size 194x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 194x13
+ chunk 1 text run 1 at (230.00,160.00) startOffset 0 endOffset 42 width 193.80: "Making the world wide web truly world wide"
+ RenderSVGText {text} at (230,185) size 152x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 152x13
+ chunk 1 text run 1 at (230.00,195.00) startOffset 0 endOffset 31 width 151.20 RTL: "\x{5DC}\x{5D9}\x{5E6}\x{5D5}\x{5E8} \x{5DE}\x{5D4}\x{5E8}\x{5E9}\x{5EA} \x{5E8}\x{5E9}\x{5EA} \x{5DB}\x{5DC}\x{5DC} \x{5E2}\x{5D5}\x{5DC}\x{5DE}\x{5D9}\x{5EA} \x{5D1}\x{5D0}\x{5DE}\x{5EA}"
+ RenderSVGText {text} at (230,225) size 120x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 120x13
+ chunk 1 text run 1 at (230.00,235.00) startOffset 0 endOffset 38 width 119.40 RTL: "\x{62C}\x{639}\x{644} \x{634}\x{628}\x{643}\x{629} \x{627}\x{644}\x{648}\x{64A}\x{628} \x{627}\x{644}\x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{62D}\x{642}\x{64B}\x{651}\x{627}"
+ RenderSVGImage {image} at (280,183) size 214x44
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.4 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.checksum
new file mode 100644
index 0000000..438272c
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.checksum
@@ -0,0 +1 @@
+b8347a378d2080e3d0478ae10ac7b52b
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.png
new file mode 100644
index 0000000..3471029
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.txt
new file mode 100644
index 0000000..a07f011
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.txt
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (60,183) size 434x214
+ RenderSVGText {text} at (36,150) size 194x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 194x13
+ chunk 1 (end anchor) text run 1 at (36.20,160.00) startOffset 0 endOffset 42 width 193.80: "Making the world wide web truly world wide"
+ RenderSVGText {text} at (78,185) size 152x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 152x13
+ chunk 1 (end anchor) text run 1 at (78.80,195.00) startOffset 0 endOffset 31 width 151.20 RTL: "\x{5DC}\x{5D9}\x{5E6}\x{5D5}\x{5E8} \x{5DE}\x{5D4}\x{5E8}\x{5E9}\x{5EA} \x{5E8}\x{5E9}\x{5EA} \x{5DB}\x{5DC}\x{5DC} \x{5E2}\x{5D5}\x{5DC}\x{5DE}\x{5D9}\x{5EA} \x{5D1}\x{5D0}\x{5DE}\x{5EA}"
+ RenderSVGText {text} at (110,225) size 120x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 120x13
+ chunk 1 (end anchor) text run 1 at (110.60,235.00) startOffset 0 endOffset 38 width 119.40 RTL: "\x{62C}\x{639}\x{644} \x{634}\x{628}\x{643}\x{629} \x{627}\x{644}\x{648}\x{64A}\x{628} \x{627}\x{644}\x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{62D}\x{642}\x{64B}\x{651}\x{627}"
+ RenderSVGImage {image} at (280,183) size 214x44
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.4 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.checksum
new file mode 100644
index 0000000..015b3a9
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.checksum
@@ -0,0 +1 @@
+2c41db060dc5d0b7970642ccde29d622
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.png
new file mode 100644
index 0000000..ab2780a
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.txt
new file mode 100644
index 0000000..881de4e
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.txt
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (221,183) size 324x214
+ RenderSVGText {text} at (133,150) size 194x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 194x13
+ chunk 1 (middle anchor) text run 1 at (133.10,160.00) startOffset 0 endOffset 42 width 193.80: "Making the world wide web truly world wide"
+ RenderSVGText {text} at (154,185) size 152x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 152x13
+ chunk 1 (middle anchor) text run 1 at (154.40,195.00) startOffset 0 endOffset 31 width 151.20 RTL: "\x{5DC}\x{5D9}\x{5E6}\x{5D5}\x{5E8} \x{5DE}\x{5D4}\x{5E8}\x{5E9}\x{5EA} \x{5E8}\x{5E9}\x{5EA} \x{5DB}\x{5DC}\x{5DC} \x{5E2}\x{5D5}\x{5DC}\x{5DE}\x{5D9}\x{5EA} \x{5D1}\x{5D0}\x{5DE}\x{5EA}"
+ RenderSVGText {text} at (170,225) size 120x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 120x13
+ chunk 1 (middle anchor) text run 1 at (170.30,235.00) startOffset 0 endOffset 38 width 119.40 RTL: "\x{62C}\x{639}\x{644} \x{634}\x{628}\x{643}\x{629} \x{627}\x{644}\x{648}\x{64A}\x{628} \x{627}\x{644}\x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{62D}\x{642}\x{64B}\x{651}\x{627}"
+ RenderSVGImage {image} at (280,183) size 214x44
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.4 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.checksum
new file mode 100644
index 0000000..55a7205
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.checksum
@@ -0,0 +1 @@
+10007031cdbe14637c1913dbe7dd6b06
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.png
new file mode 100644
index 0000000..6255ae1
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.txt
new file mode 100644
index 0000000..c538fe6
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.txt
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (280,183) size 427x214
+ RenderSVGText {text} at (230,150) size 194x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 194x13
+ chunk 1 text run 1 at (230.00,160.00) startOffset 0 endOffset 42 width 193.80: "Making the world wide web truly world wide"
+ RenderSVGText {text} at (230,185) size 152x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 152x13
+ chunk 1 text run 1 at (230.00,195.00) startOffset 0 endOffset 31 width 151.20 RTL: "\x{5DC}\x{5D9}\x{5E6}\x{5D5}\x{5E8} \x{5DE}\x{5D4}\x{5E8}\x{5E9}\x{5EA} \x{5E8}\x{5E9}\x{5EA} \x{5DB}\x{5DC}\x{5DC} \x{5E2}\x{5D5}\x{5DC}\x{5DE}\x{5D9}\x{5EA} \x{5D1}\x{5D0}\x{5DE}\x{5EA}"
+ RenderSVGText {text} at (230,225) size 120x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 120x13
+ chunk 1 text run 1 at (230.00,235.00) startOffset 0 endOffset 38 width 119.40 RTL: "\x{62C}\x{639}\x{644} \x{634}\x{628}\x{643}\x{629} \x{627}\x{644}\x{648}\x{64A}\x{628} \x{627}\x{644}\x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{62D}\x{642}\x{64B}\x{651}\x{627}"
+ RenderSVGImage {image} at (280,183) size 214x44
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.4 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.checksum
new file mode 100644
index 0000000..55a7205
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.checksum
@@ -0,0 +1 @@
+10007031cdbe14637c1913dbe7dd6b06
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.png
new file mode 100644
index 0000000..6255ae1
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.txt
new file mode 100644
index 0000000..3566044
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.txt
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (280,183) size 427x214
+ RenderSVGText {text} at (230,150) size 194x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 194x13
+ chunk 1 (end anchor) text run 1 at (230.00,160.00) startOffset 0 endOffset 42 width 193.80: "Making the world wide web truly world wide"
+ RenderSVGText {text} at (230,185) size 152x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 152x13
+ chunk 1 (end anchor) text run 1 at (230.00,195.00) startOffset 0 endOffset 31 width 151.20 RTL: "\x{5DC}\x{5D9}\x{5E6}\x{5D5}\x{5E8} \x{5DE}\x{5D4}\x{5E8}\x{5E9}\x{5EA} \x{5E8}\x{5E9}\x{5EA} \x{5DB}\x{5DC}\x{5DC} \x{5E2}\x{5D5}\x{5DC}\x{5DE}\x{5D9}\x{5EA} \x{5D1}\x{5D0}\x{5DE}\x{5EA}"
+ RenderSVGText {text} at (230,225) size 120x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 120x13
+ chunk 1 (end anchor) text run 1 at (230.00,235.00) startOffset 0 endOffset 38 width 119.40 RTL: "\x{62C}\x{639}\x{644} \x{634}\x{628}\x{643}\x{629} \x{627}\x{644}\x{648}\x{64A}\x{628} \x{627}\x{644}\x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{62D}\x{642}\x{64B}\x{651}\x{627}"
+ RenderSVGImage {image} at (280,183) size 214x44
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.4 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.checksum
new file mode 100644
index 0000000..015b3a9
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.checksum
@@ -0,0 +1 @@
+2c41db060dc5d0b7970642ccde29d622
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.png
new file mode 100644
index 0000000..ab2780a
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.txt
new file mode 100644
index 0000000..881de4e
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.txt
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (221,183) size 324x214
+ RenderSVGText {text} at (133,150) size 194x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 194x13
+ chunk 1 (middle anchor) text run 1 at (133.10,160.00) startOffset 0 endOffset 42 width 193.80: "Making the world wide web truly world wide"
+ RenderSVGText {text} at (154,185) size 152x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 152x13
+ chunk 1 (middle anchor) text run 1 at (154.40,195.00) startOffset 0 endOffset 31 width 151.20 RTL: "\x{5DC}\x{5D9}\x{5E6}\x{5D5}\x{5E8} \x{5DE}\x{5D4}\x{5E8}\x{5E9}\x{5EA} \x{5E8}\x{5E9}\x{5EA} \x{5DB}\x{5DC}\x{5DC} \x{5E2}\x{5D5}\x{5DC}\x{5DE}\x{5D9}\x{5EA} \x{5D1}\x{5D0}\x{5DE}\x{5EA}"
+ RenderSVGText {text} at (170,225) size 120x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 120x13
+ chunk 1 (middle anchor) text run 1 at (170.30,235.00) startOffset 0 endOffset 38 width 119.40 RTL: "\x{62C}\x{639}\x{644} \x{634}\x{628}\x{643}\x{629} \x{627}\x{644}\x{648}\x{64A}\x{628} \x{627}\x{644}\x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{62D}\x{642}\x{64B}\x{651}\x{627}"
+ RenderSVGImage {image} at (280,183) size 214x44
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.4 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.checksum
new file mode 100644
index 0000000..438272c
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.checksum
@@ -0,0 +1 @@
+b8347a378d2080e3d0478ae10ac7b52b
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.png
new file mode 100644
index 0000000..3471029
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.txt
new file mode 100644
index 0000000..e5fbb17
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.txt
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (60,183) size 434x214
+ RenderSVGText {text} at (36,150) size 194x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 194x13
+ chunk 1 text run 1 at (36.20,160.00) startOffset 0 endOffset 42 width 193.80: "Making the world wide web truly world wide"
+ RenderSVGText {text} at (78,185) size 152x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 152x13
+ chunk 1 text run 1 at (78.80,195.00) startOffset 0 endOffset 31 width 151.20 RTL: "\x{5DC}\x{5D9}\x{5E6}\x{5D5}\x{5E8} \x{5DE}\x{5D4}\x{5E8}\x{5E9}\x{5EA} \x{5E8}\x{5E9}\x{5EA} \x{5DB}\x{5DC}\x{5DC} \x{5E2}\x{5D5}\x{5DC}\x{5DE}\x{5D9}\x{5EA} \x{5D1}\x{5D0}\x{5DE}\x{5EA}"
+ RenderSVGText {text} at (110,225) size 120x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 120x13
+ chunk 1 text run 1 at (110.60,235.00) startOffset 0 endOffset 38 width 119.40 RTL: "\x{62C}\x{639}\x{644} \x{634}\x{628}\x{643}\x{629} \x{627}\x{644}\x{648}\x{64A}\x{628} \x{627}\x{644}\x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{62D}\x{642}\x{64B}\x{651}\x{627}"
+ RenderSVGImage {image} at (280,183) size 214x44
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.4 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.checksum
new file mode 100644
index 0000000..438272c
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.checksum
@@ -0,0 +1 @@
+b8347a378d2080e3d0478ae10ac7b52b
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.png
new file mode 100644
index 0000000..3471029
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.txt
new file mode 100644
index 0000000..6e65dde
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.txt
@@ -0,0 +1,26 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (60,183) size 434x214
+ RenderSVGContainer {g} at (60,250) size 324x147
+ RenderSVGText {text} at (36,150) size 194x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 194x13
+ chunk 1 (end anchor) text run 1 at (36.20,160.00) startOffset 0 endOffset 42 width 193.80: "Making the world wide web truly world wide"
+ RenderSVGText {text} at (78,185) size 152x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 152x13
+ chunk 1 (end anchor) text run 1 at (78.80,195.00) startOffset 0 endOffset 31 width 151.20 RTL: "\x{5DC}\x{5D9}\x{5E6}\x{5D5}\x{5E8} \x{5DE}\x{5D4}\x{5E8}\x{5E9}\x{5EA} \x{5E8}\x{5E9}\x{5EA} \x{5DB}\x{5DC}\x{5DC} \x{5E2}\x{5D5}\x{5DC}\x{5DE}\x{5D9}\x{5EA} \x{5D1}\x{5D0}\x{5DE}\x{5EA}"
+ RenderSVGText {text} at (110,225) size 120x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 120x13
+ chunk 1 (end anchor) text run 1 at (110.60,235.00) startOffset 0 endOffset 38 width 119.40 RTL: "\x{62C}\x{639}\x{644} \x{634}\x{628}\x{643}\x{629} \x{627}\x{644}\x{648}\x{64A}\x{628} \x{627}\x{644}\x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{62D}\x{642}\x{64B}\x{651}\x{627}"
+ RenderSVGImage {image} at (280,183) size 214x44
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.4 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.checksum
new file mode 100644
index 0000000..015b3a9
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.checksum
@@ -0,0 +1 @@
+2c41db060dc5d0b7970642ccde29d622
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.png
new file mode 100644
index 0000000..ab2780a
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.txt
new file mode 100644
index 0000000..e651244
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.txt
@@ -0,0 +1,26 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (221,183) size 324x214
+ RenderSVGContainer {g} at (221,250) size 324x147
+ RenderSVGText {text} at (133,150) size 194x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 194x13
+ chunk 1 (middle anchor) text run 1 at (133.10,160.00) startOffset 0 endOffset 42 width 193.80: "Making the world wide web truly world wide"
+ RenderSVGText {text} at (154,185) size 152x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 152x13
+ chunk 1 (middle anchor) text run 1 at (154.40,195.00) startOffset 0 endOffset 31 width 151.20 RTL: "\x{5DC}\x{5D9}\x{5E6}\x{5D5}\x{5E8} \x{5DE}\x{5D4}\x{5E8}\x{5E9}\x{5EA} \x{5E8}\x{5E9}\x{5EA} \x{5DB}\x{5DC}\x{5DC} \x{5E2}\x{5D5}\x{5DC}\x{5DE}\x{5D9}\x{5EA} \x{5D1}\x{5D0}\x{5DE}\x{5EA}"
+ RenderSVGText {text} at (170,225) size 120x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 120x13
+ chunk 1 (middle anchor) text run 1 at (170.30,235.00) startOffset 0 endOffset 38 width 119.40 RTL: "\x{62C}\x{639}\x{644} \x{634}\x{628}\x{643}\x{629} \x{627}\x{644}\x{648}\x{64A}\x{628} \x{627}\x{644}\x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{62D}\x{642}\x{64B}\x{651}\x{627}"
+ RenderSVGImage {image} at (280,183) size 214x44
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.4 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.checksum
new file mode 100644
index 0000000..55a7205
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.checksum
@@ -0,0 +1 @@
+10007031cdbe14637c1913dbe7dd6b06
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.png
new file mode 100644
index 0000000..6255ae1
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.txt
new file mode 100644
index 0000000..3933670
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.txt
@@ -0,0 +1,26 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (280,183) size 427x214
+ RenderSVGContainer {g} at (383,250) size 324x147
+ RenderSVGText {text} at (230,150) size 194x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 194x13
+ chunk 1 text run 1 at (230.00,160.00) startOffset 0 endOffset 42 width 193.80: "Making the world wide web truly world wide"
+ RenderSVGText {text} at (230,185) size 152x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 152x13
+ chunk 1 text run 1 at (230.00,195.00) startOffset 0 endOffset 31 width 151.20 RTL: "\x{5DC}\x{5D9}\x{5E6}\x{5D5}\x{5E8} \x{5DE}\x{5D4}\x{5E8}\x{5E9}\x{5EA} \x{5E8}\x{5E9}\x{5EA} \x{5DB}\x{5DC}\x{5DC} \x{5E2}\x{5D5}\x{5DC}\x{5DE}\x{5D9}\x{5EA} \x{5D1}\x{5D0}\x{5DE}\x{5EA}"
+ RenderSVGText {text} at (230,225) size 120x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 120x13
+ chunk 1 text run 1 at (230.00,235.00) startOffset 0 endOffset 38 width 119.40 RTL: "\x{62C}\x{639}\x{644} \x{634}\x{628}\x{643}\x{629} \x{627}\x{644}\x{648}\x{64A}\x{628} \x{627}\x{644}\x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{62D}\x{642}\x{64B}\x{651}\x{627}"
+ RenderSVGImage {image} at (280,183) size 214x44
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.4 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.checksum
new file mode 100644
index 0000000..55a7205
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.checksum
@@ -0,0 +1 @@
+10007031cdbe14637c1913dbe7dd6b06
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.png
new file mode 100644
index 0000000..6255ae1
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.txt
new file mode 100644
index 0000000..b3e1f17
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.txt
@@ -0,0 +1,26 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (280,183) size 427x214
+ RenderSVGContainer {g} at (383,250) size 324x147
+ RenderSVGText {text} at (230,150) size 194x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 194x13
+ chunk 1 (end anchor) text run 1 at (230.00,160.00) startOffset 0 endOffset 42 width 193.80: "Making the world wide web truly world wide"
+ RenderSVGText {text} at (230,185) size 152x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 152x13
+ chunk 1 (end anchor) text run 1 at (230.00,195.00) startOffset 0 endOffset 31 width 151.20 RTL: "\x{5DC}\x{5D9}\x{5E6}\x{5D5}\x{5E8} \x{5DE}\x{5D4}\x{5E8}\x{5E9}\x{5EA} \x{5E8}\x{5E9}\x{5EA} \x{5DB}\x{5DC}\x{5DC} \x{5E2}\x{5D5}\x{5DC}\x{5DE}\x{5D9}\x{5EA} \x{5D1}\x{5D0}\x{5DE}\x{5EA}"
+ RenderSVGText {text} at (230,225) size 120x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 120x13
+ chunk 1 (end anchor) text run 1 at (230.00,235.00) startOffset 0 endOffset 38 width 119.40 RTL: "\x{62C}\x{639}\x{644} \x{634}\x{628}\x{643}\x{629} \x{627}\x{644}\x{648}\x{64A}\x{628} \x{627}\x{644}\x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{62D}\x{642}\x{64B}\x{651}\x{627}"
+ RenderSVGImage {image} at (280,183) size 214x44
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.4 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.checksum
new file mode 100644
index 0000000..015b3a9
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.checksum
@@ -0,0 +1 @@
+2c41db060dc5d0b7970642ccde29d622
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.png
new file mode 100644
index 0000000..ab2780a
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.txt
new file mode 100644
index 0000000..e651244
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.txt
@@ -0,0 +1,26 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (221,183) size 324x214
+ RenderSVGContainer {g} at (221,250) size 324x147
+ RenderSVGText {text} at (133,150) size 194x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 194x13
+ chunk 1 (middle anchor) text run 1 at (133.10,160.00) startOffset 0 endOffset 42 width 193.80: "Making the world wide web truly world wide"
+ RenderSVGText {text} at (154,185) size 152x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 152x13
+ chunk 1 (middle anchor) text run 1 at (154.40,195.00) startOffset 0 endOffset 31 width 151.20 RTL: "\x{5DC}\x{5D9}\x{5E6}\x{5D5}\x{5E8} \x{5DE}\x{5D4}\x{5E8}\x{5E9}\x{5EA} \x{5E8}\x{5E9}\x{5EA} \x{5DB}\x{5DC}\x{5DC} \x{5E2}\x{5D5}\x{5DC}\x{5DE}\x{5D9}\x{5EA} \x{5D1}\x{5D0}\x{5DE}\x{5EA}"
+ RenderSVGText {text} at (170,225) size 120x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 120x13
+ chunk 1 (middle anchor) text run 1 at (170.30,235.00) startOffset 0 endOffset 38 width 119.40 RTL: "\x{62C}\x{639}\x{644} \x{634}\x{628}\x{643}\x{629} \x{627}\x{644}\x{648}\x{64A}\x{628} \x{627}\x{644}\x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{62D}\x{642}\x{64B}\x{651}\x{627}"
+ RenderSVGImage {image} at (280,183) size 214x44
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.4 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.checksum
new file mode 100644
index 0000000..438272c
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.checksum
@@ -0,0 +1 @@
+b8347a378d2080e3d0478ae10ac7b52b
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.png
new file mode 100644
index 0000000..3471029
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.txt
new file mode 100644
index 0000000..b2f0ad9
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.txt
@@ -0,0 +1,26 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (60,183) size 434x214
+ RenderSVGContainer {g} at (60,250) size 324x147
+ RenderSVGText {text} at (36,150) size 194x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 194x13
+ chunk 1 text run 1 at (36.20,160.00) startOffset 0 endOffset 42 width 193.80: "Making the world wide web truly world wide"
+ RenderSVGText {text} at (78,185) size 152x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 152x13
+ chunk 1 text run 1 at (78.80,195.00) startOffset 0 endOffset 31 width 151.20 RTL: "\x{5DC}\x{5D9}\x{5E6}\x{5D5}\x{5E8} \x{5DE}\x{5D4}\x{5E8}\x{5E9}\x{5EA} \x{5E8}\x{5E9}\x{5EA} \x{5DB}\x{5DC}\x{5DC} \x{5E2}\x{5D5}\x{5DC}\x{5DE}\x{5D9}\x{5EA} \x{5D1}\x{5D0}\x{5DE}\x{5EA}"
+ RenderSVGText {text} at (110,225) size 120x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 120x13
+ chunk 1 text run 1 at (110.60,235.00) startOffset 0 endOffset 38 width 119.40 RTL: "\x{62C}\x{639}\x{644} \x{634}\x{628}\x{643}\x{629} \x{627}\x{644}\x{648}\x{64A}\x{628} \x{627}\x{644}\x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{62D}\x{642}\x{64B}\x{651}\x{627}"
+ RenderSVGImage {image} at (280,183) size 214x44
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.4 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-no-markup-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-no-markup-expected.checksum
new file mode 100644
index 0000000..55a7205
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-no-markup-expected.checksum
@@ -0,0 +1 @@
+10007031cdbe14637c1913dbe7dd6b06
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-no-markup-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-no-markup-expected.png
new file mode 100644
index 0000000..6255ae1
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-no-markup-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-no-markup-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-no-markup-expected.txt
new file mode 100644
index 0000000..c538fe6
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-no-markup-expected.txt
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (280,183) size 427x214
+ RenderSVGText {text} at (230,150) size 194x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 194x13
+ chunk 1 text run 1 at (230.00,160.00) startOffset 0 endOffset 42 width 193.80: "Making the world wide web truly world wide"
+ RenderSVGText {text} at (230,185) size 152x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 152x13
+ chunk 1 text run 1 at (230.00,195.00) startOffset 0 endOffset 31 width 151.20 RTL: "\x{5DC}\x{5D9}\x{5E6}\x{5D5}\x{5E8} \x{5DE}\x{5D4}\x{5E8}\x{5E9}\x{5EA} \x{5E8}\x{5E9}\x{5EA} \x{5DB}\x{5DC}\x{5DC} \x{5E2}\x{5D5}\x{5DC}\x{5DE}\x{5D9}\x{5EA} \x{5D1}\x{5D0}\x{5DE}\x{5EA}"
+ RenderSVGText {text} at (230,225) size 120x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 120x13
+ chunk 1 text run 1 at (230.00,235.00) startOffset 0 endOffset 38 width 119.40 RTL: "\x{62C}\x{639}\x{644} \x{634}\x{628}\x{643}\x{629} \x{627}\x{644}\x{648}\x{64A}\x{628} \x{627}\x{644}\x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{639}\x{627}\x{644}\x{645}\x{64A}\x{651}\x{629} \x{62D}\x{642}\x{64B}\x{651}\x{627}"
+ RenderSVGImage {image} at (280,183) size 214x44
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.4 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-dirLTR-ubNone-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirLTR-ubNone-expected.checksum
new file mode 100644
index 0000000..5a24d8c
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirLTR-ubNone-expected.checksum
@@ -0,0 +1 @@
+aa4249f50f933aec6d5d9a88fb9db993
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-dirLTR-ubNone-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirLTR-ubNone-expected.png
new file mode 100644
index 0000000..030193c
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirLTR-ubNone-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-dirLTR-ubNone-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirLTR-ubNone-expected.txt
new file mode 100644
index 0000000..9fe8546
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirLTR-ubNone-expected.txt
@@ -0,0 +1,24 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGText {text} at (105,133) size 250x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 250x21
+ chunk 1 (middle anchor) text run 1 at (105.20,150.00) startOffset 0 endOffset 4 width 45.00: "W3C "
+ chunk 1 (middle anchor) text run 1 at (150.20,150.00) startOffset 0 endOffset 12 width 71.40 RTL: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644}"
+ chunk 1 (middle anchor) text run 1 at (221.60,150.00) startOffset 0 endOffset 15 width 133.20: " dirLTR ubNone!"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-dirLTR-ubOverride-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirLTR-ubOverride-expected.checksum
new file mode 100644
index 0000000..a7cb22e
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirLTR-ubOverride-expected.checksum
@@ -0,0 +1 @@
+525de2e3d1cbb1250b962d49b805faa7
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-dirLTR-ubOverride-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirLTR-ubOverride-expected.png
new file mode 100644
index 0000000..7bc94bf
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirLTR-ubOverride-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-dirLTR-ubOverride-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirLTR-ubOverride-expected.txt
new file mode 100644
index 0000000..0ff4178
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirLTR-ubOverride-expected.txt
@@ -0,0 +1,22 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGText {text} at (86,133) size 288x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 288x21
+ chunk 1 (middle anchor) text run 1 at (86.60,150.00) startOffset 0 endOffset 35 width 286.80 LTR override: "W3C \x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644} dirLTR ubOverride!"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-dirRTL-ubNone-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirRTL-ubNone-expected.checksum
new file mode 100644
index 0000000..680c91d
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirRTL-ubNone-expected.checksum
@@ -0,0 +1 @@
+a1c32db0276a1a0077b52ce5c2c7f81d
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-dirRTL-ubNone-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirRTL-ubNone-expected.png
new file mode 100644
index 0000000..dec1ea5
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirRTL-ubNone-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-dirRTL-ubNone-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirRTL-ubNone-expected.txt
new file mode 100644
index 0000000..5fdfdcf
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirRTL-ubNone-expected.txt
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGText {text} at (105,133) size 250x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 250x21
+ chunk 1 (middle anchor) text run 1 at (105.20,150.00) startOffset 0 endOffset 1 width 4.80 RTL: "!"
+ chunk 1 (middle anchor) text run 1 at (110.00,150.00) startOffset 0 endOffset 13 width 123.60: "dirRTL ubNone"
+ chunk 1 (middle anchor) text run 1 at (233.60,150.00) startOffset 0 endOffset 14 width 81.00 RTL: " \x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644} "
+ chunk 1 (middle anchor) text run 1 at (314.60,150.00) startOffset 0 endOffset 3 width 40.20: "W3C"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-dirRTL-ubOverride-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirRTL-ubOverride-expected.checksum
new file mode 100644
index 0000000..0c97a7e
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirRTL-ubOverride-expected.checksum
@@ -0,0 +1 @@
+a60db41b9b213f94846dc53b2a47b4e9
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-dirRTL-ubOverride-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirRTL-ubOverride-expected.png
new file mode 100644
index 0000000..0f5864d
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirRTL-ubOverride-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/text-dirRTL-ubOverride-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirRTL-ubOverride-expected.txt
new file mode 100644
index 0000000..2e94a7f
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/text-dirRTL-ubOverride-expected.txt
@@ -0,0 +1,22 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGText {text} at (92,133) size 276x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 276x21
+ chunk 1 (middle anchor) text run 1 at (92.30,150.00) startOffset 0 endOffset 35 width 275.40 RTL override: "W3C \x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644} dirRTL ubOverride!"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context-expected.checksum
new file mode 100644
index 0000000..9755b0b
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context-expected.checksum
@@ -0,0 +1 @@
+1c9cea8882c2ccf13a159503c7789bf2
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context-expected.png
new file mode 100644
index 0000000..468aa17
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context-expected.txt
new file mode 100644
index 0000000..e5bbbce
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context-expected.txt
@@ -0,0 +1,28 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGText {text} at (92,133) size 276x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (193,0) size 83x21
+ chunk 1 (middle anchor) text run 1 at (285.20,150.00) startOffset 0 endOffset 14 width 82.80 RTL: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644} \""
+ RenderSVGTSpan {tspan} at (0,0) size 183x21
+ RenderSVGInlineText {#text} at (11,0) size 183x21
+ chunk 1 (middle anchor) text run 1 at (103.40,150.00) startOffset 0 endOffset 16 width 147.00: "dirLTR ubEmbed, "
+ chunk 1 (middle anchor) text run 1 at (250.40,150.00) startOffset 0 endOffset 6 width 34.80 RTL: "\x{627}\x{62E}\x{62A}\x{628}\x{627}\x{631}"
+ RenderSVGInlineText {#text} at (0,0) size 12x21
+ chunk 1 (middle anchor) text run 1 at (92.00,150.00) startOffset 0 endOffset 2 width 11.40 RTL: "\"!"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context-expected.checksum
new file mode 100644
index 0000000..4c44650
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context-expected.checksum
@@ -0,0 +1 @@
+5ff376b10f94f2dca9e1a0a7ff3a50d1
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context-expected.png
new file mode 100644
index 0000000..0af0913
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context-expected.txt
new file mode 100644
index 0000000..41506b7
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context-expected.txt
@@ -0,0 +1,28 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGText {text} at (98,133) size 264x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (180,0) size 84x21
+ chunk 1 (middle anchor) text run 1 at (278.30,150.00) startOffset 0 endOffset 14 width 82.80 RTL: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644} \""
+ RenderSVGTSpan {tspan} at (0,0) size 169x21
+ RenderSVGInlineText {#text} at (12,0) size 169x21
+ chunk 1 (middle anchor) text run 1 at (110.30,150.00) startOffset 0 endOffset 8 width 44.40 RTL: ", \x{627}\x{62E}\x{62A}\x{628}\x{627}\x{631}"
+ chunk 1 (middle anchor) text run 1 at (154.70,150.00) startOffset 0 endOffset 13 width 123.60: "dirLTR ubNone"
+ RenderSVGInlineText {#text} at (0,0) size 13x21
+ chunk 1 (middle anchor) text run 1 at (98.90,150.00) startOffset 0 endOffset 2 width 11.40 RTL: "\"!"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context-expected.checksum
new file mode 100644
index 0000000..b01d8df
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context-expected.checksum
@@ -0,0 +1 @@
+0279e92473cd88fc098a3426972f616e
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context-expected.png
new file mode 100644
index 0000000..3172a5f
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context-expected.txt
new file mode 100644
index 0000000..8f3bc40
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGText {text} at (76,133) size 308x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 162x21
+ chunk 1 (middle anchor) text run 1 at (77.00,150.00) startOffset 0 endOffset 19 width 160.80: "dirLTR ubOverride \""
+ RenderSVGTSpan {tspan} at (0,0) size 135x21
+ RenderSVGInlineText {#text} at (161,0) size 135x21
+ chunk 1 (middle anchor) text run 1 at (237.80,150.00) startOffset 0 endOffset 17 width 133.80 LTR override: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644}\x{60C} W3C"
+ RenderSVGInlineText {#text} at (295,0) size 13x21
+ chunk 1 (middle anchor) text run 1 at (371.60,150.00) startOffset 0 endOffset 2 width 11.40: "\"!"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context-expected.checksum
new file mode 100644
index 0000000..b01d8df
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context-expected.checksum
@@ -0,0 +1 @@
+0279e92473cd88fc098a3426972f616e
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context-expected.png
new file mode 100644
index 0000000..3172a5f
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context-expected.txt
new file mode 100644
index 0000000..8f3bc40
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGText {text} at (76,133) size 308x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 162x21
+ chunk 1 (middle anchor) text run 1 at (77.00,150.00) startOffset 0 endOffset 19 width 160.80: "dirLTR ubOverride \""
+ RenderSVGTSpan {tspan} at (0,0) size 135x21
+ RenderSVGInlineText {#text} at (161,0) size 135x21
+ chunk 1 (middle anchor) text run 1 at (237.80,150.00) startOffset 0 endOffset 17 width 133.80 LTR override: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644}\x{60C} W3C"
+ RenderSVGInlineText {#text} at (295,0) size 13x21
+ chunk 1 (middle anchor) text run 1 at (371.60,150.00) startOffset 0 endOffset 2 width 11.40: "\"!"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context-expected.checksum
new file mode 100644
index 0000000..72a0d72
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context-expected.checksum
@@ -0,0 +1 @@
+578bec0c3d54de69c6e0992b045c2b15
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context-expected.png
new file mode 100644
index 0000000..f00c5cb
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context-expected.txt
new file mode 100644
index 0000000..496675d
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGText {text} at (86,133) size 288x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (204,0) size 84x21
+ chunk 1 (middle anchor) text run 1 at (290.90,150.00) startOffset 0 endOffset 14 width 82.80 RTL: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644} \""
+ RenderSVGTSpan {tspan} at (0,0) size 194x21
+ RenderSVGInlineText {#text} at (11,0) size 194x21
+ chunk 1 (middle anchor) text run 1 at (97.70,150.00) startOffset 0 endOffset 25 width 193.20 LTR override: "dirLTR ubOverride, \x{627}\x{62E}\x{62A}\x{628}\x{627}\x{631}"
+ RenderSVGInlineText {#text} at (0,0) size 12x21
+ chunk 1 (middle anchor) text run 1 at (86.30,150.00) startOffset 0 endOffset 2 width 11.40 RTL: "\"!"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context-expected.checksum
new file mode 100644
index 0000000..bc37581
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context-expected.checksum
@@ -0,0 +1 @@
+b9d5795fae319ef19e74d56d33882fd2
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context-expected.png
new file mode 100644
index 0000000..575371e
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context-expected.txt
new file mode 100644
index 0000000..44c2d6d
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGText {text} at (72,133) size 316x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 171x21
+ chunk 1 (middle anchor) text run 1 at (72.20,150.00) startOffset 0 endOffset 20 width 170.40: "dirNone ubOverride \""
+ RenderSVGTSpan {tspan} at (0,0) size 135x21
+ RenderSVGInlineText {#text} at (170,0) size 135x21
+ chunk 1 (middle anchor) text run 1 at (242.60,150.00) startOffset 0 endOffset 17 width 133.80 LTR override: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644}\x{60C} W3C"
+ RenderSVGInlineText {#text} at (304,0) size 12x21
+ chunk 1 (middle anchor) text run 1 at (376.40,150.00) startOffset 0 endOffset 2 width 11.40: "\"!"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context-expected.checksum
new file mode 100644
index 0000000..bc37581
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context-expected.checksum
@@ -0,0 +1 @@
+b9d5795fae319ef19e74d56d33882fd2
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context-expected.png
new file mode 100644
index 0000000..575371e
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context-expected.txt
new file mode 100644
index 0000000..44c2d6d
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGText {text} at (72,133) size 316x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 171x21
+ chunk 1 (middle anchor) text run 1 at (72.20,150.00) startOffset 0 endOffset 20 width 170.40: "dirNone ubOverride \""
+ RenderSVGTSpan {tspan} at (0,0) size 135x21
+ RenderSVGInlineText {#text} at (170,0) size 135x21
+ chunk 1 (middle anchor) text run 1 at (242.60,150.00) startOffset 0 endOffset 17 width 133.80 LTR override: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644}\x{60C} W3C"
+ RenderSVGInlineText {#text} at (304,0) size 12x21
+ chunk 1 (middle anchor) text run 1 at (376.40,150.00) startOffset 0 endOffset 2 width 11.40: "\"!"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context-expected.checksum
new file mode 100644
index 0000000..5a80adc
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context-expected.checksum
@@ -0,0 +1 @@
+da3d5776c5519afdb93b90f1ad6588e0
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context-expected.png
new file mode 100644
index 0000000..b04af99
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context-expected.txt
new file mode 100644
index 0000000..a73344e
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGText {text} at (81,133) size 298x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (215,0) size 83x21
+ chunk 1 (middle anchor) text run 1 at (296.00,150.00) startOffset 0 endOffset 14 width 82.80 RTL: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644} \""
+ RenderSVGTSpan {tspan} at (0,0) size 204x21
+ RenderSVGInlineText {#text} at (11,0) size 204x21
+ chunk 1 (middle anchor) text run 1 at (92.60,150.00) startOffset 0 endOffset 26 width 203.40 RTL override: "dirNone ubOverride, \x{627}\x{62E}\x{62A}\x{628}\x{627}\x{631}"
+ RenderSVGInlineText {#text} at (0,0) size 12x21
+ chunk 1 (middle anchor) text run 1 at (81.20,150.00) startOffset 0 endOffset 2 width 11.40 RTL: "\"!"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context-expected.checksum
new file mode 100644
index 0000000..070e583
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context-expected.checksum
@@ -0,0 +1 @@
+4bd7d4323e9f2c3b6f274398ee00205e
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context-expected.png
new file mode 100644
index 0000000..67256d5
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context-expected.txt
new file mode 100644
index 0000000..dd26642
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context-expected.txt
@@ -0,0 +1,28 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGText {text} at (88,133) size 284x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 150x21
+ chunk 1 (middle anchor) text run 1 at (88.70,150.00) startOffset 0 endOffset 16 width 148.80: "dirRTL ubEmbed \""
+ RenderSVGTSpan {tspan} at (0,0) size 123x21
+ RenderSVGInlineText {#text} at (149,0) size 123x21
+ chunk 1 (middle anchor) text run 1 at (237.50,150.00) startOffset 0 endOffset 3 width 40.20: "W3C"
+ chunk 1 (middle anchor) text run 1 at (277.70,150.00) startOffset 0 endOffset 14 width 82.20 RTL: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644}\x{60C} "
+ RenderSVGInlineText {#text} at (271,0) size 13x21
+ chunk 1 (middle anchor) text run 1 at (359.90,150.00) startOffset 0 endOffset 2 width 11.40: "\"!"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context-expected.checksum
new file mode 100644
index 0000000..070e583
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context-expected.checksum
@@ -0,0 +1 @@
+4bd7d4323e9f2c3b6f274398ee00205e
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context-expected.png
new file mode 100644
index 0000000..67256d5
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context-expected.txt
new file mode 100644
index 0000000..dd26642
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context-expected.txt
@@ -0,0 +1,28 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGText {text} at (88,133) size 284x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 150x21
+ chunk 1 (middle anchor) text run 1 at (88.70,150.00) startOffset 0 endOffset 16 width 148.80: "dirRTL ubEmbed \""
+ RenderSVGTSpan {tspan} at (0,0) size 123x21
+ RenderSVGInlineText {#text} at (149,0) size 123x21
+ chunk 1 (middle anchor) text run 1 at (237.50,150.00) startOffset 0 endOffset 3 width 40.20: "W3C"
+ chunk 1 (middle anchor) text run 1 at (277.70,150.00) startOffset 0 endOffset 14 width 82.20 RTL: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644}\x{60C} "
+ RenderSVGInlineText {#text} at (271,0) size 13x21
+ chunk 1 (middle anchor) text run 1 at (359.90,150.00) startOffset 0 endOffset 2 width 11.40: "\"!"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context-expected.checksum
new file mode 100644
index 0000000..7e90b73
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context-expected.checksum
@@ -0,0 +1 @@
+7b87431de8b7dc6c959d258903951a60
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context-expected.png
new file mode 100644
index 0000000..81d1867
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context-expected.txt
new file mode 100644
index 0000000..8a5ca40
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context-expected.txt
@@ -0,0 +1,28 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGText {text} at (95,133) size 270x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 136x21
+ chunk 1 (middle anchor) text run 1 at (95.60,150.00) startOffset 0 endOffset 15 width 135.00: "dirRTL ubNone \""
+ RenderSVGTSpan {tspan} at (0,0) size 123x21
+ RenderSVGInlineText {#text} at (135,0) size 123x21
+ chunk 1 (middle anchor) text run 1 at (230.60,150.00) startOffset 0 endOffset 12 width 71.40 RTL: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644}"
+ chunk 1 (middle anchor) text run 1 at (302.00,150.00) startOffset 0 endOffset 5 width 51.00: "\x{60C} W3C"
+ RenderSVGInlineText {#text} at (258,0) size 12x21
+ chunk 1 (middle anchor) text run 1 at (353.00,150.00) startOffset 0 endOffset 2 width 11.40: "\"!"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context-expected.checksum
new file mode 100644
index 0000000..7e90b73
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context-expected.checksum
@@ -0,0 +1 @@
+7b87431de8b7dc6c959d258903951a60
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context-expected.png
new file mode 100644
index 0000000..81d1867
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context-expected.txt
new file mode 100644
index 0000000..8a5ca40
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context-expected.txt
@@ -0,0 +1,28 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGText {text} at (95,133) size 270x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 136x21
+ chunk 1 (middle anchor) text run 1 at (95.60,150.00) startOffset 0 endOffset 15 width 135.00: "dirRTL ubNone \""
+ RenderSVGTSpan {tspan} at (0,0) size 123x21
+ RenderSVGInlineText {#text} at (135,0) size 123x21
+ chunk 1 (middle anchor) text run 1 at (230.60,150.00) startOffset 0 endOffset 12 width 71.40 RTL: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644}"
+ chunk 1 (middle anchor) text run 1 at (302.00,150.00) startOffset 0 endOffset 5 width 51.00: "\x{60C} W3C"
+ RenderSVGInlineText {#text} at (258,0) size 12x21
+ chunk 1 (middle anchor) text run 1 at (353.00,150.00) startOffset 0 endOffset 2 width 11.40: "\"!"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context-expected.checksum
new file mode 100644
index 0000000..6410c9e
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context-expected.checksum
@@ -0,0 +1 @@
+737b090486c0484f717f9318abad6b8a
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context-expected.png
new file mode 100644
index 0000000..398b620
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context-expected.txt
new file mode 100644
index 0000000..1ab97a6
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGText {text} at (82,133) size 296x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 162x21
+ chunk 1 (middle anchor) text run 1 at (82.70,150.00) startOffset 0 endOffset 19 width 160.80: "dirRTL ubOverride \""
+ RenderSVGTSpan {tspan} at (0,0) size 123x21
+ RenderSVGInlineText {#text} at (161,0) size 123x21
+ chunk 1 (middle anchor) text run 1 at (243.50,150.00) startOffset 0 endOffset 17 width 122.40 RTL override: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644}\x{60C} W3C"
+ RenderSVGInlineText {#text} at (283,0) size 13x21
+ chunk 1 (middle anchor) text run 1 at (365.90,150.00) startOffset 0 endOffset 2 width 11.40: "\"!"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context-expected.checksum
new file mode 100644
index 0000000..6410c9e
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context-expected.checksum
@@ -0,0 +1 @@
+737b090486c0484f717f9318abad6b8a
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context-expected.png
new file mode 100644
index 0000000..398b620
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context-expected.txt
new file mode 100644
index 0000000..1ab97a6
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGText {text} at (82,133) size 296x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 162x21
+ chunk 1 (middle anchor) text run 1 at (82.70,150.00) startOffset 0 endOffset 19 width 160.80: "dirRTL ubOverride \""
+ RenderSVGTSpan {tspan} at (0,0) size 123x21
+ RenderSVGInlineText {#text} at (161,0) size 123x21
+ chunk 1 (middle anchor) text run 1 at (243.50,150.00) startOffset 0 endOffset 17 width 122.40 RTL override: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644}\x{60C} W3C"
+ RenderSVGInlineText {#text} at (283,0) size 13x21
+ chunk 1 (middle anchor) text run 1 at (365.90,150.00) startOffset 0 endOffset 2 width 11.40: "\"!"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context-expected.checksum
new file mode 100644
index 0000000..13b41d8
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context-expected.checksum
@@ -0,0 +1 @@
+d00251b02dab7b8747eade1a8234b52d
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context-expected.png
new file mode 100644
index 0000000..fd4303f
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context-expected.txt
new file mode 100644
index 0000000..8a2b799
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGText {text} at (86,133) size 288x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (205,0) size 83x21
+ chunk 1 (middle anchor) text run 1 at (291.20,150.00) startOffset 0 endOffset 14 width 82.80 RTL: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644} \""
+ RenderSVGTSpan {tspan} at (0,0) size 195x21
+ RenderSVGInlineText {#text} at (11,0) size 195x21
+ chunk 1 (middle anchor) text run 1 at (97.40,150.00) startOffset 0 endOffset 25 width 193.80 RTL override: "dirRTL ubOverride, \x{627}\x{62E}\x{62A}\x{628}\x{627}\x{631}"
+ RenderSVGInlineText {#text} at (0,0) size 12x21
+ chunk 1 (middle anchor) text run 1 at (86.00,150.00) startOffset 0 endOffset 2 width 11.40 RTL: "\"!"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-direction-ltr-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-direction-ltr-expected.checksum
new file mode 100644
index 0000000..a57af87
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-direction-ltr-expected.checksum
@@ -0,0 +1 @@
+aaba662341c099c53d28b3c994ff76d9
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-direction-ltr-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-direction-ltr-expected.png
new file mode 100644
index 0000000..dc1ec6e
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-direction-ltr-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-direction-ltr-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-direction-ltr-expected.txt
new file mode 100644
index 0000000..f88cf20
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-direction-ltr-expected.txt
@@ -0,0 +1,28 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGText {text} at (88,133) size 284x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (12,0) size 149x21
+ chunk 1 (middle anchor) text run 1 at (100.10,150.00) startOffset 0 endOffset 16 width 148.80: "dirLTR ubEmbed \""
+ RenderSVGTSpan {tspan} at (0,0) size 124x21
+ RenderSVGInlineText {#text} at (160,0) size 124x21
+ chunk 1 (middle anchor) text run 1 at (248.90,150.00) startOffset 0 endOffset 12 width 71.40 RTL: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644}"
+ chunk 1 (middle anchor) text run 1 at (320.30,150.00) startOffset 0 endOffset 5 width 51.00: "\x{60C} W3C"
+ RenderSVGInlineText {#text} at (0,0) size 13x21
+ chunk 1 (middle anchor) text run 1 at (88.70,150.00) startOffset 0 endOffset 2 width 11.40 RTL: "\"!"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-direction-rtl-expected.checksum b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-direction-rtl-expected.checksum
new file mode 100644
index 0000000..5eded79
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-direction-rtl-expected.checksum
@@ -0,0 +1 @@
+07d6488b6070ee5b04678adaa249c8e1
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-direction-rtl-expected.png b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-direction-rtl-expected.png
new file mode 100644
index 0000000..1108ca9
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-direction-rtl-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-I18N/tspan-direction-rtl-expected.txt b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-direction-rtl-expected.txt
new file mode 100644
index 0000000..d0f4c18
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-I18N/tspan-direction-rtl-expected.txt
@@ -0,0 +1,28 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGContainer {g} at (33,221) size 651x144
+ RenderSVGText {text} at (91,133) size 278x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (194,0) size 84x21
+ chunk 1 (middle anchor) text run 1 at (285.20,150.00) startOffset 0 endOffset 14 width 82.80 RTL: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644} \""
+ RenderSVGTSpan {tspan} at (0,0) size 183x21
+ RenderSVGInlineText {#text} at (12,0) size 183x21
+ chunk 1 (middle anchor) text run 1 at (103.40,150.00) startOffset 0 endOffset 8 width 44.40 RTL: ", \x{627}\x{62E}\x{62A}\x{628}\x{627}\x{631}"
+ chunk 1 (middle anchor) text run 1 at (147.80,150.00) startOffset 0 endOffset 14 width 137.40: "dirRTL ubEmbed"
+ RenderSVGInlineText {#text} at (0,0) size 13x21
+ chunk 1 (middle anchor) text run 1 at (92.00,150.00) startOffset 0 endOffset 2 width 11.40 RTL: "\"!"
+ RenderSVGText {text} at (20,170) size 86x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 86x13
+ chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 18 width 85.20: "Reference graphic:"
+ RenderSVGImage {image} at (100,300) size 584x65
+ RenderSVGContainer {g} at (16,556) size 76x14
+ RenderSVGText {text} at (10,334) size 45x8 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 45x8
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 45.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
+ RenderSVGContainer {g} at (0,0) size 800x40
+ RenderSVGPath {rect} at (0,0) size 800x37 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
+ RenderSVGText {text} at (206,0) size 68x23 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 68x23
+ chunk 1 (middle anchor) text run 1 at (206.40,18.00) startOffset 0 endOffset 5 width 67.20: "DRAFT"
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.checksum
new file mode 100644
index 0000000..68cbfa9
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.checksum
@@ -0,0 +1 @@
+24f672fbd6dcb8907004ee5235a75595
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.png
new file mode 100644
index 0000000..1e0fb2c
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.txt
new file mode 100644
index 0000000..c79050e
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.txt
@@ -0,0 +1,34 @@
+layer at (0,0) size 480x360
+ RenderView at (0,0) size 480x360
+layer at (0,0) size 480x360
+ RenderSVGRoot {svg} at (0,0) size 480x360
+ RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+ RenderSVGContainer {g} at (10,24) size 423x261
+ RenderSVGText {text} at (10,24) size 316x20 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 316x20
+ chunk 1 text run 1 at (10.00,40.00) startOffset 0 endOffset 45 width 316.00: "unicode-bidi=\"bidi-override\" direction=\"ltr\"."
+ RenderSVGContainer {g} at (10,60) size 423x25
+ RenderSVGText {text} at (10,60) size 423x25 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 423x25
+ chunk 1 text run 1 at (10.00,80.00) startOffset 0 endOffset 56 width 423.00 LTR override: "Text \"\x{5D0}\x{5E0}\x{5D9} \x{5D9}\x{5DB}\x{5D5}\x{5DC} \x{5DC}\x{5D0}\x{5DB}\x{5D5}\x{5DC} \x{5D6}\x{5DB}\x{5D5}\x{5DB}\x{5D9}\x{5EA} \x{5D5}\x{5D6}\x{5D4} \x{5DC}\x{5D0} \x{5DE}\x{5D6}\x{5D9}\x{5E7} \x{5DC}\x{5D9}\" is in Hebrew"
+ RenderSVGText {text} at (10,124) size 316x20 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 316x20
+ chunk 1 text run 1 at (10.00,140.00) startOffset 0 endOffset 45 width 316.00: "unicode-bidi=\"bidi-override\" direction=\"rtl\"."
+ RenderSVGContainer {g} at (10,160) size 423x25
+ RenderSVGText {text} at (10,160) size 423x25 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 423x25
+ chunk 1 (end anchor) text run 1 at (10.00,180.00) startOffset 0 endOffset 56 width 423.00 RTL override: "Text \"\x{5D0}\x{5E0}\x{5D9} \x{5D9}\x{5DB}\x{5D5}\x{5DC} \x{5DC}\x{5D0}\x{5DB}\x{5D5}\x{5DC} \x{5D6}\x{5DB}\x{5D5}\x{5DB}\x{5D9}\x{5EA} \x{5D5}\x{5D6}\x{5D4} \x{5DC}\x{5D0} \x{5DE}\x{5D6}\x{5D9}\x{5E7} \x{5DC}\x{5D9}\" is in Hebrew"
+ RenderSVGText {text} at (10,224) size 274x20 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 274x20
+ chunk 1 text run 1 at (10.00,240.00) startOffset 0 endOffset 38 width 274.00: "unicode-bidi=\"normal\" direction=\"rtl\"."
+ RenderSVGContainer {g} at (10,260) size 423x25
+ RenderSVGText {text} at (10,260) size 423x25 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 423x25
+ chunk 1 (end anchor) text run 1 at (10.00,280.00) startOffset 0 endOffset 12 width 99.00: "is in Hebrew"
+ chunk 1 (end anchor) text run 1 at (109.00,280.00) startOffset 0 endOffset 40 width 289.00 RTL: " \"\x{5D0}\x{5E0}\x{5D9} \x{5D9}\x{5DB}\x{5D5}\x{5DC} \x{5DC}\x{5D0}\x{5DB}\x{5D5}\x{5DC} \x{5D6}\x{5DB}\x{5D5}\x{5DB}\x{5D9}\x{5EA} \x{5D5}\x{5D6}\x{5D4} \x{5DC}\x{5D0} \x{5DE}\x{5D6}\x{5D9}\x{5E7} \x{5DC}\x{5D9}\" "
+ chunk 1 (end anchor) text run 1 at (398.00,280.00) startOffset 0 endOffset 4 width 35.00: "Text"
+ RenderSVGContainer {g} at (10,310) size 231x38
+ RenderSVGText {text} at (10,310) size 231x38 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 231x38
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 231.00: "$Revision: 1.9 $"
+ RenderSVGPath {rect} at (0,0) size 480x360 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.checksum
new file mode 100644
index 0000000..e1fada1
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.checksum
@@ -0,0 +1 @@
+243f8aefc23e73e170bad8691d601780
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.png
new file mode 100644
index 0000000..68f5f9e
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.txt
new file mode 100644
index 0000000..f8c7ec6
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.txt
@@ -0,0 +1,20 @@
+layer at (0,0) size 480x360
+ RenderView at (0,0) size 480x360
+layer at (0,0) size 480x360
+ RenderSVGRoot {svg} at (0,0) size 480x360
+ RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+ RenderSVGContainer {g} at (16,52) size 444x196
+ RenderSVGText {text} at (88,52) size 372x36 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 372x36
+ chunk 1 text run 1 at (88.00,80.00) startOffset 0 endOffset 37 width 372.00 RTL: "\x{644}\x{645}\x{627}\x{630}\x{627} \x{644}\x{627} \x{64A}\x{62A}\x{643}\x{644}\x{645}\x{648}\x{646} \x{627}\x{644}\x{644}\x{651}\x{63A}\x{629} \x{627}\x{644}\x{639}\x{631}\x{628}\x{64A}\x{629} \x{641}\x{62D}\x{633}\x{628}\x{61F}"
+ RenderSVGText {text} at (16,128) size 444x41 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 444x41
+ chunk 1 text run 1 at (16.00,160.00) startOffset 0 endOffset 37 width 444.00 RTL: "\x{644}\x{645}\x{627}\x{630}\x{627} \x{644}\x{627} \x{64A}\x{62A}\x{643}\x{644}\x{645}\x{648}\x{646} \x{627}\x{644}\x{644}\x{651}\x{63A}\x{629} \x{627}\x{644}\x{639}\x{631}\x{628}\x{64A}\x{629} \x{641}\x{62D}\x{633}\x{628}\x{61F}"
+ RenderSVGText {text} at (88,212) size 372x36 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 372x36
+ chunk 1 text run 1 at (88.00,240.00) startOffset 0 endOffset 37 width 372.00 RTL: "\x{644}\x{645}\x{627}\x{630}\x{627} \x{644}\x{627} \x{64A}\x{62A}\x{643}\x{644}\x{645}\x{648}\x{646} \x{627}\x{644}\x{644}\x{651}\x{63A}\x{629} \x{627}\x{644}\x{639}\x{631}\x{628}\x{64A}\x{629} \x{641}\x{62D}\x{633}\x{628}\x{61F}"
+ RenderSVGContainer {g} at (10,310) size 231x38
+ RenderSVGText {text} at (10,310) size 231x38 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 231x38
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 231.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 480x360 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.checksum
new file mode 100644
index 0000000..c45e8d6
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.checksum
@@ -0,0 +1 @@
+7b861e90f82beaf90540df8c75b6e60b
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.png
new file mode 100644
index 0000000..8ad319b
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.txt
new file mode 100644
index 0000000..c310448
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.txt
@@ -0,0 +1,34 @@
+layer at (0,0) size 480x360
+ RenderView at (0,0) size 480x360
+layer at (0,0) size 480x360
+ RenderSVGRoot {svg} at (0,0) size 480x360
+ RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+ RenderSVGContainer {g} at (10,24) size 437x261
+ RenderSVGText {text} at (10,24) size 316x20 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 316x20
+ chunk 1 text run 1 at (10.00,40.00) startOffset 0 endOffset 45 width 316.00: "unicode-bidi=\"bidi-override\" direction=\"ltr\"."
+ RenderSVGContainer {g} at (10,63) size 437x22
+ RenderSVGText {text} at (10,63) size 437x22 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 437x22
+ chunk 1 text run 1 at (10.00,80.00) startOffset 0 endOffset 56 width 436.14 LTR override: "Text \"\x{5D0}\x{5E0}\x{5D9} \x{5D9}\x{5DB}\x{5D5}\x{5DC} \x{5DC}\x{5D0}\x{5DB}\x{5D5}\x{5DC} \x{5D6}\x{5DB}\x{5D5}\x{5DB}\x{5D9}\x{5EA} \x{5D5}\x{5D6}\x{5D4} \x{5DC}\x{5D0} \x{5DE}\x{5D6}\x{5D9}\x{5E7} \x{5DC}\x{5D9}\" is in Hebrew"
+ RenderSVGText {text} at (10,124) size 316x20 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 316x20
+ chunk 1 text run 1 at (10.00,140.00) startOffset 0 endOffset 45 width 316.00: "unicode-bidi=\"bidi-override\" direction=\"rtl\"."
+ RenderSVGContainer {g} at (10,163) size 437x22
+ RenderSVGText {text} at (10,163) size 437x22 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 437x22
+ chunk 1 (end anchor) text run 1 at (10.00,180.00) startOffset 0 endOffset 56 width 436.14 RTL override: "Text \"\x{5D0}\x{5E0}\x{5D9} \x{5D9}\x{5DB}\x{5D5}\x{5DC} \x{5DC}\x{5D0}\x{5DB}\x{5D5}\x{5DC} \x{5D6}\x{5DB}\x{5D5}\x{5DB}\x{5D9}\x{5EA} \x{5D5}\x{5D6}\x{5D4} \x{5DC}\x{5D0} \x{5DE}\x{5D6}\x{5D9}\x{5E7} \x{5DC}\x{5D9}\" is in Hebrew"
+ RenderSVGText {text} at (10,224) size 274x20 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 274x20
+ chunk 1 text run 1 at (10.00,240.00) startOffset 0 endOffset 38 width 274.00: "unicode-bidi=\"normal\" direction=\"rtl\"."
+ RenderSVGContainer {g} at (10,263) size 437x22
+ RenderSVGText {text} at (10,263) size 437x22 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 437x22
+ chunk 1 (end anchor) text run 1 at (10.00,280.00) startOffset 0 endOffset 12 width 93.00: "is in Hebrew"
+ chunk 1 (end anchor) text run 1 at (103.00,280.00) startOffset 0 endOffset 40 width 310.14 RTL: " \"\x{5D0}\x{5E0}\x{5D9} \x{5D9}\x{5DB}\x{5D5}\x{5DC} \x{5DC}\x{5D0}\x{5DB}\x{5D5}\x{5DC} \x{5D6}\x{5DB}\x{5D5}\x{5DB}\x{5D9}\x{5EA} \x{5D5}\x{5D6}\x{5D4} \x{5DC}\x{5D0} \x{5DE}\x{5D6}\x{5D9}\x{5E7} \x{5DC}\x{5D9}\" "
+ chunk 1 (end anchor) text run 1 at (413.14,280.00) startOffset 0 endOffset 4 width 33.00: "Text"
+ RenderSVGContainer {g} at (10,310) size 231x38
+ RenderSVGText {text} at (10,310) size 231x38 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 231x38
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 231.00: "$Revision: 1.6 $"
+ RenderSVGPath {rect} at (0,0) size 480x360 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt
index d9dbc83..f823e3b 100644
--- a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt
@@ -4,8 +4,8 @@
RenderSVGRoot {svg} at (0,0) size 480x360
RenderSVGHiddenContainer {defs} at (0,0) size 0x0
RenderSVGContainer {g} at (51,40) size 389x249
- RenderSVGText {text} at (51,40) size 160x19 contains 1 chunk(s)
- RenderSVGInlineText {#text} at (0,0) size 160x19
+ RenderSVGText {text} at (51,40) size 159x19 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 159x19
chunk 1 (end anchor) text run 1 at (51.55,55.00) startOffset 0 endOffset 5 width 51.01: "animV"
chunk 1 (end anchor) text run 2 at (101.50,55.00) startOffset 5 endOffset 16 width 90.56: "al != baseV"
chunk 1 (end anchor) text run 3 at (190.99,55.00) startOffset 16 endOffset 19 width 19.01: "al:"
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt
index 530c8db..6070daf 100644
--- a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt
@@ -25,8 +25,8 @@
chunk 1 text run 1 at (50.00,60.00) startOffset 0 endOffset 1 width 10.01: "V"
chunk 1 text run 2 at (59.12,60.00) startOffset 1 endOffset 7 width 35.01: "alid s"
chunk 1 text run 3 at (94.09,60.00) startOffset 7 endOffset 9 width 9.16: "tr"
- chunk 1 text run 4 at (103.27,60.00) startOffset 9 endOffset 17 width 55.03: "ing on S"
- chunk 1 text run 5 at (157.67,60.00) startOffset 17 endOffset 18 width 10.01: "V"
+ chunk 1 text run 4 at (103.26,60.00) startOffset 9 endOffset 17 width 55.03: "ing on S"
+ chunk 1 text run 5 at (157.67,60.00) startOffset 17 endOffset 18 width 10.00: "V"
chunk 1 text run 6 at (167.04,60.00) startOffset 18 endOffset 24 width 49.20: "GLengt"
chunk 1 text run 7 at (216.20,60.00) startOffset 24 endOffset 25 width 8.34: "h"
RenderSVGText {text} at (50,88) size 185x15 contains 1 chunk(s)
@@ -34,9 +34,9 @@
chunk 1 text run 1 at (50.00,100.00) startOffset 0 endOffset 2 width 12.51: "In"
chunk 1 text run 2 at (62.31,100.00) startOffset 2 endOffset 3 width 7.50: "v"
chunk 1 text run 3 at (69.55,100.00) startOffset 3 endOffset 9 width 35.01: "alid s"
- chunk 1 text run 4 at (104.51,100.00) startOffset 9 endOffset 11 width 9.16: "tr"
+ chunk 1 text run 4 at (104.51,100.00) startOffset 9 endOffset 11 width 9.17: "tr"
chunk 1 text run 5 at (113.69,100.00) startOffset 11 endOffset 19 width 55.03: "ing on S"
- chunk 1 text run 6 at (168.10,100.00) startOffset 19 endOffset 20 width 10.01: "V"
+ chunk 1 text run 6 at (168.10,100.00) startOffset 19 endOffset 20 width 10.00: "V"
chunk 1 text run 7 at (177.47,100.00) startOffset 20 endOffset 26 width 49.20: "GLengt"
chunk 1 text run 8 at (226.62,100.00) startOffset 26 endOffset 27 width 8.34: "h"
RenderSVGText {text} at (50,128) size 167x15 contains 1 chunk(s)
@@ -44,20 +44,20 @@
chunk 1 text run 1 at (50.00,140.00) startOffset 0 endOffset 1 width 10.01: "V"
chunk 1 text run 2 at (59.12,140.00) startOffset 1 endOffset 7 width 35.01: "alid s"
chunk 1 text run 3 at (94.09,140.00) startOffset 7 endOffset 9 width 9.16: "tr"
- chunk 1 text run 4 at (103.27,140.00) startOffset 9 endOffset 17 width 55.03: "ing on S"
- chunk 1 text run 5 at (157.67,140.00) startOffset 17 endOffset 18 width 10.01: "V"
+ chunk 1 text run 4 at (103.26,140.00) startOffset 9 endOffset 17 width 55.03: "ing on S"
+ chunk 1 text run 5 at (157.67,140.00) startOffset 17 endOffset 18 width 10.00: "V"
chunk 1 text run 6 at (167.04,140.00) startOffset 18 endOffset 19 width 11.67: "G"
- chunk 1 text run 7 at (178.62,140.00) startOffset 19 endOffset 24 width 38.36: "Angle"
+ chunk 1 text run 7 at (178.62,140.00) startOffset 19 endOffset 24 width 38.35: "Angle"
RenderSVGText {text} at (50,168) size 178x15 contains 1 chunk(s)
RenderSVGInlineText {#text} at (0,0) size 178x15
chunk 1 text run 1 at (50.00,180.00) startOffset 0 endOffset 2 width 12.51: "In"
chunk 1 text run 2 at (62.31,180.00) startOffset 2 endOffset 3 width 7.50: "v"
chunk 1 text run 3 at (69.55,180.00) startOffset 3 endOffset 9 width 35.01: "alid s"
- chunk 1 text run 4 at (104.51,180.00) startOffset 9 endOffset 11 width 9.16: "tr"
+ chunk 1 text run 4 at (104.51,180.00) startOffset 9 endOffset 11 width 9.17: "tr"
chunk 1 text run 5 at (113.69,180.00) startOffset 11 endOffset 19 width 55.03: "ing on S"
- chunk 1 text run 6 at (168.10,180.00) startOffset 19 endOffset 20 width 10.01: "V"
+ chunk 1 text run 6 at (168.10,180.00) startOffset 19 endOffset 20 width 10.00: "V"
chunk 1 text run 7 at (177.47,180.00) startOffset 20 endOffset 21 width 11.67: "G"
- chunk 1 text run 8 at (189.05,180.00) startOffset 21 endOffset 26 width 38.36: "Angle"
+ chunk 1 text run 8 at (189.05,180.00) startOffset 21 endOffset 26 width 38.35: "Angle"
RenderSVGContainer {g} at (10,314) size 227x33
RenderSVGText {text} at (10,314) size 227x33 contains 1 chunk(s)
RenderSVGInlineText {#text} at (0,0) size 227x33
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-06-t-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-06-t-expected.txt
index 69da85b..720feb6 100644
--- a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-06-t-expected.txt
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-06-t-expected.txt
@@ -6,8 +6,8 @@
RenderSVGText {text} at (7,0) size 67x10 contains 1 chunk(s)
RenderSVGInlineText {#text} at (0,0) size 67x10
chunk 1 text run 1 at (7.00,8.00) startOffset 0 endOffset 18 width 66.33: "Test a motion path"
- RenderSVGText {text} at (11,10) size 52x10 contains 1 chunk(s)
- RenderSVGInlineText {#text} at (0,0) size 52x10
+ RenderSVGText {text} at (11,10) size 53x10 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 53x10
chunk 1 text run 1 at (11.00,18.00) startOffset 0 endOffset 17 width 52.00: "'path' attribute."
RenderSVGContainer {g} at (42,120) size 426x192
RenderSVGPath {path} at (84,120) size 312x144 [stroke={[type=SOLID] [color=#000000]}] [data="M 15 43 C 15 43 36 20 65 33"]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-align-08-b-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-align-08-b-expected.checksum
new file mode 100644
index 0000000..fa3f0e7
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-align-08-b-expected.checksum
@@ -0,0 +1 @@
+6f76cc4b3e8c9b0bcd13be134e19cf68
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-align-08-b-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-align-08-b-expected.png
new file mode 100644
index 0000000..5e8c723
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-align-08-b-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-align-08-b-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-align-08-b-expected.txt
new file mode 100644
index 0000000..f383d59
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-align-08-b-expected.txt
@@ -0,0 +1,23 @@
+layer at (0,0) size 480x360
+ RenderView at (0,0) size 480x360
+layer at (0,0) size 480x360
+ RenderSVGRoot {svg} at (0,0) size 480x360
+ RenderSVGContainer {g} at (50,79) size 383x152
+ RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+ RenderSVGText {text} at (50,79) size 383x151 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 225x151
+ chunk 1 text run 1 at (50.00,200.00) startOffset 0 endOffset 3 width 225.00: "a\x{729C}\x{923}"
+ RenderSVGTSpan {tspan} at (0,0) size 113x75
+ RenderSVGInlineText {#text} at (225,61) size 113x75
+ chunk 1 text run 1 at (275.00,200.00) startOffset 0 endOffset 3 width 112.50: "a\x{729C}\x{923}"
+ RenderSVGTSpan {tspan} at (0,0) size 46x30
+ RenderSVGInlineText {#text} at (337,97) size 46x30
+ chunk 1 text run 1 at (387.50,200.00) startOffset 0 endOffset 3 width 45.00: "a\x{729C}\x{923}"
+ RenderSVGInlineText {#text} at (0,0) size 0x0
+ RenderSVGPath {line} at (50,199) size 383x2 [stroke={[type=SOLID] [color=#0000FF]}] [fill={[type=SOLID] [color=#000000]}] [x1=50.00] [y1=200.00] [x2=433.00] [y2=200.00]
+ RenderSVGPath {line} at (50,229) size 383x2 [stroke={[type=SOLID] [color=#FF0000]}] [fill={[type=SOLID] [color=#000000]}] [x1=50.00] [y1=230.00] [x2=433.00] [y2=230.00]
+ RenderSVGPath {line} at (50,94) size 383x2 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=SOLID] [color=#000000]}] [x1=50.00] [y1=95.00] [x2=433.00] [y2=95.00]
+ RenderSVGText {text} at (10,304) size 264x46 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 264x46
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 480x360 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-fonts-03-t-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-fonts-03-t-expected.checksum
new file mode 100644
index 0000000..1916ce7
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-fonts-03-t-expected.checksum
@@ -0,0 +1 @@
+63fb15725aeac8c42bbdf37f4657bdac
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-fonts-03-t-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-fonts-03-t-expected.png
new file mode 100644
index 0000000..91d6647
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-fonts-03-t-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-fonts-03-t-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-fonts-03-t-expected.txt
new file mode 100644
index 0000000..e517ac7
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-fonts-03-t-expected.txt
@@ -0,0 +1,34 @@
+layer at (0,0) size 480x360
+ RenderView at (0,0) size 480x360
+layer at (0,0) size 480x360
+ RenderSVGRoot {svg} at (0,0) size 480x360
+ RenderSVGContainer {g} at (15,32) size 403x187
+ RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+ RenderSVGText {text} at (15,43) size 241x22 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 241x22
+ chunk 1 text run 1 at (15.00,60.00) startOffset 0 endOffset 32 width 241.00: "font-family = \"Haettenschweiler\""
+ RenderSVGText {text} at (340,32) size 42x35 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 42x35
+ chunk 1 text run 1 at (340.00,60.00) startOffset 0 endOffset 3 width 41.58: "ABC"
+ RenderSVGText {text} at (15,93) size 213x22 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 213x22
+ chunk 1 text run 1 at (15.00,110.00) startOffset 0 endOffset 28 width 213.00: "font-family = \"Charlesworth\""
+ RenderSVGText {text} at (340,82) size 78x35 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 78x35
+ chunk 1 text run 1 at (340.00,110.00) startOffset 0 endOffset 3 width 77.14: "ABC"
+ RenderSVGText {text} at (15,143) size 215x22 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 215x22
+ chunk 1 text run 1 at (15.00,160.00) startOffset 0 endOffset 28 width 215.00: "font-family = \"Invalid Name\""
+ RenderSVGText {text} at (340,128) size 71x41 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 71x41
+ chunk 1 text run 1 at (340.00,160.00) startOffset 0 endOffset 3 width 71.00: "ABC"
+ RenderSVGText {text} at (15,193) size 195x22 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 195x22
+ chunk 1 text run 1 at (15.00,210.00) startOffset 0 endOffset 27 width 195.00: "font-family = not specified"
+ RenderSVGText {text} at (340,178) size 71x41 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 71x41
+ chunk 1 text run 1 at (340.00,210.00) startOffset 0 endOffset 3 width 71.00: "ABC"
+ RenderSVGText {text} at (10,304) size 264x46 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 264x46
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.00: "$Revision: 1.5 $"
+ RenderSVGPath {rect} at (0,0) size 480x360 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-01-t-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-01-t-expected.checksum
new file mode 100644
index 0000000..13944d5
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-01-t-expected.checksum
@@ -0,0 +1 @@
+4d6d1b83140730446747957ef2fafb69
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-01-t-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-01-t-expected.png
new file mode 100644
index 0000000..977e743
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-01-t-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-01-t-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-01-t-expected.txt
new file mode 100644
index 0000000..a3c4bd8
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-01-t-expected.txt
@@ -0,0 +1,41 @@
+layer at (0,0) size 480x360
+ RenderView at (0,0) size 480x360
+layer at (0,0) size 480x360
+ RenderSVGRoot {svg} at (0,0) size 480x360
+ RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+ RenderSVGContainer {g} at (5,3) size 363x287
+ RenderSVGText {text} at (5,3) size 363x46 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 363x46
+ chunk 1 text run 1 at (5.00,40.00) startOffset 0 endOffset 24 width 363.00: "Test left-to-right text."
+ RenderSVGContainer {g} at (10,56) size 244x164
+ RenderSVGText {text} at (10,56) size 232x24 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 232x24
+ chunk 1 text run 1 at (10.00,75.00) startOffset 0 endOffset 33 width 231.46: "Polish: Mog\x{119} je\x{15B}\x{107} szk\x{142}o, i mi ..."
+ RenderSVGText {text} at (10,91) size 244x24 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 244x24
+ chunk 1 text run 1 at (10.00,110.00) startOffset 0 endOffset 32 width 243.96: "Russian: \x{42F} \x{43C}\x{43E}\x{433}\x{443} \x{435}\x{441}\x{442}\x{44C} \x{441}\x{442}\x{435}\x{43A}\x{43B}\x{43E}, ..."
+ RenderSVGText {text} at (10,126) size 195x24 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 195x24
+ chunk 1 text run 1 at (10.00,145.00) startOffset 0 endOffset 23 width 194.01: "Greek: \x{39C}\x{3C0}\x{3BF}\x{3C1}\x{3CE} \x{3BD}\x{3B1} \x{3C6}\x{3AC}\x{3C9} ..."
+ RenderSVGText {text} at (10,161) size 236x24 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 236x24
+ chunk 1 text run 1 at (10.00,180.00) startOffset 0 endOffset 8 width 68.02: "Hebrew: "
+ chunk 1 text run 1 at (78.02,180.00) startOffset 0 endOffset 21 width 148.57 RTL: "\x{5D0}\x{5E0}\x{5D9} \x{5D9}\x{5DB}\x{5D5}\x{5DC} \x{5DC}\x{5D0}\x{5DB}\x{5D5}\x{5DC} \x{5D6}\x{5DB}\x{5D5}\x{5DB}\x{5D9}\x{5EA}"
+ chunk 1 text run 1 at (226.59,180.00) startOffset 0 endOffset 4 width 18.89: " ..."
+ RenderSVGText {text} at (10,196) size 234x24 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 234x24
+ chunk 1 text run 1 at (10.00,215.00) startOffset 0 endOffset 9 width 65.20: "Yiddish: "
+ chunk 1 text run 1 at (75.20,215.00) startOffset 0 endOffset 21 width 149.55 RTL: "\x{5D0}\x{5D9}\x{5DA} \x{5E7}\x{5E2}\x{5DF} \x{5E2}\x{5E1}\x{5DF} \x{5D2}\x{5DC}\x{5D0}\x{5B8}\x{5D6} \x{5D0}\x{5D5}\x{5DF}"
+ chunk 1 text run 1 at (224.75,215.00) startOffset 0 endOffset 4 width 18.89: " ..."
+ RenderSVGContainer {g} at (10,231) size 272x24
+ RenderSVGText {text} at (10,231) size 272x24 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 272x24
+ chunk 1 text run 1 at (10.00,250.00) startOffset 0 endOffset 20 width 271.10: "Chinese:\x{6211}\x{80FD}\x{541E}\x{4E0B}\x{73BB}\x{7483}\x{800C}\x{4E0D}\x{4F24}\x{8EAB}\x{4F53}\x{3002}"
+ RenderSVGContainer {g} at (10,266) size 271x24
+ RenderSVGText {text} at (10,266) size 271x24 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 271x24
+ chunk 1 text run 1 at (10.00,285.00) startOffset 0 endOffset 21 width 270.17: "Japanese: \x{79C1}\x{306F}\x{30AC}\x{30E9}\x{30B9}\x{3092}\x{98DF}\x{3079}\x{307E}\x{3059}\x{3002}"
+ RenderSVGText {text} at (10,304) size 264x46 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 264x46
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.00: "$Revision: 1.7 $"
+ RenderSVGPath {rect} at (0,0) size 480x360 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-02-b-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-02-b-expected.checksum
new file mode 100644
index 0000000..868b893
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-02-b-expected.checksum
@@ -0,0 +1 @@
+9fdf21eef526b0fa6546d71211659975
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-02-b-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-02-b-expected.png
new file mode 100644
index 0000000..60035ce
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-02-b-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-02-b-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-02-b-expected.txt
new file mode 100644
index 0000000..d2b5c3f
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-02-b-expected.txt
@@ -0,0 +1,33 @@
+layer at (0,0) size 480x360
+ RenderView at (0,0) size 480x360
+layer at (0,0) size 480x360
+ RenderSVGRoot {svg} at (0,0) size 480x360
+ RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+ RenderSVGContainer {g} at (0,24) size 433x261
+ RenderSVGText {text} at (10,24) size 316x20 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 316x20
+ chunk 1 text run 1 at (10.00,40.00) startOffset 0 endOffset 45 width 316.00: "unicode-bidi=\"bidi-override\" direction=\"ltr\"."
+ RenderSVGContainer {g} at (10,60) size 423x25
+ RenderSVGText {text} at (10,60) size 423x25 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 423x25
+ chunk 1 text run 1 at (10.00,80.00) startOffset 0 endOffset 56 width 422.63 LTR override: "Text \"\x{5D0}\x{5E0}\x{5D9} \x{5D9}\x{5DB}\x{5D5}\x{5DC} \x{5DC}\x{5D0}\x{5DB}\x{5D5}\x{5DC} \x{5D6}\x{5DB}\x{5D5}\x{5DB}\x{5D9}\x{5EA} \x{5D5}\x{5D6}\x{5D4} \x{5DC}\x{5D0} \x{5DE}\x{5D6}\x{5D9}\x{5E7} \x{5DC}\x{5D9}\" is in Hebrew"
+ RenderSVGText {text} at (10,124) size 316x20 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 316x20
+ chunk 1 text run 1 at (10.00,140.00) startOffset 0 endOffset 45 width 316.00: "unicode-bidi=\"bidi-override\" direction=\"rtl\"."
+ RenderSVGContainer {g} at (0,160) size 10x25
+ RenderSVGText {text} at (-413,160) size 423x25 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 423x25
+ chunk 1 text run 1 at (-412.63,180.00) startOffset 0 endOffset 56 width 422.63 RTL override: "Text \"\x{5D0}\x{5E0}\x{5D9} \x{5D9}\x{5DB}\x{5D5}\x{5DC} \x{5DC}\x{5D0}\x{5DB}\x{5D5}\x{5DC} \x{5D6}\x{5DB}\x{5D5}\x{5DB}\x{5D9}\x{5EA} \x{5D5}\x{5D6}\x{5D4} \x{5DC}\x{5D0} \x{5DE}\x{5D6}\x{5D9}\x{5E7} \x{5DC}\x{5D9}\" is in Hebrew"
+ RenderSVGText {text} at (10,224) size 274x20 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 274x20
+ chunk 1 text run 1 at (10.00,240.00) startOffset 0 endOffset 38 width 274.00: "unicode-bidi=\"normal\" direction=\"ltr\"."
+ RenderSVGContainer {g} at (0,260) size 10x25
+ RenderSVGText {text} at (-413,260) size 423x25 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 423x25
+ chunk 1 text run 1 at (-412.63,280.00) startOffset 0 endOffset 12 width 99.04: "is in Hebrew"
+ chunk 1 text run 1 at (-313.60,280.00) startOffset 0 endOffset 40 width 288.59 RTL: " \"\x{5D0}\x{5E0}\x{5D9} \x{5D9}\x{5DB}\x{5D5}\x{5DC} \x{5DC}\x{5D0}\x{5DB}\x{5D5}\x{5DC} \x{5D6}\x{5DB}\x{5D5}\x{5DB}\x{5D9}\x{5EA} \x{5D5}\x{5D6}\x{5D4} \x{5DC}\x{5D0} \x{5DE}\x{5D6}\x{5D9}\x{5E7} \x{5DC}\x{5D9}\" "
+ chunk 1 text run 1 at (-25.01,280.00) startOffset 0 endOffset 4 width 35.01: "Text"
+ RenderSVGText {text} at (10,304) size 264x46 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 264x46
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.00: "$Revision: 1.9 $"
+ RenderSVGPath {rect} at (0,0) size 480x360 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-03-b-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-03-b-expected.checksum
new file mode 100644
index 0000000..1cf9c39
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-03-b-expected.checksum
@@ -0,0 +1 @@
+253a852fd30b09686946a43e83add48e
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-03-b-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-03-b-expected.png
new file mode 100644
index 0000000..cbc65be
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-03-b-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-03-b-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-03-b-expected.txt
new file mode 100644
index 0000000..ab663fd
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-03-b-expected.txt
@@ -0,0 +1,142 @@
+layer at (0,0) size 480x360
+ RenderView at (0,0) size 480x360
+layer at (0,0) size 480x360
+ RenderSVGRoot {svg} at (0,0) size 480x360
+ RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+ RenderSVGContainer {g} at (60,10) size 376x350
+ RenderSVGContainer {g} at (60,10) size 376x350
+ RenderSVGText {text} at (60,10) size 20x337 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 20x337
+ chunk 1 (vertical) text run 1 at (64.42,10.00) startOffset 0 endOffset 1 height 18.76: "T"
+ chunk 1 (vertical) text run 2 at (64.42,18.55) startOffset 1 endOffset 2 height 18.76: "e"
+ chunk 1 (vertical) text run 3 at (64.42,26.34) startOffset 2 endOffset 3 height 18.76: "x"
+ chunk 1 (vertical) text run 4 at (64.42,33.34) startOffset 3 endOffset 4 height 18.76: "t"
+ chunk 1 (vertical) text run 5 at (64.42,37.23) startOffset 4 endOffset 5 height 18.76: " "
+ chunk 1 (vertical) text run 6 at (64.42,41.12) startOffset 5 endOffset 6 height 18.76: "\""
+ chunk 1 (vertical) text run 7 at (64.42,46.09) startOffset 6 endOffset 7 height 18.76: "\x{6211}"
+ chunk 1 (vertical) text run 8 at (64.42,64.84) startOffset 7 endOffset 8 height 18.76: "\x{80FD}"
+ chunk 1 (vertical) text run 9 at (64.42,83.60) startOffset 8 endOffset 9 height 18.76: "\x{541E}"
+ chunk 1 (vertical) text run 10 at (64.42,102.36) startOffset 9 endOffset 10 height 18.76: "\x{4E0B}"
+ chunk 1 (vertical) text run 11 at (64.42,121.12) startOffset 10 endOffset 11 height 18.76: "\x{73BB}"
+ chunk 1 (vertical) text run 12 at (64.42,139.88) startOffset 11 endOffset 12 height 18.76: "\x{7483}"
+ chunk 1 (vertical) text run 13 at (64.42,158.63) startOffset 12 endOffset 13 height 18.76: "\x{800C}"
+ chunk 1 (vertical) text run 14 at (64.42,177.39) startOffset 13 endOffset 14 height 18.76: "\x{4E0D}"
+ chunk 1 (vertical) text run 15 at (64.42,196.15) startOffset 14 endOffset 15 height 18.76: "\x{4F24}"
+ chunk 1 (vertical) text run 16 at (64.42,214.91) startOffset 15 endOffset 16 height 18.76: "\x{8EAB}"
+ chunk 1 (vertical) text run 17 at (64.42,233.67) startOffset 16 endOffset 17 height 18.76: "\x{4F53}"
+ chunk 1 (vertical) text run 18 at (64.42,252.42) startOffset 17 endOffset 18 height 18.76: "\x{3002}"
+ chunk 1 (vertical) text run 19 at (64.42,271.18) startOffset 18 endOffset 19 height 18.76: "\""
+ chunk 1 (vertical) text run 20 at (64.42,276.15) startOffset 19 endOffset 20 height 18.76: " "
+ chunk 1 (vertical) text run 21 at (64.42,280.04) startOffset 20 endOffset 21 height 18.76: "i"
+ chunk 1 (vertical) text run 22 at (64.42,283.15) startOffset 21 endOffset 22 height 18.76: "n"
+ chunk 1 (vertical) text run 23 at (64.42,290.94) startOffset 22 endOffset 23 height 18.76: " "
+ chunk 1 (vertical) text run 24 at (64.42,294.83) startOffset 23 endOffset 24 height 18.76: "C"
+ chunk 1 (vertical) text run 25 at (64.42,304.94) startOffset 24 endOffset 25 height 18.76: "h"
+ chunk 1 (vertical) text run 26 at (64.42,312.72) startOffset 25 endOffset 26 height 18.76: "i"
+ chunk 1 (vertical) text run 27 at (64.42,315.83) startOffset 26 endOffset 27 height 18.76: "n"
+ chunk 1 (vertical) text run 28 at (64.42,323.62) startOffset 27 endOffset 28 height 18.76: "e"
+ chunk 1 (vertical) text run 29 at (64.42,331.41) startOffset 28 endOffset 29 height 18.76: "s"
+ chunk 1 (vertical) text run 30 at (64.42,338.41) startOffset 29 endOffset 30 height 18.76: "e"
+ RenderSVGText {text} at (221,10) size 18x500 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 18x500
+ chunk 1 (vertical) text run 1 at (224.81,10.00) startOffset 0 endOffset 1 height 17.42: "J"
+ chunk 1 (vertical) text run 2 at (224.81,16.50) startOffset 1 endOffset 2 height 17.42: "a"
+ chunk 1 (vertical) text run 3 at (224.81,23.73) startOffset 2 endOffset 3 height 17.42: "p"
+ chunk 1 (vertical) text run 4 at (224.81,30.96) startOffset 3 endOffset 4 height 17.42: "a"
+ chunk 1 (vertical) text run 5 at (224.81,38.19) startOffset 4 endOffset 5 height 17.42: "n"
+ chunk 1 (vertical) text run 6 at (224.81,45.42) startOffset 5 endOffset 6 height 17.42: "e"
+ chunk 1 (vertical) text run 7 at (224.81,52.65) startOffset 6 endOffset 7 height 17.42: "s"
+ chunk 1 (vertical) text run 8 at (224.81,59.15) startOffset 7 endOffset 8 height 17.42: "e"
+ chunk 1 (vertical) text run 9 at (224.81,66.38) startOffset 8 endOffset 9 height 17.42: ":"
+ chunk 1 (vertical) text run 10 at (224.81,69.99) startOffset 9 endOffset 10 height 17.42: " "
+ chunk 1 (vertical) text run 11 at (224.81,73.60) startOffset 10 endOffset 11 height 17.42: "\x{79C1}"
+ chunk 1 (vertical) text run 12 at (224.81,91.02) startOffset 11 endOffset 12 height 17.42: "\x{306F}"
+ chunk 1 (vertical) text run 13 at (224.81,108.44) startOffset 12 endOffset 13 height 17.42: "\x{30AC}"
+ chunk 1 (vertical) text run 14 at (224.81,125.86) startOffset 13 endOffset 14 height 17.42: "\x{30E9}"
+ chunk 1 (vertical) text run 15 at (224.81,143.28) startOffset 14 endOffset 15 height 17.42: "\x{30B9}"
+ chunk 1 (vertical) text run 16 at (224.81,160.69) startOffset 15 endOffset 16 height 17.42: "\x{3092}"
+ chunk 1 (vertical) text run 17 at (224.81,178.11) startOffset 16 endOffset 17 height 17.42: "\x{98DF}"
+ chunk 1 (vertical) text run 18 at (224.81,195.53) startOffset 17 endOffset 18 height 17.42: "\x{3079}"
+ chunk 1 (vertical) text run 19 at (224.81,212.95) startOffset 18 endOffset 19 height 17.42: "\x{3089}"
+ chunk 1 (vertical) text run 20 at (224.81,230.37) startOffset 19 endOffset 20 height 17.42: "\x{308C}"
+ chunk 1 (vertical) text run 21 at (224.81,247.78) startOffset 20 endOffset 21 height 17.42: "\x{307E}"
+ chunk 1 (vertical) text run 22 at (224.81,265.20) startOffset 21 endOffset 22 height 17.42: "\x{3059}"
+ chunk 1 (vertical) text run 23 at (224.81,282.62) startOffset 22 endOffset 23 height 17.42: "\x{3002}"
+ chunk 1 (vertical) text run 24 at (224.81,300.04) startOffset 23 endOffset 24 height 17.42: "\x{305D}"
+ chunk 1 (vertical) text run 25 at (224.81,317.46) startOffset 24 endOffset 25 height 17.42: "\x{308C}"
+ chunk 1 (vertical) text run 26 at (224.81,334.87) startOffset 25 endOffset 26 height 17.42: "\x{306F}"
+ chunk 1 (vertical) text run 27 at (224.81,352.29) startOffset 26 endOffset 27 height 17.42: "\x{79C1}"
+ chunk 1 (vertical) text run 28 at (224.81,369.71) startOffset 27 endOffset 28 height 17.42: "\x{3092}"
+ chunk 1 (vertical) text run 29 at (224.81,387.13) startOffset 28 endOffset 29 height 17.42: "\x{50B7}"
+ chunk 1 (vertical) text run 30 at (224.81,404.54) startOffset 29 endOffset 30 height 17.42: "\x{3064}"
+ chunk 1 (vertical) text run 31 at (224.81,421.96) startOffset 30 endOffset 31 height 17.42: "\x{3051}"
+ chunk 1 (vertical) text run 32 at (224.81,439.38) startOffset 31 endOffset 32 height 17.42: "\x{307E}"
+ chunk 1 (vertical) text run 33 at (224.81,456.80) startOffset 32 endOffset 33 height 17.42: "\x{305B}"
+ chunk 1 (vertical) text run 34 at (224.81,474.22) startOffset 33 endOffset 34 height 17.42: "\x{3093}"
+ chunk 1 (vertical) text run 35 at (224.81,491.63) startOffset 34 endOffset 35 height 17.42: "\x{3002}"
+ RenderSVGText {text} at (365,13) size 10x469 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 10x469
+ chunk 1 (vertical) text run 1 at (366.01,13.00) startOffset 0 endOffset 1 height 13.40: "J"
+ chunk 1 (vertical) text run 2 at (366.01,26.40) startOffset 1 endOffset 2 height 13.40: "a"
+ chunk 1 (vertical) text run 3 at (366.01,39.80) startOffset 2 endOffset 3 height 13.40: "p"
+ chunk 1 (vertical) text run 4 at (366.01,53.20) startOffset 3 endOffset 4 height 13.40: "a"
+ chunk 1 (vertical) text run 5 at (366.01,66.59) startOffset 4 endOffset 5 height 13.40: "n"
+ chunk 1 (vertical) text run 6 at (366.01,79.99) startOffset 5 endOffset 6 height 13.40: "e"
+ chunk 1 (vertical) text run 7 at (366.01,93.39) startOffset 6 endOffset 7 height 13.40: "s"
+ chunk 1 (vertical) text run 8 at (366.01,106.79) startOffset 7 endOffset 8 height 13.40: "e"
+ chunk 1 (vertical) text run 9 at (366.01,120.19) startOffset 8 endOffset 9 height 13.40: ":"
+ chunk 1 (vertical) text run 10 at (366.01,133.59) startOffset 9 endOffset 10 height 13.40: " "
+ chunk 1 (vertical) text run 11 at (366.01,146.98) startOffset 10 endOffset 11 height 13.40: "\x{79C1}"
+ chunk 1 (vertical) text run 12 at (366.01,160.38) startOffset 11 endOffset 12 height 13.40: "\x{306F}"
+ chunk 1 (vertical) text run 13 at (366.01,173.78) startOffset 12 endOffset 13 height 13.40: "\x{30AC}"
+ chunk 1 (vertical) text run 14 at (366.01,187.18) startOffset 13 endOffset 14 height 13.40: "\x{30E9}"
+ chunk 1 (vertical) text run 15 at (366.01,200.58) startOffset 14 endOffset 15 height 13.40: "\x{30B9}"
+ chunk 1 (vertical) text run 16 at (366.01,213.98) startOffset 15 endOffset 16 height 13.40: "\x{3092}"
+ chunk 1 (vertical) text run 17 at (366.01,227.38) startOffset 16 endOffset 17 height 13.40: "\x{98DF}"
+ chunk 1 (vertical) text run 18 at (366.01,240.77) startOffset 17 endOffset 18 height 13.40: "\x{3079}"
+ chunk 1 (vertical) text run 19 at (366.01,254.17) startOffset 18 endOffset 19 height 13.40: "\x{3089}"
+ chunk 1 (vertical) text run 20 at (366.01,267.57) startOffset 19 endOffset 20 height 13.40: "\x{308C}"
+ chunk 1 (vertical) text run 21 at (366.01,280.97) startOffset 20 endOffset 21 height 13.40: "\x{307E}"
+ chunk 1 (vertical) text run 22 at (366.01,294.37) startOffset 21 endOffset 22 height 13.40: "\x{3059}"
+ chunk 1 (vertical) text run 23 at (366.01,307.77) startOffset 22 endOffset 23 height 13.40: "\x{3002}"
+ chunk 1 (vertical) text run 24 at (366.01,321.16) startOffset 23 endOffset 24 height 13.40: "\x{305D}"
+ chunk 1 (vertical) text run 25 at (366.01,334.56) startOffset 24 endOffset 25 height 13.40: "\x{308C}"
+ chunk 1 (vertical) text run 26 at (366.01,347.96) startOffset 25 endOffset 26 height 13.40: "\x{306F}"
+ chunk 1 (vertical) text run 27 at (366.01,361.36) startOffset 26 endOffset 27 height 13.40: "\x{79C1}"
+ chunk 1 (vertical) text run 28 at (366.01,374.76) startOffset 27 endOffset 28 height 13.40: "\x{3092}"
+ chunk 1 (vertical) text run 29 at (366.01,388.16) startOffset 28 endOffset 29 height 13.40: "\x{50B7}"
+ chunk 1 (vertical) text run 30 at (366.01,401.55) startOffset 29 endOffset 30 height 13.40: "\x{3064}"
+ chunk 1 (vertical) text run 31 at (366.01,414.95) startOffset 30 endOffset 31 height 13.40: "\x{3051}"
+ chunk 1 (vertical) text run 32 at (366.01,428.35) startOffset 31 endOffset 32 height 13.40: "\x{307E}"
+ chunk 1 (vertical) text run 33 at (366.01,441.75) startOffset 32 endOffset 33 height 13.40: "\x{305B}"
+ chunk 1 (vertical) text run 34 at (366.01,455.15) startOffset 33 endOffset 34 height 13.40: "\x{3093}"
+ chunk 1 (vertical) text run 35 at (366.01,468.55) startOffset 34 endOffset 35 height 13.40: "\x{3002}"
+ RenderSVGText {text} at (98,80) size 44x174 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 44x174
+ chunk 1 (vertical) text run 1 at (107.23,80.00) startOffset 0 endOffset 1 height 42.88: "x"
+ chunk 1 (vertical) text run 2 at (107.23,96.00) startOffset 1 endOffset 2 height 42.88: "t"
+ chunk 1 (vertical) text run 3 at (107.23,104.89) startOffset 2 endOffset 3 height 42.88: " "
+ chunk 1 (vertical) text run 4 at (107.23,113.78) startOffset 3 endOffset 4 height 42.88: "\""
+ chunk 1 (vertical) text run 5 at (107.23,125.14) startOffset 4 endOffset 5 height 42.88: "\x{6211}"
+ chunk 1 (vertical) text run 6 at (107.23,168.02) startOffset 5 endOffset 6 height 42.88: "\x{80FD}"
+ chunk 1 (vertical) text run 7 at (107.23,210.89) startOffset 6 endOffset 7 height 42.88: "\x{541E}"
+ RenderSVGText {text} at (255,80) size 50x155 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 50x155
+ chunk 1 (vertical) text run 1 at (265.64,80.00) startOffset 0 endOffset 1 height 48.23: "s"
+ chunk 1 (vertical) text run 2 at (265.64,98.00) startOffset 1 endOffset 2 height 48.23: "e"
+ chunk 1 (vertical) text run 3 at (265.64,118.02) startOffset 2 endOffset 3 height 48.23: ":"
+ chunk 1 (vertical) text run 4 at (265.64,128.02) startOffset 3 endOffset 4 height 48.23: " "
+ chunk 1 (vertical) text run 5 at (265.64,138.03) startOffset 4 endOffset 5 height 48.23: "\x{79C1}"
+ chunk 1 (vertical) text run 6 at (265.64,186.26) startOffset 5 endOffset 6 height 48.23: "\x{306F}"
+ RenderSVGText {text} at (404,80) size 32x258 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 32x258
+ chunk 1 (vertical) text run 1 at (407.23,80.00) startOffset 0 endOffset 1 height 42.88: "s"
+ chunk 1 (vertical) text run 2 at (407.23,122.88) startOffset 1 endOffset 2 height 42.88: "e"
+ chunk 1 (vertical) text run 3 at (407.23,165.75) startOffset 2 endOffset 3 height 42.88: ":"
+ chunk 1 (vertical) text run 4 at (407.23,208.62) startOffset 3 endOffset 4 height 42.88: " "
+ chunk 1 (vertical) text run 5 at (407.23,251.50) startOffset 4 endOffset 5 height 42.88: "\x{79C1}"
+ chunk 1 (vertical) text run 6 at (407.23,294.38) startOffset 5 endOffset 6 height 42.88: "\x{306F}"
+ RenderSVGText {text} at (10,304) size 264x46 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 264x46
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.00: "$Revision: 1.6 $"
+ RenderSVGPath {rect} at (0,0) size 480x360 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-04-t-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-04-t-expected.checksum
new file mode 100644
index 0000000..548e052
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-04-t-expected.checksum
@@ -0,0 +1 @@
+a0fe0e179cb80254a7c944bc98901278
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-04-t-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-04-t-expected.png
new file mode 100644
index 0000000..6c4369f
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-04-t-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-04-t-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-04-t-expected.txt
new file mode 100644
index 0000000..9f78fc6
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-intro-04-t-expected.txt
@@ -0,0 +1,39 @@
+layer at (0,0) size 480x360
+ RenderView at (0,0) size 480x360
+layer at (0,0) size 480x360
+ RenderSVGRoot {svg} at (0,0) size 480x360
+ RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+ RenderSVGContainer {g} at (10,5) size 449x240
+ RenderSVGText {text} at (10,5) size 138x19 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 138x19
+ chunk 1 text run 1 at (10.00,20.00) startOffset 0 endOffset 21 width 138.00: "Test horizontal text."
+ RenderSVGContainer {g} at (10,41) size 449x204
+ RenderSVGText {text} at (10,41) size 307x24 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 307x24
+ chunk 1 text run 1 at (10.00,60.00) startOffset 0 endOffset 42 width 306.11: "Polish: Mog\x{119} je\x{15B}\x{107} szk\x{142}o, i mi nie szkodzi."
+ RenderSVGText {text} at (10,71) size 380x24 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 380x24
+ chunk 1 text run 1 at (10.00,90.00) startOffset 0 endOffset 47 width 379.01: "Russian: \x{42F} \x{43C}\x{43E}\x{433}\x{443} \x{435}\x{441}\x{442}\x{44C} \x{441}\x{442}\x{435}\x{43A}\x{43B}\x{43E}, \x{44D}\x{442}\x{43E} \x{43C}\x{43D}\x{435} \x{43D}\x{435} \x{432}\x{440}\x{435}\x{434}\x{438}\x{442}."
+ RenderSVGText {text} at (10,103) size 431x22 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 431x22
+ chunk 1 text run 1 at (10.00,120.00) startOffset 0 endOffset 57 width 430.95: "Greek: \x{39C}\x{3C0}\x{3BF}\x{3C1}\x{3CE} \x{3BD}\x{3B1} \x{3C6}\x{3AC}\x{3C9} \x{3C3}\x{3C0}\x{3B1}\x{3C3}\x{3BC}\x{3AD}\x{3BD}\x{3B1} \x{3B3}\x{3C5}\x{3B1}\x{3BB}\x{3B9}\x{3AC} \x{3C7}\x{3C9}\x{3C1}\x{3AF}\x{3C2} \x{3BD}\x{3B1} \x{3C0}\x{3AC}\x{3B8}\x{3C9} \x{3C4}\x{3AF}\x{3C0}\x{3BF}\x{3C4}\x{3B1}."
+ RenderSVGText {text} at (10,131) size 400x24 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 400x24
+ chunk 1 text run 1 at (10.00,150.00) startOffset 0 endOffset 6 width 43.82: "Text \""
+ chunk 1 text run 1 at (53.82,150.00) startOffset 0 endOffset 36 width 251.04 RTL: "\x{5D0}\x{5E0}\x{5D9} \x{5D9}\x{5DB}\x{5D5}\x{5DC} \x{5DC}\x{5D0}\x{5DB}\x{5D5}\x{5DC} \x{5D6}\x{5DB}\x{5D5}\x{5DB}\x{5D9}\x{5EA} \x{5D5}\x{5D6}\x{5D4} \x{5DC}\x{5D0} \x{5DE}\x{5D6}\x{5D9}\x{5E7} \x{5DC}\x{5D9}"
+ chunk 1 text run 1 at (304.86,150.00) startOffset 0 endOffset 14 width 104.29: "\" is in Hebrew"
+ RenderSVGText {text} at (10,161) size 366x24 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 366x24
+ chunk 1 text run 1 at (10.00,180.00) startOffset 0 endOffset 9 width 65.20: "Yiddish: "
+ chunk 1 text run 1 at (75.20,180.00) startOffset 0 endOffset 40 width 295.62 RTL: "\x{5D0}\x{5D9}\x{5DA} \x{5E7}\x{5E2}\x{5DF} \x{5E2}\x{5E1}\x{5DF} \x{5D2}\x{5DC}\x{5D0}\x{5B8}\x{5D6} \x{5D0}\x{5D5}\x{5DF} \x{5E2}\x{5E1} \x{5D8}\x{5D5}\x{5D8} \x{5DE}\x{5D9}\x{5E8} \x{5E0}\x{5D9}\x{5E9}\x{5D8} \x{5F0}\x{5F2}"
+ chunk 1 text run 1 at (370.82,180.00) startOffset 0 endOffset 1 width 4.72: "."
+ RenderSVGText {text} at (10,191) size 272x24 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 272x24
+ chunk 1 text run 1 at (10.00,210.00) startOffset 0 endOffset 20 width 271.10: "Chinese:\x{6211}\x{80FD}\x{541E}\x{4E0B}\x{73BB}\x{7483}\x{800C}\x{4E0D}\x{4F24}\x{8EAB}\x{4F53}\x{3002}"
+ RenderSVGText {text} at (10,223) size 449x22 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 449x22
+ chunk 1 text run 1 at (10.00,240.00) startOffset 0 endOffset 35 width 448.39: "Japanese: \x{79C1}\x{306F}\x{30AC}\x{30E9}\x{30B9}\x{3092}\x{98DF}\x{3079}\x{3089}\x{308C}\x{307E}\x{3059}\x{3002}\x{305D}\x{308C}\x{306F}\x{79C1}\x{3092}\x{50B7}\x{3064}\x{3051}\x{307E}\x{305B}\x{3093}\x{3002}"
+ RenderSVGText {text} at (10,304) size 284x46 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 284x46
+ chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 17 width 284.00: "$Revision: 1.10 $"
+ RenderSVGPath {rect} at (0,0) size 480x360 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac/svg/text/bidi-reorder-value-lists-expected.checksum b/LayoutTests/platform/mac/svg/text/bidi-reorder-value-lists-expected.checksum
new file mode 100644
index 0000000..3a54419
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/text/bidi-reorder-value-lists-expected.checksum
@@ -0,0 +1 @@
+b5700b4960426f2c6994d4d54f163f7f
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/text/bidi-reorder-value-lists-expected.png b/LayoutTests/platform/mac/svg/text/bidi-reorder-value-lists-expected.png
new file mode 100644
index 0000000..f84a731
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/text/bidi-reorder-value-lists-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/text/bidi-reorder-value-lists-expected.txt b/LayoutTests/platform/mac/svg/text/bidi-reorder-value-lists-expected.txt
new file mode 100644
index 0000000..6ad05a9
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/text/bidi-reorder-value-lists-expected.txt
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 400x400
+ RenderSVGRoot {svg} at (40,60) size 360x196
+ RenderSVGContainer {g} at (40,60) size 360x196 [transform={m=((4.00,0.00)(0.00,4.00)) t=(0.00,0.00)}]
+ RenderSVGText {text} at (10,15) size 90x19 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 90x19
+ chunk 1 text run 1 at (10.00,30.00) startOffset 0 endOffset 1 width 9.75: "T"
+ chunk 1 text run 1 at (20.00,30.00) startOffset 0 endOffset 1 width 7.00: "e"
+ chunk 1 text run 1 at (30.00,30.00) startOffset 0 endOffset 1 width 6.25: "s"
+ chunk 1 text run 1 at (40.00,30.00) startOffset 0 endOffset 1 width 4.50: "t"
+ chunk 1 text run 1 at (50.00,30.00) startOffset 0 endOffset 1 width 4.00: " "
+ chunk 1 text run 1 at (54.00,30.00) startOffset 0 endOffset 5 width 45.57 RTL: "\x{5D0}\x{5D1}\x{5D2}\x{5D3}\x{5D4}"
+ RenderSVGText {text} at (10,45) size 89x19 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 89x19
+ chunk 1 text run 1 at (10.00,60.00) startOffset 0 endOffset 1 width 9.75: "T"
+ chunk 1 text run 1 at (20.00,60.00) startOffset 0 endOffset 1 width 7.00: "e"
+ chunk 1 text run 1 at (30.00,60.00) startOffset 0 endOffset 1 width 6.25: "s"
+ chunk 1 text run 1 at (40.00,60.00) startOffset 0 endOffset 1 width 4.50: "t"
+ chunk 1 text run 1 at (50.00,60.00) startOffset 0 endOffset 1 width 4.00: " "
+ chunk 1 text run 1 at (55.00,60.00) startOffset 0 endOffset 1 width 11.39 RTL: "\x{5D4}"
+ chunk 1 text run 1 at (64.00,60.00) startOffset 0 endOffset 1 width 8.02 RTL: "\x{5D3}"
+ chunk 1 text run 1 at (72.00,60.00) startOffset 0 endOffset 1 width 6.84 RTL: "\x{5D2}"
+ chunk 1 text run 1 at (79.00,60.00) startOffset 0 endOffset 1 width 9.01 RTL: "\x{5D1}"
+ chunk 1 text run 1 at (88.00,60.00) startOffset 0 endOffset 1 width 10.32 RTL: "\x{5D0}"
diff --git a/LayoutTests/platform/mac/svg/text/bidi-text-anchor-direction-expected.checksum b/LayoutTests/platform/mac/svg/text/bidi-text-anchor-direction-expected.checksum
new file mode 100644
index 0000000..d062ce2
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/text/bidi-text-anchor-direction-expected.checksum
@@ -0,0 +1 @@
+e0b922b253c8f30b5c30eb01424e171d
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/text/bidi-text-anchor-direction-expected.png b/LayoutTests/platform/mac/svg/text/bidi-text-anchor-direction-expected.png
new file mode 100644
index 0000000..ad4893c
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/text/bidi-text-anchor-direction-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/text/bidi-text-anchor-direction-expected.txt b/LayoutTests/platform/mac/svg/text/bidi-text-anchor-direction-expected.txt
new file mode 100644
index 0000000..b44f196
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/text/bidi-text-anchor-direction-expected.txt
@@ -0,0 +1,23 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,65) size 800x307
+ RenderSVGContainer {g} at (0,65) size 800x307
+ RenderSVGText {text} at (240,39) size 240x14 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 240x14
+ chunk 1 text run 1 at (240.00,50.00) startOffset 0 endOffset 56 width 239.40 LTR override: "Text \"\x{5D0}\x{5E0}\x{5D9} \x{5D9}\x{5DB}\x{5D5}\x{5DC} \x{5DC}\x{5D0}\x{5DB}\x{5D5}\x{5DC} \x{5D6}\x{5DB}\x{5D5}\x{5DB}\x{5D9}\x{5EA} \x{5D5}\x{5D6}\x{5D4} \x{5DC}\x{5D0} \x{5DE}\x{5D6}\x{5D9}\x{5E7} \x{5DC}\x{5D9}\" is in Hebrew"
+ RenderSVGText {text} at (120,69) size 240x14 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 240x14
+ chunk 1 (middle anchor) text run 1 at (120.30,80.00) startOffset 0 endOffset 56 width 239.40 LTR override: "Text \"\x{5D0}\x{5E0}\x{5D9} \x{5D9}\x{5DB}\x{5D5}\x{5DC} \x{5DC}\x{5D0}\x{5DB}\x{5D5}\x{5DC} \x{5D6}\x{5DB}\x{5D5}\x{5DB}\x{5D9}\x{5EA} \x{5D5}\x{5D6}\x{5D4} \x{5DC}\x{5D0} \x{5DE}\x{5D6}\x{5D9}\x{5E7} \x{5DC}\x{5D9}\" is in Hebrew"
+ RenderSVGText {text} at (0,99) size 240x14 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 240x14
+ chunk 1 (end anchor) text run 1 at (0.60,110.00) startOffset 0 endOffset 56 width 239.40 LTR override: "Text \"\x{5D0}\x{5E0}\x{5D9} \x{5D9}\x{5DB}\x{5D5}\x{5DC} \x{5DC}\x{5D0}\x{5DB}\x{5D5}\x{5DC} \x{5D6}\x{5DB}\x{5D5}\x{5DB}\x{5D9}\x{5EA} \x{5D5}\x{5D6}\x{5D4} \x{5DC}\x{5D0} \x{5DE}\x{5D6}\x{5D9}\x{5E7} \x{5DC}\x{5D9}\" is in Hebrew"
+ RenderSVGText {text} at (0,139) size 240x14 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 240x14
+ chunk 1 text run 1 at (0.60,150.00) startOffset 0 endOffset 56 width 239.40 RTL override: "Text \"\x{5D0}\x{5E0}\x{5D9} \x{5D9}\x{5DB}\x{5D5}\x{5DC} \x{5DC}\x{5D0}\x{5DB}\x{5D5}\x{5DC} \x{5D6}\x{5DB}\x{5D5}\x{5DB}\x{5D9}\x{5EA} \x{5D5}\x{5D6}\x{5D4} \x{5DC}\x{5D0} \x{5DE}\x{5D6}\x{5D9}\x{5E7} \x{5DC}\x{5D9}\" is in Hebrew"
+ RenderSVGText {text} at (120,169) size 240x14 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 240x14
+ chunk 1 (middle anchor) text run 1 at (120.30,180.00) startOffset 0 endOffset 56 width 239.40 RTL override: "Text \"\x{5D0}\x{5E0}\x{5D9} \x{5D9}\x{5DB}\x{5D5}\x{5DC} \x{5DC}\x{5D0}\x{5DB}\x{5D5}\x{5DC} \x{5D6}\x{5DB}\x{5D5}\x{5DB}\x{5D9}\x{5EA} \x{5D5}\x{5D6}\x{5D4} \x{5DC}\x{5D0} \x{5DE}\x{5D6}\x{5D9}\x{5E7} \x{5DC}\x{5D9}\" is in Hebrew"
+ RenderSVGText {text} at (240,209) size 240x14 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 240x14
+ chunk 1 (end anchor) text run 1 at (240.00,220.00) startOffset 0 endOffset 56 width 239.40 RTL override: "Text \"\x{5D0}\x{5E0}\x{5D9} \x{5D9}\x{5DB}\x{5D5}\x{5DC} \x{5DC}\x{5D0}\x{5DB}\x{5D5}\x{5DC} \x{5D6}\x{5DB}\x{5D5}\x{5DB}\x{5D9}\x{5EA} \x{5D5}\x{5D6}\x{5D4} \x{5DC}\x{5D0} \x{5DE}\x{5D6}\x{5D9}\x{5E7} \x{5DC}\x{5D9}\" is in Hebrew"
diff --git a/LayoutTests/platform/mac/svg/text/bidi-text-query-expected.checksum b/LayoutTests/platform/mac/svg/text/bidi-text-query-expected.checksum
new file mode 100644
index 0000000..830f91f
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/text/bidi-text-query-expected.checksum
@@ -0,0 +1 @@
+22d31676d7847d3ac865cf5c92062ec5
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/text/bidi-text-query-expected.png b/LayoutTests/platform/mac/svg/text/bidi-text-query-expected.png
new file mode 100644
index 0000000..24c74e2
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/text/bidi-text-query-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/text/bidi-text-query-expected.txt b/LayoutTests/platform/mac/svg/text/bidi-text-query-expected.txt
new file mode 100644
index 0000000..bb5ee72
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/text/bidi-text-query-expected.txt
@@ -0,0 +1,19 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (16,55) size 224x85
+ RenderSVGContainer {g} at (16,55) size 224x85
+ RenderSVGText {text} at (10,33) size 134x21 contains 1 chunk(s)
+ RenderSVGTSpan {tspan} at (0,0) size 134x21
+ RenderSVGInlineText {#text} at (0,0) size 134x21
+ chunk 1 text run 1 at (10.00,50.00) startOffset 0 endOffset 17 width 133.80 LTR override: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644}\x{60C} W3C"
+ RenderSVGText {text} at (10,63) size 123x21 contains 1 chunk(s)
+ RenderSVGTSpan {tspan} at (0,0) size 123x21
+ RenderSVGInlineText {#text} at (0,0) size 123x21
+ chunk 1 text run 1 at (10.00,80.00) startOffset 0 endOffset 12 width 71.40 RTL: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644}"
+ chunk 1 text run 1 at (81.40,80.00) startOffset 0 endOffset 5 width 51.00: "\x{60C} W3C"
+ RenderSVGContainer {g} at (16,55) size 224x85
+ RenderSVGPath {svg:rect} at (16,55) size 149x35 [fill={[type=SOLID] [color=#FF0000] [opacity=0.40]}] [x=10.00] [y=33.71] [width=88.80] [height=20.11]
+ RenderSVGPath {svg:rect} at (171,55) size 69x35 [fill={[type=SOLID] [color=#008000] [opacity=0.40]}] [x=103.60] [y=33.71] [width=40.20] [height=20.11]
+ RenderSVGPath {svg:rect} at (16,105) size 131x35 [fill={[type=SOLID] [color=#FF0000] [opacity=0.40]}] [x=10.00] [y=63.71] [width=77.40] [height=20.11]
+ RenderSVGPath {svg:rect} at (153,105) size 69x35 [fill={[type=SOLID] [color=#008000] [opacity=0.40]}] [x=92.20] [y=63.71] [width=40.20] [height=20.11]
diff --git a/LayoutTests/platform/mac/svg/text/bidi-tspans-expected.checksum b/LayoutTests/platform/mac/svg/text/bidi-tspans-expected.checksum
new file mode 100644
index 0000000..34f4049
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/text/bidi-tspans-expected.checksum
@@ -0,0 +1 @@
+1cafe8cf1cd4b83e483c737584e88359
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/text/bidi-tspans-expected.png b/LayoutTests/platform/mac/svg/text/bidi-tspans-expected.png
new file mode 100644
index 0000000..1f5133f
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/text/bidi-tspans-expected.png
Binary files differ
diff --git a/LayoutTests/platform/mac/svg/text/bidi-tspans-expected.txt b/LayoutTests/platform/mac/svg/text/bidi-tspans-expected.txt
new file mode 100644
index 0000000..eb0f8a5
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/text/bidi-tspans-expected.txt
@@ -0,0 +1,19 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (151,221) size 464x86
+ RenderSVGContainer {g} at (151,221) size 464x86
+ RenderSVGText {text} at (91,133) size 278x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 278x21
+ chunk 1 (middle anchor) text run 1 at (92.00,150.00) startOffset 0 endOffset 10 width 55.80 RTL: ", \x{627}\x{62E}\x{62A}\x{628}\x{627}\x{631}\"!"
+ chunk 1 (middle anchor) text run 1 at (147.80,150.00) startOffset 0 endOffset 14 width 137.40: "dirRTL ubEmbed"
+ chunk 1 (middle anchor) text run 1 at (285.20,150.00) startOffset 0 endOffset 14 width 82.80 RTL: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644} \""
+ RenderSVGText {text} at (91,163) size 278x21 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (194,0) size 84x21
+ chunk 1 (middle anchor) text run 1 at (285.20,180.00) startOffset 0 endOffset 14 width 82.80 RTL: "\x{646}\x{634}\x{627}\x{637} \x{627}\x{644}\x{62A}\x{62F}\x{648}\x{64A}\x{644} \""
+ RenderSVGTSpan {tspan} at (0,0) size 183x21
+ RenderSVGInlineText {#text} at (12,0) size 183x21
+ chunk 1 (middle anchor) text run 1 at (103.40,180.00) startOffset 0 endOffset 8 width 44.40 RTL: ", \x{627}\x{62E}\x{62A}\x{628}\x{627}\x{631}"
+ chunk 1 (middle anchor) text run 1 at (147.80,180.00) startOffset 0 endOffset 14 width 137.40: "dirRTL ubEmbed"
+ RenderSVGInlineText {#text} at (0,0) size 13x21
+ chunk 1 (middle anchor) text run 1 at (92.00,180.00) startOffset 0 endOffset 2 width 11.40 RTL: "\"!"
diff --git a/LayoutTests/platform/mac/svg/text/small-fonts-2-expected.txt b/LayoutTests/platform/mac/svg/text/small-fonts-2-expected.txt
index 529b42e..c96e0ac 100644
--- a/LayoutTests/platform/mac/svg/text/small-fonts-2-expected.txt
+++ b/LayoutTests/platform/mac/svg/text/small-fonts-2-expected.txt
@@ -42,7 +42,7 @@
RenderSVGTSpan {tspan} at (0,0) size 195x11
RenderSVGInlineText {#text} at (0,60) size 195x11
chunk 1 text run 1 at (0.00,60.00) startOffset 0 endOffset 35 width 194.44: "transformations make it equivalent."
- RenderSVGInlineText {#text} at (194,60) size 7x11
+ RenderSVGInlineText {#text} at (194,60) size 6x11
chunk 1 text run 1 at (194.44,60.00) startOffset 0 endOffset 1 width 5.56: " "
RenderSVGTSpan {tspan} at (0,0) size 50x11
RenderSVGInlineText {#text} at (0,75) size 50x11
diff --git a/LayoutTests/platform/mac/svg/text/text-align-02-b-expected.txt b/LayoutTests/platform/mac/svg/text/text-align-02-b-expected.txt
index a765b36..9664684 100644
--- a/LayoutTests/platform/mac/svg/text/text-align-02-b-expected.txt
+++ b/LayoutTests/platform/mac/svg/text/text-align-02-b-expected.txt
@@ -6,7 +6,7 @@
RenderSVGText {text} at (5,9) size 477x39 contains 1 chunk(s)
RenderSVGInlineText {#text} at (0,0) size 477x39
chunk 1 text run 1 at (5.00,40.00) startOffset 0 endOffset 34 width 476.40: "Test 'baseline-shift' (horizontal)"
- RenderSVGContainer {g} at (25,141) size 670x333 [transform={m=((1.00,0.00)(0.00,1.00)) t=(15.00,120.00)}]
+ RenderSVGContainer {g} at (25,141) size 672x333 [transform={m=((1.00,0.00)(0.00,1.00)) t=(15.00,120.00)}]
RenderSVGText {text} at (0,-35) size 349x42 contains 1 chunk(s)
RenderSVGInlineText {#text} at (0,7) size 98x35
chunk 1 text run 1 at (0.00,0.00) startOffset 0 endOffset 6 width 97.20: "Normal"
@@ -15,13 +15,13 @@
chunk 1 text run 1 at (97.20,-7.00) startOffset 0 endOffset 16 width 202.80: "baseline-shift:7"
RenderSVGInlineText {#text} at (300,7) size 49x35
chunk 1 text run 1 at (300.00,0.00) startOffset 0 endOffset 4 width 48.60: "text"
- RenderSVGText {text} at (0,42) size 402x56 contains 1 chunk(s)
+ RenderSVGText {text} at (0,42) size 403x56 contains 1 chunk(s)
RenderSVGInlineText {#text} at (0,0) size 98x35
chunk 1 text run 1 at (0.00,70.00) startOffset 0 endOffset 6 width 97.20: "Normal"
RenderSVGTSpan {tspan} at (0,0) size 257x35
RenderSVGInlineText {#text} at (97,21) size 257x35
chunk 1 text run 1 at (97.20,91.00) startOffset 0 endOffset 19 width 256.20: "baseline-shift:-70%"
- RenderSVGInlineText {#text} at (353,0) size 49x35
+ RenderSVGInlineText {#text} at (353,0) size 50x35
chunk 1 text run 1 at (353.40,70.00) startOffset 0 endOffset 4 width 48.60: "text"
RenderSVGText {text} at (0,96) size 270x68 contains 1 chunk(s)
RenderSVGInlineText {#text} at (0,16) size 98x35
diff --git a/LayoutTests/platform/mac/svg/text/text-align-04-b-expected.txt b/LayoutTests/platform/mac/svg/text/text-align-04-b-expected.txt
index d7b2e86..31233c0 100644
--- a/LayoutTests/platform/mac/svg/text/text-align-04-b-expected.txt
+++ b/LayoutTests/platform/mac/svg/text/text-align-04-b-expected.txt
@@ -33,9 +33,9 @@
RenderSVGInlineText {#text} at (0,0) size 160x35
chunk 1 (end anchor) text run 1 at (60.40,220.00) startOffset 0 endOffset 13 width 159.60: "end text tref"
RenderSVGInlineText {#text} at (0,0) size 0x0
- RenderSVGText {text} at (-6,232) size 227x35 contains 1 chunk(s)
- RenderSVGTextPath {textPath} at (0,0) size 227x35
- RenderSVGInlineText {#text} at (0,0) size 227x35
+ RenderSVGText {text} at (-6,232) size 226x35 contains 1 chunk(s)
+ RenderSVGTextPath {textPath} at (0,0) size 226x35
+ RenderSVGInlineText {#text} at (0,0) size 226x35
chunk 1 (end anchor) text run 1 at (-0.80,260.00) startOffset 12 endOffset 13 width 8.40: " "
chunk 1 (end anchor) text run 2 at (11.80,260.00) startOffset 13 endOffset 14 width 16.80: "e"
chunk 1 (end anchor) text run 3 at (28.60,260.00) startOffset 14 endOffset 15 width 16.80: "n"
diff --git a/LayoutTests/svg/W3C-I18N/NOTE b/LayoutTests/svg/W3C-I18N/NOTE
new file mode 100644
index 0000000..979574c
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/NOTE
@@ -0,0 +1,27 @@
+These tests are obtained from the SVG 1.2 Tiny BiDi test suite:
+1) http://www.w3.org/International/tests/svg/test-direction-unicode-bidi-0
+
+I copied all tests manually, and renamed them according to this conention:
+ -> Section "1. Direction on tspan in text elements"
+ -> Test "1 Default context, inline dirRTL ubEmbed"
+ --> tspan-dirRTL-ubEmbed-in-default-context.svg
+ -> Test "2 Default context, inline dirRTL ubNone"
+ --> tspan-dirRTL-ubNone-in-default-context.svg
+ ...
+
+All references to SVGFonts have been removed (remove the <defs> section, rename font-family="SVGFreeSansASCII,sans-serif" to font-family="Arial").
+Correct image references from "fooX.png" to "resources/fooX.png".
+
+These tests are made for SVG 1.2 Tiny, which has a different definition for the "direction" property compared to SVG 1.1 First/Second Edition.
+
+SVG 1.1 First/Second edition says: (http://www.w3.org/TR/SVG/text.html#RelationshipWithBiDirectionality)
+This property specifies the base writing direction of text and the direction of embeddings and overrides (see 'unicode-bidi') for the Unicode bidirectional algorithm. For the 'direction' property to have any effect, the 'unicode-bidi' property's value must be 'embed' or 'bidi-override'.
+
+SVG 1.2 Tiny says: (http://www.w3.org/TR/SVGTiny12/text.html#DirectionProperty)
+This property specifies the base writing direction of text and the direction of embeddings and overrides (see 'unicode-bidi') for the Unicode bidirectional algorithm. For the 'direction' property to have any effect on an element that does not by itself establish a new text chunk (such as the 'tspan' element in SVG 1.2 Tiny), the 'unicode-bidi' property's value must be embed or bidi-override.
+
+The main difference is that <text x="10" y="10" direction="rtl">foo bar</text> defines the start of a new text chunk
+and thus the direction property is taken into account, whereas in SVG 1.1 the direction property would be ignored
+unless you explicitely set unicode-bidi to embed/bidi-override. This is now handled properly in WebKit, as it's easy to make both 1.1/1.2 mode work for us.
+
+2) http://www.w3.org/International/tests/svg/test-direction-alignment-0
diff --git a/LayoutTests/svg/W3C-I18N/g-dirLTR-ubNone.svg b/LayoutTests/svg/W3C-I18N/g-dirLTR-ubNone.svg
new file mode 100644
index 0000000..416ad56
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/g-dirLTR-ubNone.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>direction(ltr) on a container element will be inherited by an embedded block element.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: direction(ltr) on a container element will be inherited by an embedded block element.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<g direction="ltr"><text x="230" y="150" text-anchor="middle">W3C نشاط التدويل dirLTR ubNone!</text></g>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img18.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/g-dirLTR-ubOverride.svg b/LayoutTests/svg/W3C-I18N/g-dirLTR-ubOverride.svg
new file mode 100644
index 0000000..ec87c18
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/g-dirLTR-ubOverride.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>When direction(ltr)+unicode-bidi(bidi-override) is set on a block element, the override will not be inherited by a child block element, but the direction will.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: When direction(ltr)+unicode-bidi(bidi-override) is set on a block element, the override will not be inherited by a child block element, but the direction will.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<g direction="ltr" unicode-bidi="bidi-override"><text x="230" y="150" text-anchor="middle">W3C نشاط التدويل dirLTR ubOverride!</text></g>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img24.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/g-dirRTL-ubNone.svg b/LayoutTests/svg/W3C-I18N/g-dirRTL-ubNone.svg
new file mode 100644
index 0000000..e2d2d57
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/g-dirRTL-ubNone.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>direction(rtl) on a container element will be inherited by an embedded block element.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: direction(rtl) on a container element will be inherited by an embedded block element.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<g direction="rtl"><text x="230" y="150" text-anchor="middle">W3C نشاط التدويل dirRTL ubNone!</text></g>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img19.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/g-dirRTL-ubOverride.svg b/LayoutTests/svg/W3C-I18N/g-dirRTL-ubOverride.svg
new file mode 100644
index 0000000..a820074
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/g-dirRTL-ubOverride.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>When direction(rtl)+unicode-bidi(bidi-override) is set on a block element, the override will not be inherited by a child block element, but the direction will.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: When direction(rtl)+unicode-bidi(bidi-override) is set on a block element, the override will not be inherited by a child block element, but the direction will.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<g direction="rtl" unicode-bidi="bidi-override"><text x="230" y="150" text-anchor="middle">W3C نشاط التدويل dirRTL ubOverride!</text></g>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img25.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/resources/img1.png b/LayoutTests/svg/W3C-I18N/resources/img1.png
new file mode 100644
index 0000000..70925e6
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/resources/img1.png
Binary files differ
diff --git a/LayoutTests/svg/W3C-I18N/resources/img11.png b/LayoutTests/svg/W3C-I18N/resources/img11.png
new file mode 100644
index 0000000..b3b0dea
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/resources/img11.png
Binary files differ
diff --git a/LayoutTests/svg/W3C-I18N/resources/img12.png b/LayoutTests/svg/W3C-I18N/resources/img12.png
new file mode 100644
index 0000000..42df158
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/resources/img12.png
Binary files differ
diff --git a/LayoutTests/svg/W3C-I18N/resources/img13.png b/LayoutTests/svg/W3C-I18N/resources/img13.png
new file mode 100644
index 0000000..f5a5c36
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/resources/img13.png
Binary files differ
diff --git a/LayoutTests/svg/W3C-I18N/resources/img14.png b/LayoutTests/svg/W3C-I18N/resources/img14.png
new file mode 100644
index 0000000..7a860f6
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/resources/img14.png
Binary files differ
diff --git a/LayoutTests/svg/W3C-I18N/resources/img15.png b/LayoutTests/svg/W3C-I18N/resources/img15.png
new file mode 100644
index 0000000..f03a40c
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/resources/img15.png
Binary files differ
diff --git a/LayoutTests/svg/W3C-I18N/resources/img16.png b/LayoutTests/svg/W3C-I18N/resources/img16.png
new file mode 100644
index 0000000..211bc3a
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/resources/img16.png
Binary files differ
diff --git a/LayoutTests/svg/W3C-I18N/resources/img17.png b/LayoutTests/svg/W3C-I18N/resources/img17.png
new file mode 100644
index 0000000..82f2739
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/resources/img17.png
Binary files differ
diff --git a/LayoutTests/svg/W3C-I18N/resources/img18.png b/LayoutTests/svg/W3C-I18N/resources/img18.png
new file mode 100644
index 0000000..233c730
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/resources/img18.png
Binary files differ
diff --git a/LayoutTests/svg/W3C-I18N/resources/img19.png b/LayoutTests/svg/W3C-I18N/resources/img19.png
new file mode 100644
index 0000000..a0d2182
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/resources/img19.png
Binary files differ
diff --git a/LayoutTests/svg/W3C-I18N/resources/img2.png b/LayoutTests/svg/W3C-I18N/resources/img2.png
new file mode 100644
index 0000000..b0c09a2
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/resources/img2.png
Binary files differ
diff --git a/LayoutTests/svg/W3C-I18N/resources/img20.png b/LayoutTests/svg/W3C-I18N/resources/img20.png
new file mode 100644
index 0000000..b45d22b
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/resources/img20.png
Binary files differ
diff --git a/LayoutTests/svg/W3C-I18N/resources/img21.png b/LayoutTests/svg/W3C-I18N/resources/img21.png
new file mode 100644
index 0000000..dd206c1
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/resources/img21.png
Binary files differ
diff --git a/LayoutTests/svg/W3C-I18N/resources/img24.png b/LayoutTests/svg/W3C-I18N/resources/img24.png
new file mode 100644
index 0000000..0cbceda
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/resources/img24.png
Binary files differ
diff --git a/LayoutTests/svg/W3C-I18N/resources/img25.png b/LayoutTests/svg/W3C-I18N/resources/img25.png
new file mode 100644
index 0000000..5efb09c
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/resources/img25.png
Binary files differ
diff --git a/LayoutTests/svg/W3C-I18N/resources/img3.png b/LayoutTests/svg/W3C-I18N/resources/img3.png
new file mode 100644
index 0000000..02cc367
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/resources/img3.png
Binary files differ
diff --git a/LayoutTests/svg/W3C-I18N/resources/img4.png b/LayoutTests/svg/W3C-I18N/resources/img4.png
new file mode 100644
index 0000000..5b709f9
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/resources/img4.png
Binary files differ
diff --git a/LayoutTests/svg/W3C-I18N/resources/img5.png b/LayoutTests/svg/W3C-I18N/resources/img5.png
new file mode 100644
index 0000000..62ddcfb
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/resources/img5.png
Binary files differ
diff --git a/LayoutTests/svg/W3C-I18N/resources/tanchor-left-right.png b/LayoutTests/svg/W3C-I18N/resources/tanchor-left-right.png
new file mode 100644
index 0000000..7daae71
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/resources/tanchor-left-right.png
Binary files differ
diff --git a/LayoutTests/svg/W3C-I18N/resources/tanchor-left.png b/LayoutTests/svg/W3C-I18N/resources/tanchor-left.png
new file mode 100644
index 0000000..e752b05
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/resources/tanchor-left.png
Binary files differ
diff --git a/LayoutTests/svg/W3C-I18N/resources/tanchor-right.png b/LayoutTests/svg/W3C-I18N/resources/tanchor-right.png
new file mode 100644
index 0000000..eea0da0
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/resources/tanchor-right.png
Binary files differ
diff --git a/LayoutTests/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd.svg b/LayoutTests/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd.svg
new file mode 100644
index 0000000..9728a8e
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd.svg
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="[owner]" desc="[desc]" status="empty"
+ approved="no"
+ version="$Revision: 1.4 $" testname="$RCSfile: text-anchor.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ When direction is set to ltr on the text element, and text-anchor is set to end, Latin, Arabic and Hebrew text will extend to the left of the x coordinate. </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-anchor.php,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="teal">Assertion: When direction is set to ltr on the text element, and text-anchor is set to end, Latin, Arabic and Hebrew text will extend to the left of the x coordinate.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The text below should show extend horizontally from the position of the red cross in the direction of the arrow.</textArea>
+
+<text direction="ltr" text-anchor="end" x="230" y="160" font-size="10">Making the world wide web truly world wide</text><text direction="ltr" text-anchor="end" x="230" y="195" font-size="10">ליצור מהרשת רשת כלל עולמית באמת</text> <text direction="ltr" text-anchor="end" x="230" y="235" font-size="10">جعل شبكة الويب العالميّة عالميّة حقًّا</text>
+<image x="168" y="110" width="128" height="26" xlink:href="resources/tanchor-left.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle.svg b/LayoutTests/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle.svg
new file mode 100644
index 0000000..d40ab11
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle.svg
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="[owner]" desc="[desc]" status="empty"
+ approved="no"
+ version="$Revision: 1.4 $" testname="$RCSfile: text-anchor.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ When direction is set to ltr on the text element, and text-anchor is set to middle, Latin, Arabic and Hebrew text will extend to either side of the x coordinate. </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-anchor.php,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="teal">Assertion: When direction is set to ltr on the text element, and text-anchor is set to middle, Latin, Arabic and Hebrew text will extend to either side of the x coordinate.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The text below should show extend horizontally from the position of the red cross in the direction of the arrow.</textArea>
+
+<text direction="ltr" text-anchor="middle" x="230" y="160" font-size="10">Making the world wide web truly world wide</text><text direction="ltr" text-anchor="middle" x="230" y="195" font-size="10">ליצור מהרשת רשת כלל עולמית באמת</text> <text direction="ltr" text-anchor="middle" x="230" y="235" font-size="10">جعل شبكة الويب العالميّة عالميّة حقًّا</text>
+<image x="168" y="110" width="128" height="26" xlink:href="resources/tanchor-left-right.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/text-anchor-dirLTR-anchorStart.svg b/LayoutTests/svg/W3C-I18N/text-anchor-dirLTR-anchorStart.svg
new file mode 100644
index 0000000..470aa3f
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/text-anchor-dirLTR-anchorStart.svg
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="[owner]" desc="[desc]" status="empty"
+ approved="no"
+ version="$Revision: 1.4 $" testname="$RCSfile: text-anchor.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ When direction is set to ltr on the text element, and text-anchor is set to start, Latin, Arabic and Hebrew text will extend to the right of the x coordinate. </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-anchor.php,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="teal">Assertion: When direction is set to ltr on the text element, and text-anchor is set to start, Latin, Arabic and Hebrew text will extend to the right of the x coordinate.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The text below should show extend horizontally from the position of the red cross in the direction of the arrow.</textArea>
+
+<text direction="ltr" text-anchor="start" x="230" y="160" font-size="10">Making the world wide web truly world wide</text><text direction="ltr" text-anchor="start" x="230" y="195" font-size="10">ליצור מהרשת רשת כלל עולמית באמת</text> <text direction="ltr" text-anchor="start" x="230" y="235" font-size="10">جعل شبكة الويب العالميّة عالميّة حقًّا</text>
+<image x="168" y="110" width="128" height="26" xlink:href="resources/tanchor-right.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/text-anchor-dirNone-anchorEnd.svg b/LayoutTests/svg/W3C-I18N/text-anchor-dirNone-anchorEnd.svg
new file mode 100644
index 0000000..9cd6683
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/text-anchor-dirNone-anchorEnd.svg
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="[owner]" desc="[desc]" status="empty"
+ approved="no"
+ version="$Revision: 1.4 $" testname="$RCSfile: text-anchor.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ When direction is not set or inherited, and text-anchor is set to end, Latin, Arabic and Hebrew text will extend to the left of the x coordinate. </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-anchor.php,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="teal">Assertion: When direction is not set or inherited, and text-anchor is set to end, Latin, Arabic and Hebrew text will extend to the left of the x coordinate.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The text below should show extend horizontally from the position of the red cross in the direction of the arrow.</textArea>
+
+<text text-anchor="end" x="230" y="160" font-size="10">Making the world wide web truly world wide</text><text text-anchor="end" x="230" y="195" font-size="10">ליצור מהרשת רשת כלל עולמית באמת</text> <text text-anchor="end" x="230" y="235" font-size="10">جعل شبكة الويب العالميّة عالميّة حقًّا</text>
+<image x="168" y="110" width="128" height="26" xlink:href="resources/tanchor-left.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle.svg b/LayoutTests/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle.svg
new file mode 100644
index 0000000..681b624
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle.svg
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="[owner]" desc="[desc]" status="empty"
+ approved="no"
+ version="$Revision: 1.4 $" testname="$RCSfile: text-anchor.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ When direction is not set or inherited, and text-anchor is set to middle, Latin, Arabic and Hebrew text will extend to either side of the x coordinate. </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-anchor.php,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="teal">Assertion: When direction is not set or inherited, and text-anchor is set to middle, Latin, Arabic and Hebrew text will extend to either side of the x coordinate.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The text below should show extend horizontally from the position of the red cross in the direction of the arrow.</textArea>
+
+<text text-anchor="middle" x="230" y="160" font-size="10">Making the world wide web truly world wide</text><text text-anchor="middle" x="230" y="195" font-size="10">ליצור מהרשת רשת כלל עולמית באמת</text> <text text-anchor="middle" x="230" y="235" font-size="10">جعل شبكة الويب العالميّة عالميّة حقًّا</text>
+<image x="168" y="110" width="128" height="26" xlink:href="resources/tanchor-left-right.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/text-anchor-dirNone-anchorStart.svg b/LayoutTests/svg/W3C-I18N/text-anchor-dirNone-anchorStart.svg
new file mode 100644
index 0000000..7841de5
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/text-anchor-dirNone-anchorStart.svg
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="[owner]" desc="[desc]" status="empty"
+ approved="no"
+ version="$Revision: 1.4 $" testname="$RCSfile: text-anchor.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ When direction is not set or inherited, and text-anchor is set to start, Latin, Arabic and Hebrew text will extend to the right of the x coordinate. </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-anchor.php,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="teal">Assertion: When direction is not set or inherited, and text-anchor is set to start, Latin, Arabic and Hebrew text will extend to the right of the x coordinate.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The text below should show extend horizontally from the position of the red cross in the direction of the arrow.</textArea>
+
+<text text-anchor="start" x="230" y="160" font-size="10">Making the world wide web truly world wide</text><text text-anchor="start" x="230" y="195" font-size="10">ליצור מהרשת רשת כלל עולמית באמת</text> <text text-anchor="start" x="230" y="235" font-size="10">جعل شبكة الويب العالميّة عالميّة حقًّا</text>
+<image x="168" y="110" width="128" height="26" xlink:href="resources/tanchor-right.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd.svg b/LayoutTests/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd.svg
new file mode 100644
index 0000000..870d88d
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd.svg
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="[owner]" desc="[desc]" status="empty"
+ approved="no"
+ version="$Revision: 1.4 $" testname="$RCSfile: text-anchor.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ When direction is set to rtl on the text element, and text-anchor is set to end, Latin, Arabic and Hebrew text will extend to the right of the x coordinate. </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-anchor.php,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="teal">Assertion: When direction is set to rtl on the text element, and text-anchor is set to end, Latin, Arabic and Hebrew text will extend to the right of the x coordinate.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The text below should show extend horizontally from the position of the red cross in the direction of the arrow.</textArea>
+
+<text direction="rtl" text-anchor="end" x="230" y="160" font-size="10">Making the world wide web truly world wide</text><text direction="rtl" text-anchor="end" x="230" y="195" font-size="10">ליצור מהרשת רשת כלל עולמית באמת</text> <text direction="rtl" text-anchor="end" x="230" y="235" font-size="10">جعل شبكة الويب العالميّة عالميّة حقًّا</text>
+<image x="168" y="110" width="128" height="26" xlink:href="resources/tanchor-right.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle.svg b/LayoutTests/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle.svg
new file mode 100644
index 0000000..5e9f564
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle.svg
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="[owner]" desc="[desc]" status="empty"
+ approved="no"
+ version="$Revision: 1.4 $" testname="$RCSfile: text-anchor.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ When direction is set to rtl on the text element, and text-anchor is set to middle, Latin, Arabic and Hebrew text will extend to both sides of the x coordinate. </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-anchor.php,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="teal">Assertion: When direction is set to rtl on the text element, and text-anchor is set to middle, Latin, Arabic and Hebrew text will extend to both sides of the x coordinate.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The text below should show extend horizontally from the position of the red cross in the direction of the arrow.</textArea>
+
+<text direction="rtl" text-anchor="middle" x="230" y="160" font-size="10">Making the world wide web truly world wide</text><text direction="rtl" text-anchor="middle" x="230" y="195" font-size="10">ליצור מהרשת רשת כלל עולמית באמת</text> <text direction="rtl" text-anchor="middle" x="230" y="235" font-size="10">جعل شبكة الويب العالميّة عالميّة حقًّا</text>
+<image x="168" y="110" width="128" height="26" xlink:href="resources/tanchor-left-right.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/text-anchor-dirRTL-anchorStart.svg b/LayoutTests/svg/W3C-I18N/text-anchor-dirRTL-anchorStart.svg
new file mode 100644
index 0000000..40cf292
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/text-anchor-dirRTL-anchorStart.svg
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="[owner]" desc="[desc]" status="empty"
+ approved="no"
+ version="$Revision: 1.4 $" testname="$RCSfile: text-anchor.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ When direction is set to rtl on the text element, and text-anchor is set to start, Latin, Arabic and Hebrew text will extend to the left of the x coordinate. </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-anchor.php,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="teal">Assertion: When direction is set to rtl on the text element, and text-anchor is set to start, Latin, Arabic and Hebrew text will extend to the left of the x coordinate.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The text below should show extend horizontally from the position of the red cross in the direction of the arrow.</textArea>
+
+<text direction="rtl" text-anchor="start" x="230" y="160" font-size="10">Making the world wide web truly world wide</text><text direction="rtl" text-anchor="start" x="230" y="195" font-size="10">ליצור מהרשת רשת כלל עולמית באמת</text> <text direction="rtl" text-anchor="start" x="230" y="235" font-size="10">جعل شبكة الويب العالميّة عالميّة حقًّا</text>
+<image x="168" y="110" width="128" height="26" xlink:href="resources/tanchor-left.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd.svg b/LayoutTests/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd.svg
new file mode 100644
index 0000000..024db60
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd.svg
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="[owner]" desc="[desc]" status="empty"
+ approved="no"
+ version="$Revision: 1.4 $" testname="$RCSfile: text-anchor.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ When ltr direction is inherited by the text element, and text-anchor is set to end, Latin, Arabic and Hebrew text will extend to the left of the x coordinate. </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-anchor.php,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="teal">Assertion: When ltr direction is inherited by the text element, and text-anchor is set to end, Latin, Arabic and Hebrew text will extend to the left of the x coordinate.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The text below should show extend horizontally from the position of the red cross in the direction of the arrow.</textArea>
+
+<g direction="ltr"><text text-anchor="end" x="230" y="160" font-size="10">Making the world wide web truly world wide</text><text text-anchor="end" x="230" y="195" font-size="10">ליצור מהרשת רשת כלל עולמית באמת</text> <text text-anchor="end" x="230" y="235" font-size="10">جعل شبكة الويب العالميّة عالميّة حقًّا</text></g>
+<image x="168" y="110" width="128" height="26" xlink:href="resources/tanchor-left.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle.svg b/LayoutTests/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle.svg
new file mode 100644
index 0000000..12a69a5
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle.svg
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="[owner]" desc="[desc]" status="empty"
+ approved="no"
+ version="$Revision: 1.4 $" testname="$RCSfile: text-anchor.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ When ltr direction is inherited by the text element, and text-anchor is set to middle, Latin, Arabic and Hebrew text will extend to either side of the x coordinate. </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-anchor.php,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="teal">Assertion: When ltr direction is inherited by the text element, and text-anchor is set to middle, Latin, Arabic and Hebrew text will extend to either side of the x coordinate.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The text below should show extend horizontally from the position of the red cross in the direction of the arrow.</textArea>
+
+<g direction="ltr"><text text-anchor="middle" x="230" y="160" font-size="10">Making the world wide web truly world wide</text><text text-anchor="middle" x="230" y="195" font-size="10">ליצור מהרשת רשת כלל עולמית באמת</text> <text text-anchor="middle" x="230" y="235" font-size="10">جعل شبكة الويب العالميّة عالميّة حقًّا</text></g>
+<image x="168" y="110" width="128" height="26" xlink:href="resources/tanchor-left-right.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart.svg b/LayoutTests/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart.svg
new file mode 100644
index 0000000..e20e5df
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart.svg
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="[owner]" desc="[desc]" status="empty"
+ approved="no"
+ version="$Revision: 1.4 $" testname="$RCSfile: text-anchor.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ When ltr direction is inherited by the text element, and text-anchor is set to start, Latin, Arabic and Hebrew text will extend to the right of the x coordinate. </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-anchor.php,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="teal">Assertion: When ltr direction is inherited by the text element, and text-anchor is set to start, Latin, Arabic and Hebrew text will extend to the right of the x coordinate.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The text below should show extend horizontally from the position of the red cross in the direction of the arrow.</textArea>
+
+<g direction="ltr"><text text-anchor="start" x="230" y="160" font-size="10">Making the world wide web truly world wide</text><text text-anchor="start" x="230" y="195" font-size="10">ליצור מהרשת רשת כלל עולמית באמת</text><text text-anchor="start" x="230" y="235" font-size="10">جعل شبكة الويب العالميّة عالميّة حقًّا</text></g>
+<image x="168" y="110" width="128" height="26" xlink:href="resources/tanchor-right.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd.svg b/LayoutTests/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd.svg
new file mode 100644
index 0000000..9876680
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd.svg
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="[owner]" desc="[desc]" status="empty"
+ approved="no"
+ version="$Revision: 1.4 $" testname="$RCSfile: text-anchor.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ When rtl direction is inherited by the text element, and text-anchor is set to end, Latin, Arabic and Hebrew text will extend to the right of the x coordinate. </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-anchor.php,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="teal">Assertion: When rtl direction is inherited by the text element, and text-anchor is set to end, Latin, Arabic and Hebrew text will extend to the right of the x coordinate.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The text below should show extend horizontally from the position of the red cross in the direction of the arrow.</textArea>
+
+<g direction="rtl"><text text-anchor="end" x="230" y="160" font-size="10">Making the world wide web truly world wide</text><text text-anchor="end" x="230" y="195" font-size="10">ליצור מהרשת רשת כלל עולמית באמת</text> <text text-anchor="end" x="230" y="235" font-size="10">جعل شبكة الويب العالميّة عالميّة حقًّا</text></g>
+<image x="168" y="110" width="128" height="26" xlink:href="resources/tanchor-right.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle.svg b/LayoutTests/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle.svg
new file mode 100644
index 0000000..4175385
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle.svg
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="[owner]" desc="[desc]" status="empty"
+ approved="no"
+ version="$Revision: 1.4 $" testname="$RCSfile: text-anchor.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ When rtl direction is inherited by the text element, and text-anchor is set to middle, Latin, Arabic and Hebrew text will extend to both sides of the x coordinate. </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-anchor.php,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="teal">Assertion: When rtl direction is inherited by the text element, and text-anchor is set to middle, Latin, Arabic and Hebrew text will extend to both sides of the x coordinate.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The text below should show extend horizontally from the position of the red cross in the direction of the arrow.</textArea>
+
+<g direction="rtl"><text text-anchor="middle" x="230" y="160" font-size="10">Making the world wide web truly world wide</text><text text-anchor="middle" x="230" y="195" font-size="10">ליצור מהרשת רשת כלל עולמית באמת</text> <text text-anchor="middle" x="230" y="235" font-size="10">جعل شبكة الويب العالميّة عالميّة حقًّا</text></g>
+<image x="168" y="110" width="128" height="26" xlink:href="resources/tanchor-left-right.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart.svg b/LayoutTests/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart.svg
new file mode 100644
index 0000000..8c46adc
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart.svg
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="[owner]" desc="[desc]" status="empty"
+ approved="no"
+ version="$Revision: 1.4 $" testname="$RCSfile: text-anchor.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ When rtl direction is inherited by the text element, and text-anchor is set to start, Latin, Arabic and Hebrew text will extend to the left of the x coordinate. </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-anchor.php,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="teal">Assertion: When rtl direction is inherited by the text element, and text-anchor is set to start, Latin, Arabic and Hebrew text will extend to the left of the x coordinate.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The text below should show extend horizontally from the position of the red cross in the direction of the arrow.</textArea>
+
+<g direction="rtl"><text text-anchor="start" x="230" y="160" font-size="10">Making the world wide web truly world wide</text><text text-anchor="start" x="230" y="195" font-size="10">ליצור מהרשת רשת כלל עולמית באמת</text> <text text-anchor="start" x="230" y="235" font-size="10">جعل شبكة الويب العالميّة عالميّة حقًّا</text></g>
+<image x="168" y="110" width="128" height="26" xlink:href="resources/tanchor-left.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/text-anchor-no-markup.svg b/LayoutTests/svg/W3C-I18N/text-anchor-no-markup.svg
new file mode 100644
index 0000000..aa6ac07
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/text-anchor-no-markup.svg
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="[owner]" desc="[desc]" status="empty"
+ approved="no"
+ version="$Revision: 1.4 $" testname="$RCSfile: text-anchor.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ When direction is not set or inherited, and text-anchor is not set, Latin, Arabic and Hebrew text will extend to the right of the x coordinate. </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-anchor.php,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="teal">Assertion: When direction is not set or inherited, and text-anchor is not set, Latin, Arabic and Hebrew text will extend to the right of the x coordinate.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The text below should show extend horizontally from the position of the red cross in the direction of the arrow.</textArea>
+
+<text x="230" y="160" font-size="10">Making the world wide web truly world wide</text><text x="230" y="195" font-size="10">ליצור מהרשת רשת כלל עולמית באמת</text> <text x="230" y="235" font-size="10">جعل شبكة الويب العالميّة عالميّة حقًّا</text>
+<image x="168" y="110" width="128" height="26" xlink:href="resources/tanchor-right.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/text-dirLTR-ubNone.svg b/LayoutTests/svg/W3C-I18N/text-dirLTR-ubNone.svg
new file mode 100644
index 0000000..531c470
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/text-dirLTR-ubNone.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>direction(ltr) alone on a block element will cause the directional runs to be arranged LTR (but the words should look correct within each run), and punctuation should be treated as LTR.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: direction(ltr) alone on a block element will cause the directional runs to be arranged LTR (but the words should look correct within each run), and punctuation should be treated as LTR.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<text x="230" y="150" text-anchor="middle" direction="ltr">W3C نشاط التدويل dirLTR ubNone!</text>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img18.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/text-dirLTR-ubOverride.svg b/LayoutTests/svg/W3C-I18N/text-dirLTR-ubOverride.svg
new file mode 100644
index 0000000..ff41744
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/text-dirLTR-ubOverride.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>direction(ltr)+unicode-bidi(bidi-override) on a block element will cause all the text to be displayed in backing-store order from left to right.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: direction(ltr)+unicode-bidi(bidi-override) on a block element will cause all the text to be displayed in backing-store order from left to right.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<text x="230" y="150" text-anchor="middle" direction="ltr" unicode-bidi="bidi-override">W3C نشاط التدويل dirLTR ubOverride!</text>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img20.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/text-dirRTL-ubNone.svg b/LayoutTests/svg/W3C-I18N/text-dirRTL-ubNone.svg
new file mode 100644
index 0000000..ebdaedb
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/text-dirRTL-ubNone.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>direction(rtl) alone on a block element will cause the directional runs to be arranged RTL (but the words should look correct within each run), and punctuation should be treated as RTL.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: direction(rtl) alone on a block element will cause the directional runs to be arranged RTL (but the words should look correct within each run), and punctuation should be treated as RTL.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<text x="230" y="150" text-anchor="middle" direction="rtl">W3C نشاط التدويل dirRTL ubNone!</text>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img19.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/text-dirRTL-ubOverride.svg b/LayoutTests/svg/W3C-I18N/text-dirRTL-ubOverride.svg
new file mode 100644
index 0000000..0228314
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/text-dirRTL-ubOverride.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>direction(rtl)+unicode-bidi(bidi-override) on a block element will cause all the text to be displayed in backing-store order from right to left.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: direction(rtl)+unicode-bidi(bidi-override) on a block element will cause all the text to be displayed in backing-store order from right to left.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<text x="230" y="150" text-anchor="middle" direction="rtl" unicode-bidi="bidi-override">W3C نشاط التدويل dirRTL ubOverride!</text>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img21.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context.svg b/LayoutTests/svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context.svg
new file mode 100644
index 0000000..7ed36a6
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>In a RTL context, if direction(ltr)+unicode-bidi(embed) are applied to a LTR inline element containing mixed direction text, the text in that element will be displayed correctly.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: In a RTL context, if direction(ltr)+unicode-bidi(embed) are applied to a LTR inline element containing mixed direction text, the text in that element will be displayed correctly.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<text x="230" y="150" text-anchor="middle" direction="rtl">نشاط التدويل "<tspan direction="ltr" unicode-bidi="embed">dirLTR ubEmbed, اختبار</tspan>"!</text>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img15.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context.svg b/LayoutTests/svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context.svg
new file mode 100644
index 0000000..b6e2df6
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context.svg
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>In a RTL context, if direction(ltr) alone is applied to a LTR inline element containing mixed direction text, the different directional runs in that element will not be in the correct order.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: In a RTL context, if direction(ltr) alone is applied to a LTR inline element containing mixed direction text, the different directional runs in that element will not be in the correct order.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<text x="230" y="150" text-anchor="middle" direction="rtl">نشاط التدويل "<tspan direction="ltr">dirLTR ubNone, اختبار</tspan>"!</text>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<!-- FIXME: Known bug, the reference image is almost correct, but says dirRTL instead of dirLTR. reported to www-international. -->
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img11.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context.svg b/LayoutTests/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context.svg
new file mode 100644
index 0000000..600e23e
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>In the default context, if direction(ltr)+unicode-bidi(bidi-override) are applied to an inline element containing mixed direction text, the characters in that element will be displayed in backing-store order from left to right.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: In the default context, if direction(ltr)+unicode-bidi(bidi-override) are applied to an inline element containing mixed direction text, the characters in that element will be displayed in backing-store order from left to right.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<text x="230" y="150" text-anchor="middle">dirLTR ubOverride "<tspan direction="ltr" unicode-bidi="bidi-override">نشاط التدويل، W3C</tspan>"!</text>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img3.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context.svg b/LayoutTests/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context.svg
new file mode 100644
index 0000000..1ceac00
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>In a LTR context, if direction(ltr)+unicode-bidi(bidi-override) are applied to an inline element containing mixed direction text, the characters in that element will be displayed in backing-store order from left to right.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: In a LTR context, if direction(ltr)+unicode-bidi(bidi-override) are applied to an inline element containing mixed direction text, the characters in that element will be displayed in backing-store order from left to right.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<text x="230" y="150" text-anchor="middle" direction="ltr">dirLTR ubOverride "<tspan direction="ltr" unicode-bidi="bidi-override">نشاط التدويل، W3C</tspan>"!</text>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img3.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context.svg b/LayoutTests/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context.svg
new file mode 100644
index 0000000..7112261
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>In a RTL context, if direction(ltr)+unicode-bidi(bidi-override) are applied to a LTR inline element containing mixed direction text, the characters in that element will be displayed in reverse backing-store order from right to left.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: In a RTL context, if direction(ltr)+unicode-bidi(bidi-override) are applied to a LTR inline element containing mixed direction text, the characters in that element will be displayed in reverse backing-store order from right to left.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<text x="230" y="150" text-anchor="middle" direction="rtl">نشاط التدويل "<tspan direction="ltr" unicode-bidi="bidi-override">dirLTR ubOverride, اختبار</tspan>"!</text>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img13.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context.svg b/LayoutTests/svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context.svg
new file mode 100644
index 0000000..9645eda
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>In the default context, if unicode-bidi(bidi-override) and no direction are applied to an inline element containing mixed direction text, the characters in that element will be displayed in backing-store order from left to right.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: In the default context, if unicode-bidi(bidi-override) and no direction are applied to an inline element containing mixed direction text, the characters in that element will be displayed in backing-store order from left to right.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<text x="230" y="150" text-anchor="middle">dirNone ubOverride "<tspan unicode-bidi="bidi-override">نشاط التدويل، W3C</tspan>"!</text>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img2.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context.svg b/LayoutTests/svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context.svg
new file mode 100644
index 0000000..f3c33c4
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>In a LTR context, if unicode-bidi(bidi-override) and no direction are applied to an inline element containing mixed direction text, the characters in that element will be displayed in backing-store order from left to right.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: In a LTR context, if unicode-bidi(bidi-override) and no direction are applied to an inline element containing mixed direction text, the characters in that element will be displayed in backing-store order from left to right.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<text x="230" y="150" text-anchor="middle" direction="ltr">dirNone ubOverride "<tspan unicode-bidi="bidi-override">نشاط التدويل، W3C</tspan>"!</text>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img2.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context.svg b/LayoutTests/svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context.svg
new file mode 100644
index 0000000..501efe6
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>In a RTL context, if unicode-bidi(bidi-override) and no direction are applied to a LTR inline element containing mixed direction text, the characters in that element will be displayed in backing-store order from right to left.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: In a RTL context, if unicode-bidi(bidi-override) and no direction are applied to a LTR inline element containing mixed direction text, the characters in that element will be displayed in backing-store order from right to left.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<text x="230" y="150" text-anchor="middle" direction="rtl">نشاط التدويل "<tspan unicode-bidi="bidi-override">dirNone ubOverride, اختبار</tspan>"!</text>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img12.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context.svg b/LayoutTests/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context.svg
new file mode 100644
index 0000000..8d59d61
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>In the default context, if direction(rtl)+unicode-bidi(embed) are applied to an inline element containing mixed direction text, the text in that element will be displayed correctly.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: In the default context, if direction(rtl)+unicode-bidi(embed) are applied to an inline element containing mixed direction text, the text in that element will be displayed correctly.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<text x="230" y="150" text-anchor="middle">dirRTL ubEmbed "<tspan direction="rtl" unicode-bidi="embed">نشاط التدويل، W3C</tspan>"!</text>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img5.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context.svg b/LayoutTests/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context.svg
new file mode 100644
index 0000000..ee26024
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>In a LTR context, if direction(rtl)+unicode-bidi(embed) are applied to an inline element containing mixed direction text, the text in that element will be displayed correctly.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: In a LTR context, if direction(rtl)+unicode-bidi(embed) are applied to an inline element containing mixed direction text, the text in that element will be displayed correctly.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<text x="230" y="150" text-anchor="middle" direction="ltr">dirRTL ubEmbed "<tspan direction="rtl" unicode-bidi="embed">نشاط التدويل، W3C</tspan>"!</text>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img5.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context.svg b/LayoutTests/svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context.svg
new file mode 100644
index 0000000..bf3db2d
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>In the default context, if direction(rtl) alone is applied to an inline element containing mixed direction text, the different directional runs in that element will not be in the correct order.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: In the default context, if direction(rtl) alone is applied to an inline element containing mixed direction text, the different directional runs in that element will not be in the correct order.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<text x="230" y="150" text-anchor="middle">dirRTL ubNone "<tspan direction="rtl">نشاط التدويل، W3C</tspan>"!</text>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img1.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context.svg b/LayoutTests/svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context.svg
new file mode 100644
index 0000000..1a63b6e
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>In a LTR context, if direction(rtl) alone is applied to an inline element containing mixed direction text, the different directional runs in that element will not be in the correct order.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: In a LTR context, if direction(rtl) alone is applied to an inline element containing mixed direction text, the different directional runs in that element will not be in the correct order.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<text x="230" y="150" text-anchor="middle" direction="ltr">dirRTL ubNone "<tspan direction="rtl">نشاط التدويل، W3C</tspan>"!</text>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img1.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context.svg b/LayoutTests/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context.svg
new file mode 100644
index 0000000..8130b92
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>In the default context, if unicode-bidi(bidi-override)+direction(rtl) are applied to an inline element containing mixed direction text, the characters in that element will be displayed in reverse backing-store order from left to right.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: In the default context, if unicode-bidi(bidi-override)+direction(rtl) are applied to an inline element containing mixed direction text, the characters in that element will be displayed in reverse backing-store order from left to right.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<text x="230" y="150" text-anchor="middle">dirRTL ubOverride "<tspan direction="rtl" unicode-bidi="bidi-override">نشاط التدويل، W3C</tspan>"!</text>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img4.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context.svg b/LayoutTests/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context.svg
new file mode 100644
index 0000000..701e995
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>In a LTR context, if unicode-bidi(bidi-override)+direction(rtl) are applied to an inline element containing mixed direction text, the characters in that element will be displayed in reverse backing-store order from left to right.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: In a LTR context, if unicode-bidi(bidi-override)+direction(rtl) are applied to an inline element containing mixed direction text, the characters in that element will be displayed in reverse backing-store order from left to right.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<text x="230" y="150" text-anchor="middle" direction="ltr">dirRTL ubOverride "<tspan direction="rtl" unicode-bidi="bidi-override">نشاط التدويل، W3C</tspan>"!</text>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img4.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context.svg b/LayoutTests/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context.svg
new file mode 100644
index 0000000..90524a9
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>In a RTL context, if unicode-bidi(bidi-override)+direction(rtl) are applied to a LTR inline element containing mixed direction text, the characters in that element will be displayed in backing-store order from right to left.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: In a RTL context, if unicode-bidi(bidi-override)+direction(rtl) are applied to a LTR inline element containing mixed direction text, the characters in that element will be displayed in backing-store order from right to left.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<text x="230" y="150" text-anchor="middle" direction="rtl">نشاط التدويل "<tspan direction="rtl" unicode-bidi="bidi-override">dirRTL ubOverride, اختبار</tspan>"!</text>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img14.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/tspan-direction-ltr.svg b/LayoutTests/svg/W3C-I18N/tspan-direction-ltr.svg
new file mode 100644
index 0000000..ec63bd6
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/tspan-direction-ltr.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>If unicode-bidi(embed)+direction(ltr) are applied to an inline element containing mixed direction text, the the inline element will interact with surrounding ltr text as a LTR directional run.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: If unicode-bidi(embed)+direction(ltr) are applied to an inline element containing mixed direction text, the the inline element will interact with surrounding ltr text as a LTR directional run.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<text x="230" y="150" text-anchor="middle" direction="rtl">dirLTR ubEmbed "<tspan direction="ltr" unicode-bidi="embed">نشاط التدويل، W3C</tspan>"!</text>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img16.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-I18N/tspan-direction-rtl.svg b/LayoutTests/svg/W3C-I18N/tspan-direction-rtl.svg
new file mode 100644
index 0000000..c7a4a8a
--- /dev/null
+++ b/LayoutTests/svg/W3C-I18N/tspan-direction-rtl.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2007 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="[reviewer]" owner="Richard Ishida" desc="SVG Tiny bidi tests" status="empty"
+ approved="no"
+ version="$Revision: 1.7 $" testname="$RCSfile: direction-unicode-bidi.php,v $">
+
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>If unicode-bidi(embed)+direction(rtl) are applied to an inline element containing mixed direction text, the the inline element will interact with surrounding rtl text as a RTL directional run.</p>
+ <p>Pass/fail criterion: The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: direction-unicode-bidi.php,v $_GET['test']; ?>,v $</title>
+
+ <g xml:id="test-body-content" font-family="Arial" font-size="18">
+
+<textArea x="20" y="40" width="400" height="60" font-size="10" fill="#008080">Assertion: If unicode-bidi(embed)+direction(rtl) are applied to an inline element containing mixed direction text, the the inline element will interact with surrounding rtl text as a RTL directional run.</textArea>
+<textArea x="20" y="80" width="400" height="60" font-size="10" fill="#FFA500">The characters in the text immediately below should be in the same order as in the reference graphic below it. Font glyph differences are ok.</textArea>
+
+<text x="230" y="150" text-anchor="middle" direction="rtl">نشاط التدويل "<tspan direction="rtl" unicode-bidi="embed">dirRTL ubEmbed, اختبار</tspan>"!</text>
+<text x="20" y="180" font-size="10" fill="#FFA500">Reference graphic:</text>
+
+<image x="60" y="180" width="350" height="39" xlink:href="resources/img17.png"> <title>Reference graphic</title>
+ </image>
+
+ </g>
+ <g font-family="Arial" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" font-size="6"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+
+ <text font-family="Arial" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/W3C-SVG-1.1-SE/text-intro-02-b.svg b/LayoutTests/svg/W3C-SVG-1.1-SE/text-intro-02-b.svg
new file mode 100644
index 0000000..ba876cd
--- /dev/null
+++ b/LayoutTests/svg/W3C-SVG-1.1-SE/text-intro-02-b.svg
@@ -0,0 +1,82 @@
+<svg version="1.1" baseProfile="basic" id="svg-root"
+ width="100%" height="100%" viewBox="0 0 480 360"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!--======================================================================-->
+ <!--= SVG 1.1 2nd Edition Test Case =-->
+ <!--======================================================================-->
+ <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+ template-version="1.4" reviewer="SVGWG" author="Jon Ferraiolo" status="accepted"
+ version="$Revision: 1.9 $" testname="$RCSfile: text-intro-02-b.svg,v $">
+ <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/text.html#Introduction">
+ <p>
+ Test various aspects of internationalized text, including
+ left-to-right, right-to-left, and the
+ following properties: 'writing-mode',
+ 'direction' and 'unicode-bidi'.
+ </p>
+ <p>
+ Various text strings in various languages appear. Ttest of bidi algorithms and support of 'unicode-bidi' and
+ 'direction' properties.
+ </p>
+ </d:testDescription>
+ <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This test requires installation of a system font that supports
+ the various international characters used in this test case. A
+ suitable font should be used by the SVG renderer if none of the
+ specified font families are available (or if they are available but do
+ not have the required glyphs).
+ </p>
+ <p>
+ Run the test. No interaction required.
+ </p>
+ </d:operatorScript>
+ <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The test is passed if the correct characters
+ appear and they appear in the correct order and orientation.
+ Ensure that the three lines with Hebrew are ordered
+ correctly, as shown in the reference image.
+ </p>
+ </d:passCriteria>
+ </d:SVGTestCase>
+ <title id="test-title">$RCSfile: text-intro-02-b.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-family="Arial" font-size="17" fill="blue" x="10" y="40">unicode-bidi="bidi-override" direction="ltr".</text>
+ <g font-size="18" font-family="'Arial Unicode MS', 'LucidaSansUnicode','MS-Gothic'">
+ <text x="10" y="80" unicode-bidi="bidi-override" direction="ltr">Text "אני יכול לאכול זכוכית וזה לא מזיק לי" is in Hebrew</text>
+ </g>
+ <text font-family="Arial" font-size="17" fill="blue" x="10" y="140">unicode-bidi="bidi-override" direction="rtl".</text>
+ <g font-size="18" font-family="'Arial Unicode MS', 'LucidaSansUnicode','MS-Gothic'">
+ <text x="10" y="180" unicode-bidi="bidi-override" direction="rtl" text-anchor="end">Text "אני יכול לאכול זכוכית וזה לא מזיק לי" is in Hebrew</text>
+ </g>
+ <text font-family="Arial" font-size="17" fill="blue" x="10" y="240">unicode-bidi="normal" direction="rtl".</text>
+ <g font-size="18" font-family="'Arial Unicode MS', 'LucidaSansUnicode','MS-Gothic'">
+ <!-- FIXME: We added text-anchor="end" here, the tests was wrong as-is. Already reported to SVG WG, will be fixed soon. -->
+ <text x="10" y="280" unicode-bidi="normal" direction="rtl" text-anchor="end" >Text "אני יכול לאכול זכוכית וזה לא מזיק לי" is in Hebrew</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.9 $</text>
+ </g>
+ <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/LayoutTests/svg/W3C-SVG-1.1-SE/text-intro-05-t.svg b/LayoutTests/svg/W3C-SVG-1.1-SE/text-intro-05-t.svg
new file mode 100644
index 0000000..f54171c
--- /dev/null
+++ b/LayoutTests/svg/W3C-SVG-1.1-SE/text-intro-05-t.svg
@@ -0,0 +1,67 @@
+<svg version="1.1" baseProfile="tiny" id="svg-root"
+ width="100%" height="100%" viewBox="0 0 480 360"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!--======================================================================-->
+ <!--= SVG 1.1 2nd Edition Test Case =-->
+ <!--======================================================================-->
+ <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+ template-version="1.4" reviewer="ED" author="CL" status="accepted"
+ version="$Revision: 1.7 $" testname="$RCSfile: text-intro-05-t.svg,v $">
+ <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/text.html#Introduction">
+ <p>
+ Tests Arabic text using various platform fonts. If these fonts are not available,
+ a fallback font should be used that has Arabic glyphs. If such a font is not available,
+ the 'missing glyph' (typically an open rectangle) should be displayed. It is an error
+ to display the wrong Arabic glyphs, for example to display all isolate forms.
+ </p>
+ </d:testDescription>
+ <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Run the test. No interaction required.
+ </p>
+ </d:operatorScript>
+ <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The text should be positioned such that the begining of the start of the
+ Arabic text is at very right of the test and runs towards the left of
+ the test border.
+ </p>
+ </d:passCriteria>
+ </d:SVGTestCase>
+ <title id="test-title">$RCSfile: text-intro-05-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18" unicode-bidi="bidi-override" direction="rtl">
+ <text x="460" y="80" text-anchor="start" xml:lang="ar" font-size="30" font-family="Andalus">لماذا لا يتكلمون اللّغة العربية فحسب؟</text>
+ <!-- andalus font comes with Windows 2000 and XP -->
+ <text x="460" y="160" text-anchor="start" xml:lang="ar" font-size="36" font-family="'Diwani Letter'">لماذا لا يتكلمون اللّغة العربية فحسب؟</text>
+ <!-- Diwani fonts come with Microsoft Arabic fonts extension for Office XP
+http://www.microsoft.com/downloads/details.aspx?FamilyID=A83C0E03-8913-47A3-ACB7-8AC357627620&displaylang=AR -->
+ <text x="460" y="240" text-anchor="start" xml:lang="ar" font-size="30" font-family="'Nafees Naskh'">لماذا لا يتكلمون اللّغة العربية فحسب؟</text>
+ <!-- Nafees Nastaleeq and Nafees Naskh are freely available from
+ the Center for Research in Urdu Language Processing (CRULP http://www.crulp.org )
+ at the National University of Computer and Emerging Sciences, Pakistan
+ ( http://www.nu.edu.pk ) -->
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/LayoutTests/svg/W3C-SVG-1.1-SE/text-intro-09-b.svg b/LayoutTests/svg/W3C-SVG-1.1-SE/text-intro-09-b.svg
new file mode 100644
index 0000000..f2860a6
--- /dev/null
+++ b/LayoutTests/svg/W3C-SVG-1.1-SE/text-intro-09-b.svg
@@ -0,0 +1,89 @@
+<svg version="1.1" baseProfile="basic" id="svg-root"
+ width="100%" height="100%" viewBox="0 0 480 360"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!--======================================================================-->
+ <!--= SVG 1.1 2nd Edition Test Case =-->
+ <!--======================================================================-->
+ <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+ template-version="1.4" reviewer="SVGWG" author="Jon Ferraiolo" status="accepted"
+ version="$Revision: 1.6 $" testname="$RCSfile: text-intro-09-b.svg,v $">
+ <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/text.html#Introduction">
+ <p>
+ Test various aspects of internationalized text, including
+ left-to-right, right-to-left, and the
+ following properties: 'writing-mode',
+ 'direction' and 'unicode-bidi'.
+ </p>
+ <p>
+ Various text strings in various languages appear. Test of bidi algorithms and support of 'unicode-bidi' and
+ 'direction' properties. Uses Webfonts.
+ </p>
+ <p>
+ This test uses Webfonts; both SVG and WOFF fonts are provided.
+ </p>
+ </d:testDescription>
+ <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Run the test. No interaction required. Make sure scripting is enabled.
+ </p>
+ </d:operatorScript>
+ <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The test is passed if the correct characters
+ appear and they appear in the correct order and orientation.
+ Ensure that the three lines with Hebrew are ordered
+ correctly, as shown in the reference image.
+ </p>
+ </d:passCriteria>
+ </d:SVGTestCase>
+ <title id="test-title">$RCSfile: text-intro-09-b.svg,v $</title>
+ <defs>
+ <style type="text/css">
+ @font-face {
+ font-family: Ezra SIL SR;
+ src: url(woffs/EzraSILSR.woff) format("woff");
+ }
+ </style>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ <font-face font-family="SVGHebrew" unicode-range="U+000D-FEFF">
+ <font-face-src>
+ <font-face-uri xlink:href="../resources/Heb.svg#SVGHebrew"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-family="Arial" font-size="17" fill="blue" x="10" y="40">unicode-bidi="bidi-override" direction="ltr".</text>
+ <g font-size="18" font-family="SVGHebrew, 'Ezra SIL SR', serif">
+ <text x="10" y="80" unicode-bidi="bidi-override" direction="ltr">Text "אני יכול לאכול זכוכית וזה לא מזיק לי" is in Hebrew</text>
+ </g>
+ <text font-family="Arial" font-size="17" fill="blue" x="10" y="140">unicode-bidi="bidi-override" direction="rtl".</text>
+ <g font-size="18" font-family="SVGHebrew, 'Ezra SIL SR', serif">
+ <text x="10" y="180" unicode-bidi="bidi-override" direction="rtl" text-anchor="end">Text "אני יכול לאכול זכוכית וזה לא מזיק לי" is in Hebrew</text>
+ </g>
+ <text font-family="Arial" font-size="17" fill="blue" x="10" y="240">unicode-bidi="normal" direction="rtl".</text>
+ <g font-size="18" font-family="SVGHebrew, 'Ezra SIL SR', serif">
+ <!-- FIXME: We added text-anchor="end" here, the tests was wrong as-is. Already reported to SVG WG, will be fixed soon. -->
+ <text x="10" y="280" unicode-bidi="normal" direction="rtl" text-anchor="end">Text "אני יכול לאכול זכוכית וזה לא מזיק לי" is in Hebrew</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/LayoutTests/svg/W3C-SVG-1.1/resources/SVGExotic.svg b/LayoutTests/svg/W3C-SVG-1.1/resources/SVGExotic.svg
new file mode 100644
index 0000000..359d989
--- /dev/null
+++ b/LayoutTests/svg/W3C-SVG-1.1/resources/SVGExotic.svg
@@ -0,0 +1,215 @@
+<?xml version="1.0" standalone="no"?>
+<svg xmlns="http://www.w3.org/2000/svg">
+<defs>
+<font id="exotic" horiz-adv-x="904">
+ <font-face font-family="SVGExotic" units-per-em="2048" panose-1="2 11 6 4 2 2 2 2 2 4" ascent="2189" descent="-555" alphabetic="0" />
+ <missing-glyph horiz-adv-x="2048" d="M256 0V1536H1792V0H256ZM384 128H1664V1408H384V128Z" />
+
+ <!-- Punctuation -->
+ <glyph unicode=" " horiz-adv-x="569" />
+ <glyph unicode="." horiz-adv-x="569" d="M387 0H182V205H387V0Z" />
+ <glyph unicode="," horiz-adv-x="569" d="M389 0Q389 -127 341 -194T221 -289L172 -213Q284 -165 285 0H184V205H389V0Z" />
+ <glyph unicode=":" horiz-adv-x="569" d="M389 856H184V1061H389V856ZM389 0H184V205H389V0Z" />
+ <glyph unicode="!" horiz-adv-x="569" d="M397 1141L346 365H229L174 1141V1466H397V1141ZM387 0H182V205H387V0Z" />
+ <glyph unicode=""" horiz-adv-x="727" d="M641 1227L596 946H485L436 1227V1466H641V1227ZM289 1227L244 946H133L84 1227V1466H289V1227Z" />
+
+ <!-- Polish -->
+ <glyph unicode="ć" horiz-adv-x="1024" d="M1006 367Q971 164 846 70T563 -25Q332 -25 206 126T80 528Q80 735 152 859T334 1034T563 1085Q727 1085 843 1000T987 750L813 723Q786 830 726 884T571 938Q420 938 342 831T264 532Q264 336 340 230T561 123Q677 123 743 189T827 389L1006 367ZM808 1491L587 1210H439L572 1491H808Z" />
+ <glyph unicode="ę" horiz-adv-x="1139" d="M1059 485H264Q275 309 364 216T588 123Q794 123 868 342L1053 319Q964 0 629 -23Q608 -88 608 -141Q608 -207 648 -250T752 -293Q829 -293 920 -246V-365Q800 -426 700 -426Q604 -426 543 -366T481-205Q481 -130 510 -20Q302 5 191 149T80 522Q80 773 210 929T578 1085Q694 1085 801 1034T984 861T1059 485ZM874 633Q863 795 774 866T578 938Q451 938 369 853T274 633H874Z" />
+ <glyph unicode="ł" horiz-adv-x="455" d="M446 842L311 727V0H133V573L2 465V623L133 731V1466H311V885L446 999V842Z" />
+ <glyph unicode="ś" horiz-adv-x="1024" d="M729 764Q717 851 659 894T496 938Q393 938 330 903T266 801Q266 738 316 711T516 645Q684 602 767 569T897 477T944 311Q944 169 828 72T518 -25Q316 -25 203 60T63 317L242 344Q256 233 324 178T516 123Q634 123 697 172T760 293Q760 341 731 370T659 413T463 465Q237 519 165 596T92 780Q92 913 198 999T483 1085Q673 1085 778 1011T905 788L729 764ZM748 1491L527 1210H379L512 1491H748Z" />
+
+ <!-- Greek -->
+ <glyph unicode="Μ" horiz-adv-x="1706" d="M1550 0H1366V1227H1362L940 0H766L346 1247H340V0H156V1466H446L793 428Q851 255 860 211H864Q891 296 942 446L1292 1466H1550V0Z" />
+ <glyph unicode="ά" horiz-adv-x="1180" d="M1108 0H928Q879 127 864 195Q793 59 708 17T516 -25Q318 -25 195 124T72 532Q72 803 198 944T518 1085Q744 1085 870 883Q896 982 924 1061H1108Q1081 976 1056 882T1005 661T979 530Q979 517 1008 374T1060 147T1108 0ZM541 123Q668 123 748 234T829 541Q829 734 751 836T549 938Q408 938 332 828T256 528Q256 356 329 240T541 123ZM746 1507L619 1229H502L562 1507H746Z" />
+ <glyph unicode="έ" horiz-adv-x="889" d="M829 145Q736 51 647 13T432 -25Q252 -25 156 64T59 291Q59 464 236 549Q88 631 88 778Q88 909 183 997T440 1085Q652 1085 791 942L662 838Q545 930 432 930Q358 930 311 886T264 782Q264 730 304 687T391 633T549 621V473Q360 473 304 418T248 293Q248 226 303 176T436 125Q590 125 700 256L829 145ZM615 1507L488 1229H371L431 1507H615Z" />
+ <glyph unicode="ί" horiz-adv-x="455" d="M317 0H137V1061H317V0ZM641 1507L514 1229H397L457 1507H641Z" />
+ <glyph unicode="α" horiz-adv-x="1180" d="M1108 0H928Q879 127 864 195Q793 59 708 17T516 -25Q318 -25 195 124T72 532Q72 803 198 944T518 1085Q744 1085 870 883Q896 982 924 1061H1108Q1081 976 1056 882T1005 661T979 530Q979 517 1008 374T1060 147T1108 0ZM541 123Q668 123 748 234T829 541Q829 734 751 836T549 938Q408 938 332 828T256 528Q256 356 329 240T541 123Z" />
+ <glyph unicode="γ" horiz-adv-x="1024" d="M999 1061L602 0V-408H422V0L27 1061H215L512 225L817 1061H999Z" />
+ <glyph unicode="θ" horiz-adv-x="1139" d="M569 1491Q1047 1491 1047 733Q1047 350 924 163T569 -25Q92 -25 92 733Q92 1117 215 1304T569 1491ZM862 807Q853 1343 569 1343Q289 1343 276 807H862ZM864 659H279Q289 123 569 123Q851 123 864 659Z" />
+ <glyph unicode="ι" horiz-adv-x="455" d="M317 0H137V1061H317V0Z" />
+ <glyph unicode="λ" horiz-adv-x="1024" d="M999 0H809L514 793L217 0H27L420 1042L262 1466H453L999 0Z" />
+ <glyph unicode="μ" horiz-adv-x="1133" d="M997 0H836V156H831Q766 66 700 21T549 -25Q481 -25 416 10T315 102V-408H135V1061H315V428Q315 281 363 206T535 131Q656 131 736 214T817 457V1061H997V0Z" />
+ <glyph unicode="ν" horiz-adv-x="1024" d="M999 1061L598 0H430L27 1061H217L436 447Q498 273 510 211H514Q530 275 569 383L815 1061H999Z" />
+ <glyph unicode="ο" horiz-adv-x="1139" d="M569 1085Q784 1085 925 945T1067 547Q1067 234 914 105T569 -25Q368 -25 220 108T72 530Q72 810 215 947T569 1085ZM569 123Q723 123 803 237T883 537Q883 736 793 837T569 938Q432 938 344 836T256 530Q256 328 345 226T569 123Z" />
+ <glyph unicode="π" horiz-adv-x="1389" d="M1356 913H1095V0H914V913H474V0H294V913H33V1061H1356V913Z" />
+ <glyph unicode="ρ" horiz-adv-x="1169" d="M135 -408V516Q135 1085 606 1085Q824 1085 961 933T1098 528Q1098 272 965 124T631 -25Q434 -25 315 100V-408H135ZM606 123Q742 123 827 225T913 528Q913 732 821 835T606 938Q464 938 391 830T317 520Q317 328 391 226T606 123Z" />
+ <glyph unicode="ς" horiz-adv-x="967" d="M952 1053L909 901Q798 938 690 938Q475 938 364 812T252 518Q252 365 333 290T571 174Q785 119 845 51T905 -117Q905 -198 859 -272T725 -388T516 -430Q431 -430 365 -418L410 -252Q459 -264 510 -264Q604 -264 660 -220T717 -123Q717 -67 667 -37T512 16Q300 60 186 181T72 496Q72 733 248 909T709 1085Q838 1085 952 1053Z" />
+ <glyph unicode="σ" horiz-adv-x="1268" d="M1223 944Q1081 930 997 930Q1067 767 1067 530Q1067 260 927 118T567 -25Q348 -25 210 119T72 530Q72 800 212 942T567 1085L907 1077Q1075 1077 1223 1094V944ZM883 530Q883 781 805 930L569 938Q432 938 344 829T256 530Q256 341 344 232T569 123Q706 123 794 232T883 530Z" />
+ <glyph unicode="τ" horiz-adv-x="782" d="M750 913H482V0H301V913H33V1061H750V913Z" />
+ <glyph unicode="υ" horiz-adv-x="1128" d="M989 432Q989 219 877 97T561 -25Q362 -25 251 97T139 432V1061H319V432Q319 278 391 201T563 123Q668 123 738 199T809 430V1061H989V432Z" />
+ <glyph unicode="φ" horiz-adv-x="1319" d="M750 1085Q981 1069 1114 921T1247 530Q1247 289 1114 141T750 -25V-408H569V-25Q338 -8 205 140T72 530Q72 772 205 920T569 1085V1466H750V1085ZM750 123Q1063 156 1063 530Q1063 905 750 938V123ZM569 123V938Q256 905 256 530Q256 156 569 123Z" />
+ <glyph unicode="χ" horiz-adv-x="1069" d="M1055 -408H850L535 205L217 -408H14L424 332L45 1061H242L535 473L836 1061H1034L645 338L1055 -408Z" />
+ <glyph unicode="ω" horiz-adv-x="1569" d="M1339 1061Q1497 779 1497 512Q1497 254 1388 115T1108 -25Q884 -25 784 215Q685 -25 461 -25Q289 -25 181 115T72 512Q72 779 229 1061H403Q297 816 275 706T252 506Q252 333 316 225T481 117Q573 117 633 206T694 449V795H874V449Q874 290 932 204T1087 117Q1188 117 1252 221T1317 506Q1317 604 1292 717T1165 1061H1339Z" />
+ <glyph unicode="ώ" horiz-adv-x="1569" d="M1339 1061Q1497 779 1497 512Q1497 254 1388 115T1108 -25Q884 -25 784 215Q685 -25 461 -25Q289 -25 181 115T72 512Q72 779 229 1061H403Q297 816 275 706T252 506Q252 333 316 225T481 117Q573 117 633 206T694 449V795H874V449Q874 290 932 204T1087 117Q1188 117 1252 221T1317 506Q1317 604 1292 717T1165 1061H1339ZM934 1507L807 1229H690L750 1507H934Z" />
+
+ <!-- Russian -->
+ <glyph unicode="Я" horiz-adv-x="1479" d="M1315 0H1120V649H897Q799 649 740 625T622 532T464 310L266 0H23Q286 410 324 467T424 579T555 668Q352 697 248 800T143 1067Q143 1173 186 1256T302 1389T456 1452T666 1466H1315V0ZM1120 821V1305H657Q505 1305 425 1242T344 1065Q344 984 393 922T513 841T705 821H1120Z" />
+ <glyph unicode="в" horiz-adv-x="1087" d="M834 553Q917 521 962 454T1008 297Q1008 161 910 81T639 0H135V1061H573Q794 1061 877 975T961 780Q961 633 834 553ZM315 616H530Q776 616 776 764Q776 849 715 880T537 911H315V616ZM315 150H575Q823 150 823 307Q823 358 791 400T705 454T559 467H315V150Z" />
+ <glyph unicode="г" horiz-adv-x="784" d="M745 911H315V0H135V1061H745V911Z" />
+ <glyph unicode="д" horiz-adv-x="1194" d="M1133 -301H983V0H150V-301H0V150H94Q182 270 230 495T279 1010V1061H1018V150H1133V-301ZM838 150V911H428Q407 400 266 150H838Z" />
+ <glyph unicode="е" horiz-adv-x="1139" d="M1059 485H264Q275 309 364 216T588 123Q691 123 761 177T868 342L1053 319Q1008 153 888 64T588 -25Q349 -25 215 121T80 522Q80 773 210 929T578 1085Q694 1085 801 1034T984 861T1059 485ZM874 633Q863 795 774 866T578 938Q451 938 369 853T274 633H874Z" />
+ <glyph unicode="и" horiz-adv-x="1145" d="M1010 0H829V805L330 0H135V1061H315V252L815 1061H1010V0Z" />
+ <glyph unicode="к" horiz-adv-x="895" d="M913 0H717Q513 345 490 383T426 457T330 492H315V0H135V1061H315V602H332Q408 602 443 644T521 791Q602 990 653 1025T807 1061H872V911H823Q766 911 741 899T696 834Q642 688 607 636T487 545Q550 526 602 481T717 330L913 0Z" />
+ <glyph unicode="л" horiz-adv-x="1169" d="M1034 0H854V911H401V293Q401 115 344 55T166 -6Q91 -6 23 0V158Q83 153 115 153Q190 153 205 185T221 340V1061H1034V0Z" />
+ <glyph unicode="м" horiz-adv-x="1399" d="M1264 0H1094V897L770 0H608L305 897V0H135V1061H406L694 211L993 1061H1264V0Z" />
+ <glyph unicode="н" horiz-adv-x="1130" d="M995 0H815V471H315V0H135V1061H315V621H815V1061H995V0Z" />
+ <glyph unicode="о" horiz-adv-x="1139" d="M569 1086Q784 1086 925 946T1067 548Q1067 235 914 106T569 -24Q368 -24 220 109T72 531Q72 811 215 948T569 1086ZM569 124Q723 124 803 238T883 538Q883 737 793 838T569 939Q432 939 344 837T256 531Q256 329 345 227T569 124Z" />
+ <glyph unicode="р" horiz-adv-x="1139" d="M307 924Q408 1085 610 1085Q819 1085 940 934T1061 539Q1061 280 927 128T598 -25Q427 -25 324 111H319V-408H139V1061H303V924H307ZM586 123Q712 123 794 227T877 539Q877 734 798 839T594 944Q466 944 384 827T301 524Q301 327 380 225T586 123Z" />
+ <glyph unicode="с" horiz-adv-x="1024" d="M1006 368Q971 165 846 71T563 -24Q332 -24 206 127T80 529Q80 736 152 860T334 1035T563 1086Q727 1086 843 1001T987 751L813 724Q786 831 726 885T571 939Q420 939 342 832T264 533Q264 337 340 231T561 124Q677 124 743 190T827 390L1006 368Z" />
+ <glyph unicode="т" horiz-adv-x="938" d="M899 911H559V0H379V911H37V1061H899V911Z" />
+ <glyph unicode="у" horiz-adv-x="1024" d="M1008 1061L602 -18Q601 -20 600 -25Q542 -205 465 -317T244 -430Q196 -430 127 -410L109 -240Q161 -256 211 -256Q311 -256 349 -201T436 -2L33 1061H227L477 366Q499 302 524 201H528Q553 317 592 422L825 1061H1008Z" />
+ <glyph unicode="ь" horiz-adv-x="1071" d="M315 647H565Q772 647 890 558T1008 322Q1008 182 903 91T610 0H135V1061H315V647ZM315 150H530Q823 150 823 322Q823 498 551 498H315V150Z" />
+ <glyph unicode="э" horiz-adv-x="1044" d="M68 748Q94 908 207 996T489 1085Q713 1085 842 938T971 530Q971 277 845 127T508 -23Q322 -23 201 78T49 365L225 389Q266 125 496 125Q752 125 786 471H412V621H786Q767 772 689 855T496 938Q287 938 244 721L68 748Z" />
+
+ <!-- Hebrew -->
+ <glyph unicode="ָ" horiz-adv-x="737" d="M494 -213H412V-295H326V-213H244V-127H494V-213Z" />
+ <glyph unicode="א" horiz-adv-x="1182" d="M1059 0H844L451 580Q307 485 307 219V0H139V219Q139 543 371 696L123 1061H338L668 578Q774 628 824 714T874 944V1061H1042V940Q1042 600 743 463L1059 0Z" />
+ <glyph unicode="ג" horiz-adv-x="842" d="M791 0H616L524 342L262 0H41L303 317Q440 483 451 499T469 541T477 608V719Q477 827 440 866T315 905Q257 905 180 883L150 1065Q228 1085 336 1085Q500 1085 572 1002T645 739V612Q645 540 668 457L791 0Z" />
+ <glyph unicode="ה" horiz-adv-x="1217" d="M1077 0H909V578Q909 767 829 836T547 905Q390 905 176 879L147 1061Q341 1085 549 1085Q832 1085 954 976T1077 584V0ZM315 0H147V623H315V0Z" />
+ <glyph unicode="ו" horiz-adv-x="647" d="M508 0H340V721Q340 822 305 863T180 905Q133 905 61 883L33 1065Q109 1085 221 1085Q508 1085 508 748V0Z" />
+ <glyph unicode="ז" horiz-adv-x="668" d="M627 715Q551 743 526 749T471 756Q369 756 369 606V0H201V606Q201 689 242 747T346 817L57 922V1112L627 905V715Z" />
+ <glyph unicode="ט" horiz-adv-x="1217" d="M1090 528Q1090 -25 614 -25Q139 -25 139 528V1061H307V535Q307 339 380 248T614 156Q775 156 848 247T922 535V694Q922 805 891 861T772 918Q715 918 653 893L618 1059Q711 1085 803 1085Q940 1085 1015 985T1090 705V528Z" />
+ <glyph unicode="י" horiz-adv-x="647" d="M508 528H340V721Q340 822 305 863T180 905Q133 905 61 883L33 1065Q109 1085 221 1085Q508 1085 508 748V528Z" />
+ <glyph unicode="ך" horiz-adv-x="1038" d="M899 -408H731V578Q731 767 651 836T369 905Q240 905 72 879L41 1061Q221 1085 371 1085Q654 1085 776 976T899 584V-408Z" />
+ <glyph unicode="כ" horiz-adv-x="1079" d="M78 1061Q252 1085 410 1085Q696 1085 828 955T961 530Q961 248 834 112T410 -25Q252 -25 78 0L106 182Q260 156 406 156Q612 156 702 242T793 530Q793 729 704 817T406 905Q260 905 106 879L78 1061Z" />
+ <glyph unicode="ל" horiz-adv-x="991" d="M236 1061H498Q689 1061 791 972T893 729Q893 512 752 331T295 -25L203 131Q473 272 599 416T725 723Q725 881 498 881H68V1466H236V1061Z" />
+ <glyph unicode="מ" horiz-adv-x="1217" d="M1077 0H565V180H909V573Q909 751 848 828T666 905Q537 905 465 822T360 566L254 0H82L208 636Q218 685 231 725L61 1061H252L324 918Q451 1085 676 1085Q878 1085 977 968T1077 569V0Z" />
+ <glyph unicode="ן" horiz-adv-x="647" d="M508 -408H340V721Q340 822 305 863T180 905Q133 905 61 883L33 1065Q109 1085 221 1085Q508 1085 508 748V-408Z" />
+ <glyph unicode="נ" horiz-adv-x="692" d="M553 0H78V180H385V721Q385 822 350 863T225 905Q178 905 106 883L78 1065Q155 1085 266 1085Q553 1085 553 748V0Z" />
+ <glyph unicode="ס" horiz-adv-x="1237" d="M51 1026Q335 1085 573 1085Q837 1085 977 943T1118 526Q1118 252 991 114T629 -25Q390 -25 265 115T139 526Q139 713 215 870Q167 862 82 844L51 1026ZM397 895Q307 744 307 526Q307 156 629 156Q950 156 950 526Q950 905 573 905Q506 905 397 895Z" />
+ <glyph unicode="ע" horiz-adv-x="1126" d="M1030 1061Q1030 473 767 153T86 -168L66 12Q238 12 385 76L96 1061H274L532 166Q862 417 862 1061H1030Z" />
+ <glyph unicode="ק" horiz-adv-x="1194" d="M147 1061H700Q892 1061 994 972T1096 729Q1096 286 539 -25L446 131Q928 384 928 723Q928 881 700 881H147V1061ZM315 -408H147V604H315V-408Z" />
+ <glyph unicode="ר" horiz-adv-x="1038" d="M899 0H731V578Q731 767 651 836T369 905Q240 905 72 879L41 1061Q221 1085 371 1085Q654 1085 776 976T899 584V0Z" />
+ <glyph unicode="ש" horiz-adv-x="1434" d="M1380 1061Q1272 471 1092 223T578 -25Q327 -25 147 35V1061H315V506Q415 506 483 548T604 710T698 1061H868Q812 758 737 606T562 401T315 348V184Q397 156 588 156Q834 156 976 368T1210 1061H1380Z" />
+ <glyph unicode="ת" horiz-adv-x="1296" d="M1157 0H989V578Q989 755 894 830T586 905Q497 905 395 893V262Q395 -27 164 -27Q114 -27 43 -12L68 164Q102 154 150 154Q185 154 206 173T227 276V866Q181 858 92 838L55 1020Q332 1085 588 1085Q886 1085 1021 967T1157 584V0Z" />
+ <glyph unicode="װ" glyph-name="null" horiz-adv-x="1208" d="M508 0H340V721Q340 822 305 863T180 905Q133 905 61 883L33 1065Q109 1085 221 1085Q508 1085 508 748V0ZM1069 0H901V721Q901 822 866 863T741 905Q694 905 622 883L594 1065Q670 1085 782 1085Q1069 1085 1069 748V0Z" />
+ <glyph unicode="ײ" glyph-name="null" horiz-adv-x="1208" d="M508 528H340V721Q340 822 305 863T180 905Q133 905 61 883L33 1065Q109 1085 221 1085Q508 1085 508 748V528ZM1069 528H901V721Q901 822 866 863T741 905Q694 905 622 883L594 1065Q670 1085 782 1085Q1069 1085 1069 748V528Z" />
+
+ <!-- Chinese/Japanese -->
+ <glyph unicode="。" horiz-adv-x="2048" d="M469 481Q591 481 677 394T764 184Q764 62 678 -24T471 -111Q349 -111 263 -25T176 184Q176 307 262 394T469 481ZM470 14Q541 14 590 64T640 186Q640 257 590 306T470 356Q400 356 350 307T300 186Q300 115 349 65T470 14Z" />
+ <glyph unicode="け" horiz-adv-x="2048" d="M842 535Q732 342 655 -6H504Q421 150 377 392T332 827Q332 1188 434 1602L635 1554Q516 1152 516 827Q516 538 563 350H567Q599 464 668 610L842 535ZM1872 1042Q1713 1013 1581 999Q1583 940 1583 913Q1583 708 1564 546T1480 216T1290 -113L1102 10Q1229 127 1292 265T1376 566T1397 975Q1163 958 1063 958Q894 958 782 963L778 1163Q899 1141 1087 1141Q1226 1141 1393 1155Q1386 1335 1350 1546L1542 1565Q1566 1363 1573 1176Q1684 1187 1849 1225L1872 1042Z" />
+ <glyph unicode="す" horiz-adv-x="2048" d="M1815 1141H1354V799Q1397 664 1397 535Q1397 314 1281 142T944 -127L829 61Q990 105 1087 191T1198 385Q1110 309 985 309Q845 309 737 411T629 676Q629 842 730 950T991 1059Q1094 1059 1167 1008V1141H233V1325H1167V1583H1354V1325H1815V1141ZM977 500Q1057 500 1109 559T1161 698Q1161 767 1110 815T985 864Q913 864 866 811T819 680Q819 593 862 547T977 500Z" />
+ <glyph unicode="せ" horiz-adv-x="2048" d="M1800 995L1475 969Q1475 759 1466 663T1428 515T1325 430T1167 395Q1141 395 1081 399L1044 602Q1128 580 1178 580Q1255 580 1271 639T1288 952L684 905Q684 523 699 376T795 188T1141 147Q1283 147 1679 180L1657 -27Q1437 -33 1143 -33Q787 -33 692 12T549 184T500 889L215 868L201 1055L494 1077Q494 1373 502 1556H705Q678 1311 678 1096L1288 1143V1212Q1286 1338 1268 1556H1454Q1475 1334 1475 1206V1157L1786 1180L1800 995Z" />
+ <glyph unicode="そ" horiz-adv-x="2048" d="M1817 932Q1321 899 1128 757T934 446Q934 314 1088 221T1456 127L1380 -72Q1087 -27 913 108T739 428Q739 626 946 819L942 823Q464 762 250 729L209 928L665 982Q705 987 793 1053Q885 1121 946 1170Q1025 1232 1077 1280Q748 1285 471 1339L508 1538Q642 1502 845 1478T1427 1454V1288Q1234 1138 1010 1020L1014 1016L1786 1133L1817 932Z" />
+ <glyph unicode="つ" horiz-adv-x="2048" d="M250 1165Q858 1321 1208 1321Q1418 1321 1532 1265T1712 1077T1778 788Q1778 475 1572 286T1004 96Q939 96 848 100L813 307Q926 285 1040 285Q1297 285 1445 430T1593 793Q1593 957 1496 1054T1180 1151Q1024 1151 836 1111T559 1042L330 975L250 1165Z" />
+ <glyph unicode="は" horiz-adv-x="2048" d="M1835 344L1714 162Q1593 249 1399 338Q1390 143 1298 41T1038 -61Q864 -61 756 29T647 258Q647 408 777 502T1087 596Q1170 596 1221 586V1020Q858 1020 651 1036L657 1231Q838 1202 1098 1202Q1145 1202 1221 1206V1585H1407V1219Q1519 1225 1733 1266V1067Q1601 1047 1407 1034V547Q1620 474 1835 344ZM1210 391Q1155 410 1090 410Q985 410 907 365T829 254Q829 193 889 158T1036 123Q1124 123 1163 183T1210 391ZM670 469Q570 224 512 -39H342Q227 240 227 651Q227 1065 340 1567L543 1511Q412 1134 412 649Q412 463 430 322H434Q476 453 510 528L670 469Z" />
+ <glyph unicode="べ" horiz-adv-x="2048" d="M1827 1374L1686 1315Q1648 1485 1587 1589L1737 1651Q1793 1539 1827 1374ZM1599 1292L1458 1233Q1421 1403 1360 1507L1509 1569Q1566 1457 1599 1292ZM1862 287L1737 135Q1461 365 1249 593T834 1118Q820 1139 811 1139Q802 1139 722 1055Q457 776 317 666L176 823Q501 1061 745 1356H901Q1117 1028 1331 788T1862 287Z" />
+ <glyph unicode="ま" horiz-adv-x="2048" d="M1827 254L1702 80Q1364 327 1126 383Q1126 197 1023 74T731 -49Q560 -49 446 47T332 276Q332 426 467 520T805 614Q881 614 938 606V811Q612 811 295 831V1016Q601 995 938 995V1194Q563 1194 258 1163V1348Q563 1378 938 1378V1632H1118V1378Q1484 1378 1767 1348V1163Q1492 1194 1118 1194V995Q1438 995 1739 1016V831Q1440 811 1118 811V584Q1478 499 1827 254ZM936 422Q864 426 817 426Q693 426 613 387T532 276Q532 220 587 182T727 143Q834 143 885 197T936 422Z" />
+ <glyph unicode="ら" horiz-adv-x="2048" d="M1499 1319L1403 1153Q1198 1309 815 1425L913 1597Q1266 1469 1499 1319ZM551 778Q821 891 1092 891Q1341 891 1507 772T1673 446Q1673 234 1516 100T1104 -35Q843 -35 463 55L479 274Q764 187 880 167T1083 147Q1489 147 1489 455Q1489 574 1373 641T1083 709Q799 709 446 520L295 643Q464 1074 616 1327L793 1237Q688 1107 551 778Z" />
+ <glyph unicode="れ" horiz-adv-x="2048" d="M1866 172Q1735 84 1614 84Q1495 84 1430 162T1364 377Q1364 463 1406 666Q1450 874 1450 965Q1450 1034 1419 1073T1333 1112Q1152 1112 805 745V-59H625V543Q517 420 369 190L215 307Q359 533 625 834V958H276V1143H625V1585H805V1145Q834 1138 852 1125T870 1100Q870 1083 850 1040L854 1036Q970 1148 1103 1222T1331 1296Q1460 1296 1545 1202T1630 963Q1630 867 1583 661Q1540 474 1540 395Q1540 270 1612 270Q1686 270 1866 385V172Z" />
+ <glyph unicode="を" horiz-adv-x="2048" d="M1747 -25Q1475 -49 1245 -49Q880 -49 748 36T616 285Q616 422 743 556T1104 803Q1072 913 918 913Q854 913 785 891T674 834Q508 600 397 481L236 610Q309 668 369 736T477 873T572 1026L666 1194Q643 1192 584 1192Q493 1192 328 1200V1399Q473 1380 614 1380Q668 1380 760 1384Q820 1494 858 1649L1053 1593Q998 1451 971 1397Q1296 1411 1579 1462L1591 1272Q1328 1240 881 1210Q831 1102 795 1047Q906 1075 971 1075Q1087 1075 1176 1018T1286 885Q1377 928 1671 1044L1745 856Q1466 753 1305 686V309H1112V596Q973 532 887 446T801 274Q801 203 881 172T1184 141Q1409 141 1729 184L1747 -25Z" />
+ <glyph unicode="ん" horiz-adv-x="2048" d="M1855 369Q1657 125 1543 55T1319 -16Q1199 -16 1126 71T1053 295Q1053 402 1090 557Q1112 649 1112 692Q1112 784 1024 784Q954 784 851 730T667 586T503 328L352 25L184 102L946 1593L1118 1509L788 889L793 885Q899 969 1028 969Q1149 969 1226 895T1303 705Q1303 630 1273 490Q1245 355 1245 285Q1245 234 1269 203T1335 172Q1483 172 1702 502L1855 369Z" />
+ <glyph unicode="ガ" horiz-adv-x="2048" d="M1819 1425L1677 1366Q1640 1536 1579 1640L1729 1702Q1785 1590 1819 1425ZM1757 1245L1751 852Q1748 653 1731 487T1671 187T1577 0T1464 -68T1319 -84Q1262 -84 1133 -82L1081 117Q1257 102 1356 102Q1458 102 1517 323T1577 862L1575 1067H1067Q1006 626 822 355T311 -84L180 70Q522 246 675 462T883 1061H213V1245H897V1626H1081V1245H1757ZM1591 1343L1450 1284Q1412 1454 1352 1559L1501 1620Q1558 1508 1591 1343Z" />
+ <glyph unicode="ス" horiz-adv-x="2048" d="M1950 45L1790 -72Q1494 332 1098 575Q777 173 311 -106L168 41Q555 244 849 572T1309 1313H283V1489L1483 1491L1538 1434Q1426 1041 1206 723Q1633 451 1950 45Z" />
+ <glyph unicode="ラ" horiz-adv-x="2048" d="M1679 1348H332V1532H1679V1348ZM1788 967Q1788 930 1698 779T1525 526T1344 334T1130 161T883 11T604 -117L492 59Q1293 324 1579 954H213V1139H1788V967Z" />
+ <glyph unicode="体" horiz-adv-x="2048" d="M711 1636Q698 1506 628 1313L557 1126V-123H399V848Q335 762 213 631L76 723Q417 1033 575 1702L711 1636ZM1978 371L1862 250Q1683 383 1564 557T1339 1135H1335V412H1667V262H1335V-131H1180V262H856V412H1180V1055Q1063 570 666 250L553 365Q754 544 851 703T1024 1151H639V1300H1180V1698H1335V1300H1894V1151H1489Q1566 839 1669 683T1978 371Z" />
+ <glyph unicode="下" horiz-adv-x="2048" d="M1876 1425H1024V-121H862V1425H172V1581H1876V1425ZM1729 547L1614 426Q1438 667 1083 864L1178 969Q1480 846 1729 547Z" />
+ <glyph unicode="不" horiz-adv-x="2048" d="M1888 1419H1227Q1184 1347 1096 1221V-133H928V1022Q730 756 248 489L145 623Q458 774 655 952T1030 1419H176V1575H1888V1419ZM1901 588L1776 481Q1478 843 1151 985L1260 1094Q1590 945 1901 588Z" />
+ <glyph unicode="伤" horiz-adv-x="2048" d="M664 1640Q641 1521 618 1419T564 1223L500 1034V-135H344V758L342 762Q302 660 164 528L61 639Q270 849 385 1157T526 1686L664 1640ZM1882 1257H987Q852 877 643 694L532 805Q853 1091 920 1679L1057 1634Q1050 1529 1018 1407H1882V1257ZM1835 977Q1773 107 1713 -2T1537 -112Q1467 -112 1303 -88L1260 68L1501 31Q1534 26 1560 43T1618 308T1673 836H1313Q1266 189 877 -133L760 -16Q1125 226 1161 836H913V977H1176L1178 1208L1329 1176L1323 977H1835Z"/>
+ <glyph unicode="傷" horiz-adv-x="2048" d="M1835 1419H942Q917 1366 907 1350H1716V827H840V1255H836Q803 1200 659 1051L541 1157Q835 1427 887 1718L1032 1659Q1026 1612 995 1569H1835V1419ZM1563 1223H1001V1151H1561L1563 1223ZM1563 1030H1001V954H1561L1563 1030ZM688 1622Q656 1510 579 1335L502 1163V-137H346V922H342Q279 818 197 741L63 834Q409 1198 532 1706L688 1622ZM1952 598H1145Q1128 570 1075 514H1862Q1848 327 1809 177T1743 -16T1663 -84T1559 -102L1370 -78L1319 70Q1173 -48 997 -133L885 -27Q1292 164 1405 373H1262Q1092 151 723 10L594 121Q881 214 1059 373H905Q737 269 631 242L516 360Q847 463 961 598H623V748H1952V598ZM1694 373H1567Q1497 222 1327 76Q1504 35 1563 35Q1606 35 1643 146T1694 373Z" />
+ <glyph unicode="吞" horiz-adv-x="2048" d="M1964 539L1839 406Q1594 550 1532 608V-137H1370V-4H717V-147H555V594Q464 520 233 387L109 516Q518 724 715 1012H207V1161H803Q851 1248 893 1434H360V1583H1718V1434H1053Q1027 1294 979 1161H1878V1012H1364Q1423 905 1601 758T1964 539ZM1454 666Q1291 811 1171 1012H907Q788 808 631 666H1454ZM1370 145V516H717V145H1370Z" />
+ <glyph unicode="我" horiz-adv-x="2048" d="M1911 301Q1877 -113 1739 -113Q1654 -113 1544 -8T1341 254Q1184 123 944 -4L807 111Q1108 255 1270 408Q1195 617 1155 922H760V627L1077 707V549L760 465V41Q760 -39 707 -81T531 -121T356 -121L299 39L551 33Q598 33 598 86V420L240 324L125 473Q364 519 598 580V922H178V1077H598V1372Q456 1326 262 1317L166 1470Q574 1467 967 1696L1069 1579Q839 1443 760 1411V1077H1141Q1127 1285 1127 1521Q1127 1608 1128 1704H1286Q1286 1323 1305 1077H1849V922H1319Q1341 730 1401 530Q1539 684 1630 866L1769 807Q1644 563 1462 375Q1478 334 1563 209T1681 83Q1725 83 1751 362L1911 301ZM1821 1272L1690 1159Q1597 1375 1337 1499L1468 1618Q1724 1472 1821 1272Z" />
+ <glyph unicode="玻" horiz-adv-x="2048" d="M1985 2L1882 -131Q1569 -32 1393 160Q1272 51 958 -129L848 12Q1127 128 1286 281Q1128 501 1079 768H1020V918H1264V1276H985V639Q985 236 795 -16L713 -125L571 -31Q681 84 745 210T820 455T832 856L829 1425H1264V1700H1419V1425H1898Q1839 1139 1800 1006L1645 1030Q1692 1195 1702 1276H1419V918H1757Q1729 528 1501 272Q1661 104 1985 2ZM1581 768H1223Q1271 579 1401 397Q1547 589 1581 768ZM791 383L213 209L131 346L412 424V891H221V1040H412V1395H166V1544H780V1395H567V1040H752V891H567V471L791 532V383Z" />
+ <glyph unicode="璃" horiz-adv-x="2048" d="M1931 1389H729V1538H1217V1706H1382V1538H1931V1389ZM721 305L160 166L80 315L356 375V866H164V1016H356V1421H150V1571H696V1421H512V1016H680V866H512V412L721 467V305ZM1604 1010L1493 913Q1431 994 1335 1059Q1252 993 1063 911L977 1036Q1160 1101 1202 1139Q1092 1187 981 1217L1094 1323Q1220 1286 1319 1235Q1393 1299 1440 1378L1563 1290Q1507 1219 1444 1159Q1520 1111 1604 1010ZM1833 37Q1833 -40 1788 -84T1667 -129H1513L1466 27Q1554 18 1616 18Q1653 18 1665 27T1677 72V481H1303Q1260 346 1212 262Q1419 279 1430 281Q1415 317 1337 395L1470 438Q1591 302 1647 117L1509 59L1479 156L1010 98L938 244L1053 254L1147 481H907V-141H752V631H1184Q1195 661 1206 748H803V1321H958V897H1616V1305H1772V748H1358Q1348 685 1335 631H1833V37Z" />
+ <glyph unicode="私" horiz-adv-x="2048" d="M1057 983H719V823L772 866Q919 763 1055 549L924 455Q845 611 719 711V-139H557V643Q419 407 197 207L82 322Q394 578 549 983H156V1133H561V1425Q337 1389 195 1382L137 1536Q637 1561 940 1706L1022 1571Q851 1486 719 1450V1133H1057V983ZM1964 4Q1883 -28 1802 -68Q1749 124 1747 125L899 51L842 221L995 233Q1234 839 1391 1667L1559 1608Q1404 860 1163 238L1692 274Q1567 524 1477 633L1618 692Q1834 456 1964 4Z" />
+ <glyph unicode="而" horiz-adv-x="2048" d="M1890 1423H1124Q1097 1222 1051 1120H1753V63Q1736 -23 1685 -64T1407 -94L1356 57L1493 55Q1597 52 1597 111V971H1321V61H1165V971H911V57H750V971H485V-139H324V1120H872Q934 1231 958 1423H182V1573H1890V1423Z" />
+ <glyph unicode="能" horiz-adv-x="2048" d="M1094 1118L961 1034L899 1149L170 1110L129 1268L270 1272Q421 1490 526 1729L682 1661Q549 1402 451 1272L813 1286Q755 1374 686 1440L823 1516Q999 1352 1094 1118ZM1913 1176Q1864 809 1694 809H1319Q1216 820 1177 871T1137 963V1671H1292V1343Q1599 1430 1778 1571L1872 1454Q1670 1283 1292 1190V1016Q1301 958 1397 958H1667Q1738 958 1763 1233L1913 1176ZM979 80Q979 9 946 -33T865 -88T631 -98L573 59Q687 47 735 47Q823 47 823 102V295H395V-113H240V989H979V80ZM823 717V840H395V717H823ZM823 444V567H395V444H823ZM1964 256Q1926 43 1866 -23T1718 -90H1333Q1235 -90 1190 -30T1145 84V739H1300V455Q1584 520 1794 676L1901 561Q1654 372 1300 301V111Q1300 59 1370 59H1702Q1750 59 1774 116T1812 330L1964 256Z" />
+ <glyph unicode="身" horiz-adv-x="2048" d="M1892 985Q1710 739 1526 567V47Q1526 -28 1470 -77T1341 -127H1106L1049 51L1309 41Q1364 50 1364 102V432Q1034 169 266 -63L152 72Q913 280 1274 543L344 426L254 584L510 610V1530L874 1534Q944 1601 1016 1747L1159 1671Q1091 1564 1063 1536H1526V778Q1750 1065 1767 1090L1892 985ZM1364 1253V1386H666V1253H1364ZM1364 961V1104H666V961H1364ZM1364 690V811H666V623L1364 690Z" />
+ <glyph unicode="食" horiz-adv-x="2048" d="M1960 1079L1851 938Q1688 1002 1556 1075V416H1100Q1223 296 1333 242Q1469 307 1550 397L1673 291Q1570 202 1466 162Q1658 65 1944 10L1829 -127Q1175 44 911 416H643V57L1075 106V-41L362 -137L299 27L489 43V1079Q361 1011 190 946L88 1090Q380 1182 630 1358T981 1735L1124 1673L1106 1634Q1367 1295 1960 1079ZM1534 1087Q1210 1268 1018 1501Q811 1255 502 1087H946V1274H1102V1087H1534ZM1399 825L1401 938H643V825H1399ZM1401 565V676H643V565H1401Z" />
+
+ <!-- Upper latin -->
+ <glyph unicode="C" horiz-adv-x="1479" d="M1399 465Q1335 218 1176 97T793 -25Q433 -25 269 200T104 743Q104 1094 297 1292T795 1491Q1009 1491 1161 1382T1374 1063L1184 1018Q1136 1171 1038 1248T793 1325Q553 1325 429 1168T305 745Q305 439 435 290T776 141Q948 141 1055 234T1206 514L1399 465Z" />
+ <glyph unicode="G" horiz-adv-x="1593" d="M1462 205Q1185 -25 856 -25Q519 -25 313 180T106 727Q106 935 190 1114T439 1392T842 1491Q1089 1491 1238 1383T1440 1057L1266 1008Q1225 1166 1119 1245T842 1325Q577 1325 442 1163T307 739Q307 543 372 413T566 217T846 150Q1076 150 1274 301V573H842V748H1462V205Z" />
+ <glyph unicode="H" horiz-adv-x="1479" d="M1315 0H1120V690H358V0H164V1466H358V864H1120V1466H1315V0Z" />
+ <glyph unicode="J" horiz-adv-x="1024" d="M860 469Q860 200 752 88T449 -25Q252 -25 154 85T55 418L229 442Q231 296 286 223T449 150Q548 150 596 197T655 305T666 459V1466H860V469Z" />
+ <glyph unicode="M" horiz-adv-x="1706" d="M1550 0H1366V1227H1362L940 0H766L346 1247H340V0H156V1466H446L793 428Q851 255 860 211H864Q891 296 942 446L1292 1466H1550V0Z" />
+ <glyph unicode="P" horiz-adv-x="1366" d="M158 1466H711Q842 1466 936 1453T1112 1386T1234 1238T1276 1042Q1276 839 1146 717T727 594H352V0H158V1466ZM352 768H729Q1075 768 1075 1036Q1075 1124 1030 1191T920 1275T725 1292H352V768Z" />
+ <glyph unicode="R" horiz-adv-x="1479" d="M1456 0H1212Q993 346 940 425T829 560T719 632T582 647H358V0H164V1466H813Q946 1466 1036 1449T1194 1378T1298 1240T1335 1065Q1335 899 1230 798T924 670V666Q1071 601 1200 399L1456 0ZM358 821H774Q900 821 973 842T1091 926T1135 1065Q1135 1165 1062 1235T821 1305H358V821Z" />
+ <glyph unicode="T" horiz-adv-x="1251" d="M1206 1292H721V0H526V1292H45V1466H1206V1292Z" />
+ <glyph unicode="Y" horiz-adv-x="1366" d="M1354 1466L770 621V0H575V621L10 1466H246L568 973Q617 898 684 776Q726 858 1128 1466H1354Z" />
+
+ <!-- Lower latin -->
+ <glyph unicode="a" horiz-adv-x="1139" d="M1057 0H868Q842 50 831 131Q650 -25 440 -25Q272 -25 175 59T78 281Q78 413 171 498T496 612L664 637Q758 652 819 674Q819 755 814 788T785 858T706 916T561 938Q445 938 378 895T285 735L109 758Q138 921 258 1003T588 1085Q779 1085 868 1029T978 892T999 686V444Q999 223 1007 148T1057 0ZM819 467V532Q678 485 474 458T270 285Q270 212 325 165T483 117Q616 117 717 196T819 467Z" />
+ <glyph unicode="b" horiz-adv-x="1139" d="M322 942Q422 1085 608 1085Q813 1085 936 936T1059 547Q1059 270 922 123T600 -25Q413 -25 309 133H305V0H137V1466H317V942H322ZM586 123Q711 123 792 230T874 532Q874 719 799 828T592 938Q462 938 383 825T303 539Q303 370 336 299T435 175T586 123Z" />
+ <glyph unicode="d" horiz-adv-x="1139" d="M995 0H827V135H823Q726 -25 530 -25Q335 -25 205 129T74 530Q74 787 197 936T522 1085Q712 1085 811 940H815V1466H995V0ZM549 123Q667 123 749 220T831 514Q831 708 756 823T541 938Q401 938 330 826T258 530Q258 398 296 307T404 169T549 123Z" />
+ <glyph unicode="e" horiz-adv-x="1139" d="M1059 485H264Q275 309 364 216T588 123Q691 123 761 177T868 342L1053 319Q1008 153 888 64T588 -25Q349 -25 215 121T80 522Q80 773 210 929T578 1085Q694 1085 801 1034T984 861T1059 485ZM874 633Q863 795 774 866T578 938Q451 938 369 853T274 633H874Z" />
+ <glyph unicode="g" horiz-adv-x="1139" d="M1006 143Q1006 -83 961 -194T801 -368T526 -430Q346 -430 226 -350T106 -88L281 -115Q291 -199 351 -241T524 -283Q664 -283 729 -226T808 -87T823 139Q706 0 528 0Q321 0 196 153T70 539Q70 773 192 929T530 1085Q718 1085 836 934H840V1061H1006V143ZM545 147Q660 147 749 238T838 545Q838 735 753 836T543 938Q415 938 335 834T254 549Q254 340 338 244T545 147Z" />
+ <glyph unicode="h" horiz-adv-x="1139" d="M1004 0H823V670Q823 800 767 865T600 930Q490 930 404 854T317 580V0H137V1466H317V940Q445 1085 637 1085Q740 1085 834 1043T966 914T1004 672V0Z" />
+ <glyph unicode="i" horiz-adv-x="455" d="M317 0H137V1061H317V0ZM317 1262H137V1466H317V1262Z" />
+ <glyph unicode="j" horiz-adv-x="455" d="M317 -57Q317 -162 303 -237T231 -370T49 -428Q-22 -428 -92 -410L-57 -258Q-7 -272 27 -272Q85 -272 111 -233T137 -53V1061H317V-57ZM317 1262H137V1466H317V1262Z" />
+ <glyph unicode="k" horiz-adv-x="1024" d="M1016 0H795L442 543L315 422V0H135V1466H315V631L741 1061H975L569 668L1016 0Z" />
+ <glyph unicode="l" horiz-adv-x="455" d="M317 0H137V1466H317V0Z" />
+ <glyph unicode="m" horiz-adv-x="1706" d="M1575 0H1395V670Q1395 744 1385 796T1334 889T1204 930Q1098 930 1021 856T944 616V0H764V690Q764 828 716 879T578 930Q462 930 388 850T313 551V0H133V1061H295V913H299Q407 1085 616 1085Q733 1085 808 1039T918 899Q1036 1085 1245 1085Q1410 1085 1492 996T1575 729V0Z" />
+ <glyph unicode="n" horiz-adv-x="1139" d="M1004 0H823V645Q823 808 765 869T602 930Q522 930 451 891T349 781T319 580V0H139V1061H301V911H305Q362 998 445 1041T639 1085Q723 1085 805 1055T933 965T992 837T1004 653V0Z" />
+ <glyph unicode="o" horiz-adv-x="1139" d="M569 1085Q784 1085 925 945T1067 547Q1067 234 914 105T569 -25Q368 -25 220 108T72 530Q72 810 215 947T569 1085ZM569 123Q723 123 803 237T883 537Q883 736 793 837T569 938Q432 938 344 836T256 530Q256 328 345 226T569 123Z" />
+ <glyph unicode="p" horiz-adv-x="1139" d="M307 924Q408 1085 610 1085Q819 1085 940 934T1061 539Q1061 280 927 128T598 -25Q427 -25 324 111H319V-408H139V1061H303V924H307ZM586 123Q712 123 794 227T877 539Q877 734 798 839T594 944Q466 944 384 827T301 524Q301 327 380 225T586 123Z" />
+ <glyph unicode="r" horiz-adv-x="682" d="M709 1028L647 862Q580 901 516 901Q415 901 363 811T311 557V0H131V1061H295V901H299Q385 1085 524 1085Q616 1085 709 1028Z" />
+ <glyph unicode="s" horiz-adv-x="1024" d="M729 764Q717 851 659 894T496 938Q393 938 330 903T266 801Q266 738 316 711T516 645Q684 602 767 569T897 477T944 311Q944 169 828 72T518 -25Q316 -25 203 60T63 317L242 344Q256 233 324 178T516 123Q634 123 697 172T760 293Q760 341 731 370T659 413T463 465Q237 519 165 596T92 780Q92 913 198 999T483 1085Q673 1085 778 1011T905 788L729 764Z" />
+ <glyph unicode="t" horiz-adv-x="569" d="M551 2Q471 -14 416 -14Q298 -14 244 27T178 133T166 311V922H35V1061H166V1325L346 1434V1061H526V922H346V301Q346 221 362 188T446 154Q485 154 526 162L551 2Z" />
+ <glyph unicode="u" horiz-adv-x="1139" d="M997 0H836V156H831Q709 -25 498 -25Q387 -25 293 26T167 168T135 403V1061H315V473Q315 332 328 271T399 171T535 131Q637 131 727 201T817 494V1061H997V0Z" />
+ <glyph unicode="w" horiz-adv-x="1479" d="M1468 1061L1135 0H948L780 637Q779 637 759 723T739 817H735L524 0H336L10 1061H197L428 221L464 364L653 1061H838L981 505Q1041 275 1047 244H1051L1292 1061H1468Z" />
+ <glyph unicode="x" horiz-adv-x="1024" d="M1010 0H788L512 420L233 0H14L403 553L45 1061H268Q486 732 506 694L766 1061H981L614 563L1010 0Z" />
+ <glyph unicode="z" horiz-adv-x="1024" d="M981 0H41V145L717 920Q598 913 514 913H80V1061H948V944L373 272Q356 251 285 174Q268 158 262 147Q365 156 489 156H981V0Z" />
+</font>
+
+<!-- FIXME: We don't support vertical SVG Fonts 100% correct so far, vert-adv-y is not taken into account. This is a hacked approxmiation to get somewhat correct vertical svg fonts -->
+<font id="exoticVertical" vert-origin-y="141" horiz-adv-x="0">
+ <font-face font-family="SVGExotic" units-per-em="2048" panose-1="2 11 6 4 2 2 2 2 2 4" ascent="2189" descent="-555" alphabetic="0" />
+ <missing-glyph horiz-adv-x="2048" d="M256 0V1536H1792V0H256ZM384 128H1664V1408H384V128Z" />
+
+ <!-- Punctuation -->
+ <glyph unicode=" " horiz-adv-x="569" />
+ <glyph unicode=":" horiz-adv-x="569" d="M389 856H184V1061H389V856ZM389 0H184V205H389V0Z" />
+ <glyph unicode=""" horiz-adv-x="727" d="M641 1227L596 946H485L436 1227V1466H641V1227ZM289 1227L244 946H133L84 1227V1466H289V1227Z" />
+
+ <!-- Chinese/Japanese -->
+ <glyph unicode="。" horiz-adv-x="2048" d="M469 481Q591 481 677 394T764 184Q764 62 678 -24T471 -111Q349 -111 263 -25T176 184Q176 307 262 394T469 481ZM470 14Q541 14 590 64T640 186Q640 257 590 306T470 356Q400 356 350 307T300 186Q300 115 349 65T470 14Z" />
+ <glyph unicode="け" horiz-adv-x="2048" d="M842 535Q732 342 655 -6H504Q421 150 377 392T332 827Q332 1188 434 1602L635 1554Q516 1152 516 827Q516 538 563 350H567Q599 464 668 610L842 535ZM1872 1042Q1713 1013 1581 999Q1583 940 1583 913Q1583 708 1564 546T1480 216T1290 -113L1102 10Q1229 127 1292 265T1376 566T1397 975Q1163 958 1063 958Q894 958 782 963L778 1163Q899 1141 1087 1141Q1226 1141 1393 1155Q1386 1335 1350 1546L1542 1565Q1566 1363 1573 1176Q1684 1187 1849 1225L1872 1042Z" />
+ <glyph unicode="す" horiz-adv-x="2048" d="M1815 1141H1354V799Q1397 664 1397 535Q1397 314 1281 142T944 -127L829 61Q990 105 1087 191T1198 385Q1110 309 985 309Q845 309 737 411T629 676Q629 842 730 950T991 1059Q1094 1059 1167 1008V1141H233V1325H1167V1583H1354V1325H1815V1141ZM977 500Q1057 500 1109 559T1161 698Q1161 767 1110 815T985 864Q913 864 866 811T819 680Q819 593 862 547T977 500Z" />
+ <glyph unicode="せ" horiz-adv-x="2048" d="M1800 995L1475 969Q1475 759 1466 663T1428 515T1325 430T1167 395Q1141 395 1081 399L1044 602Q1128 580 1178 580Q1255 580 1271 639T1288 952L684 905Q684 523 699 376T795 188T1141 147Q1283 147 1679 180L1657 -27Q1437 -33 1143 -33Q787 -33 692 12T549 184T500 889L215 868L201 1055L494 1077Q494 1373 502 1556H705Q678 1311 678 1096L1288 1143V1212Q1286 1338 1268 1556H1454Q1475 1334 1475 1206V1157L1786 1180L1800 995Z" />
+ <glyph unicode="そ" horiz-adv-x="2048" d="M1817 932Q1321 899 1128 757T934 446Q934 314 1088 221T1456 127L1380 -72Q1087 -27 913 108T739 428Q739 626 946 819L942 823Q464 762 250 729L209 928L665 982Q705 987 793 1053Q885 1121 946 1170Q1025 1232 1077 1280Q748 1285 471 1339L508 1538Q642 1502 845 1478T1427 1454V1288Q1234 1138 1010 1020L1014 1016L1786 1133L1817 932Z" />
+ <glyph unicode="つ" horiz-adv-x="2048" d="M250 1165Q858 1321 1208 1321Q1418 1321 1532 1265T1712 1077T1778 788Q1778 475 1572 286T1004 96Q939 96 848 100L813 307Q926 285 1040 285Q1297 285 1445 430T1593 793Q1593 957 1496 1054T1180 1151Q1024 1151 836 1111T559 1042L330 975L250 1165Z" />
+ <glyph unicode="は" horiz-adv-x="2048" d="M1835 344L1714 162Q1593 249 1399 338Q1390 143 1298 41T1038 -61Q864 -61 756 29T647 258Q647 408 777 502T1087 596Q1170 596 1221 586V1020Q858 1020 651 1036L657 1231Q838 1202 1098 1202Q1145 1202 1221 1206V1585H1407V1219Q1519 1225 1733 1266V1067Q1601 1047 1407 1034V547Q1620 474 1835 344ZM1210 391Q1155 410 1090 410Q985 410 907 365T829 254Q829 193 889 158T1036 123Q1124 123 1163 183T1210 391ZM670 469Q570 224 512 -39H342Q227 240 227 651Q227 1065 340 1567L543 1511Q412 1134 412 649Q412 463 430 322H434Q476 453 510 528L670 469Z" />
+ <glyph unicode="べ" horiz-adv-x="2048" d="M1827 1374L1686 1315Q1648 1485 1587 1589L1737 1651Q1793 1539 1827 1374ZM1599 1292L1458 1233Q1421 1403 1360 1507L1509 1569Q1566 1457 1599 1292ZM1862 287L1737 135Q1461 365 1249 593T834 1118Q820 1139 811 1139Q802 1139 722 1055Q457 776 317 666L176 823Q501 1061 745 1356H901Q1117 1028 1331 788T1862 287Z" />
+ <glyph unicode="ま" horiz-adv-x="2048" d="M1827 254L1702 80Q1364 327 1126 383Q1126 197 1023 74T731 -49Q560 -49 446 47T332 276Q332 426 467 520T805 614Q881 614 938 606V811Q612 811 295 831V1016Q601 995 938 995V1194Q563 1194 258 1163V1348Q563 1378 938 1378V1632H1118V1378Q1484 1378 1767 1348V1163Q1492 1194 1118 1194V995Q1438 995 1739 1016V831Q1440 811 1118 811V584Q1478 499 1827 254ZM936 422Q864 426 817 426Q693 426 613 387T532 276Q532 220 587 182T727 143Q834 143 885 197T936 422Z" />
+ <glyph unicode="ら" horiz-adv-x="2048" d="M1499 1319L1403 1153Q1198 1309 815 1425L913 1597Q1266 1469 1499 1319ZM551 778Q821 891 1092 891Q1341 891 1507 772T1673 446Q1673 234 1516 100T1104 -35Q843 -35 463 55L479 274Q764 187 880 167T1083 147Q1489 147 1489 455Q1489 574 1373 641T1083 709Q799 709 446 520L295 643Q464 1074 616 1327L793 1237Q688 1107 551 778Z" />
+ <glyph unicode="れ" horiz-adv-x="2048" d="M1866 172Q1735 84 1614 84Q1495 84 1430 162T1364 377Q1364 463 1406 666Q1450 874 1450 965Q1450 1034 1419 1073T1333 1112Q1152 1112 805 745V-59H625V543Q517 420 369 190L215 307Q359 533 625 834V958H276V1143H625V1585H805V1145Q834 1138 852 1125T870 1100Q870 1083 850 1040L854 1036Q970 1148 1103 1222T1331 1296Q1460 1296 1545 1202T1630 963Q1630 867 1583 661Q1540 474 1540 395Q1540 270 1612 270Q1686 270 1866 385V172Z" />
+ <glyph unicode="を" horiz-adv-x="2048" d="M1747 -25Q1475 -49 1245 -49Q880 -49 748 36T616 285Q616 422 743 556T1104 803Q1072 913 918 913Q854 913 785 891T674 834Q508 600 397 481L236 610Q309 668 369 736T477 873T572 1026L666 1194Q643 1192 584 1192Q493 1192 328 1200V1399Q473 1380 614 1380Q668 1380 760 1384Q820 1494 858 1649L1053 1593Q998 1451 971 1397Q1296 1411 1579 1462L1591 1272Q1328 1240 881 1210Q831 1102 795 1047Q906 1075 971 1075Q1087 1075 1176 1018T1286 885Q1377 928 1671 1044L1745 856Q1466 753 1305 686V309H1112V596Q973 532 887 446T801 274Q801 203 881 172T1184 141Q1409 141 1729 184L1747 -25Z" />
+ <glyph unicode="ん" horiz-adv-x="2048" d="M1855 369Q1657 125 1543 55T1319 -16Q1199 -16 1126 71T1053 295Q1053 402 1090 557Q1112 649 1112 692Q1112 784 1024 784Q954 784 851 730T667 586T503 328L352 25L184 102L946 1593L1118 1509L788 889L793 885Q899 969 1028 969Q1149 969 1226 895T1303 705Q1303 630 1273 490Q1245 355 1245 285Q1245 234 1269 203T1335 172Q1483 172 1702 502L1855 369Z" />
+ <glyph unicode="ガ" horiz-adv-x="2048" d="M1819 1425L1677 1366Q1640 1536 1579 1640L1729 1702Q1785 1590 1819 1425ZM1757 1245L1751 852Q1748 653 1731 487T1671 187T1577 0T1464 -68T1319 -84Q1262 -84 1133 -82L1081 117Q1257 102 1356 102Q1458 102 1517 323T1577 862L1575 1067H1067Q1006 626 822 355T311 -84L180 70Q522 246 675 462T883 1061H213V1245H897V1626H1081V1245H1757ZM1591 1343L1450 1284Q1412 1454 1352 1559L1501 1620Q1558 1508 1591 1343Z" />
+ <glyph unicode="ス" horiz-adv-x="2048" d="M1950 45L1790 -72Q1494 332 1098 575Q777 173 311 -106L168 41Q555 244 849 572T1309 1313H283V1489L1483 1491L1538 1434Q1426 1041 1206 723Q1633 451 1950 45Z" />
+ <glyph unicode="ラ" horiz-adv-x="2048" d="M1679 1348H332V1532H1679V1348ZM1788 967Q1788 930 1698 779T1525 526T1344 334T1130 161T883 11T604 -117L492 59Q1293 324 1579 954H213V1139H1788V967Z" />
+ <glyph unicode="体" horiz-adv-x="2048" d="M711 1636Q698 1506 628 1313L557 1126V-123H399V848Q335 762 213 631L76 723Q417 1033 575 1702L711 1636ZM1978 371L1862 250Q1683 383 1564 557T1339 1135H1335V412H1667V262H1335V-131H1180V262H856V412H1180V1055Q1063 570 666 250L553 365Q754 544 851 703T1024 1151H639V1300H1180V1698H1335V1300H1894V1151H1489Q1566 839 1669 683T1978 371Z" />
+ <glyph unicode="下" horiz-adv-x="2048" d="M1876 1425H1024V-121H862V1425H172V1581H1876V1425ZM1729 547L1614 426Q1438 667 1083 864L1178 969Q1480 846 1729 547Z" />
+ <glyph unicode="不" horiz-adv-x="2048" d="M1888 1419H1227Q1184 1347 1096 1221V-133H928V1022Q730 756 248 489L145 623Q458 774 655 952T1030 1419H176V1575H1888V1419ZM1901 588L1776 481Q1478 843 1151 985L1260 1094Q1590 945 1901 588Z" />
+ <glyph unicode="伤" horiz-adv-x="2048" d="M664 1640Q641 1521 618 1419T564 1223L500 1034V-135H344V758L342 762Q302 660 164 528L61 639Q270 849 385 1157T526 1686L664 1640ZM1882 1257H987Q852 877 643 694L532 805Q853 1091 920 1679L1057 1634Q1050 1529 1018 1407H1882V1257ZM1835 977Q1773 107 1713 -2T1537 -112Q1467 -112 1303 -88L1260 68L1501 31Q1534 26 1560 43T1618 308T1673 836H1313Q1266 189 877 -133L760 -16Q1125 226 1161 836H913V977H1176L1178 1208L1329 1176L1323 977H1835Z"/>
+ <glyph unicode="傷" horiz-adv-x="2048" d="M1835 1419H942Q917 1366 907 1350H1716V827H840V1255H836Q803 1200 659 1051L541 1157Q835 1427 887 1718L1032 1659Q1026 1612 995 1569H1835V1419ZM1563 1223H1001V1151H1561L1563 1223ZM1563 1030H1001V954H1561L1563 1030ZM688 1622Q656 1510 579 1335L502 1163V-137H346V922H342Q279 818 197 741L63 834Q409 1198 532 1706L688 1622ZM1952 598H1145Q1128 570 1075 514H1862Q1848 327 1809 177T1743 -16T1663 -84T1559 -102L1370 -78L1319 70Q1173 -48 997 -133L885 -27Q1292 164 1405 373H1262Q1092 151 723 10L594 121Q881 214 1059 373H905Q737 269 631 242L516 360Q847 463 961 598H623V748H1952V598ZM1694 373H1567Q1497 222 1327 76Q1504 35 1563 35Q1606 35 1643 146T1694 373Z" />
+ <glyph unicode="吞" horiz-adv-x="2048" d="M1964 539L1839 406Q1594 550 1532 608V-137H1370V-4H717V-147H555V594Q464 520 233 387L109 516Q518 724 715 1012H207V1161H803Q851 1248 893 1434H360V1583H1718V1434H1053Q1027 1294 979 1161H1878V1012H1364Q1423 905 1601 758T1964 539ZM1454 666Q1291 811 1171 1012H907Q788 808 631 666H1454ZM1370 145V516H717V145H1370Z" />
+ <glyph unicode="我" horiz-adv-x="2048" d="M1911 301Q1877 -113 1739 -113Q1654 -113 1544 -8T1341 254Q1184 123 944 -4L807 111Q1108 255 1270 408Q1195 617 1155 922H760V627L1077 707V549L760 465V41Q760 -39 707 -81T531 -121T356 -121L299 39L551 33Q598 33 598 86V420L240 324L125 473Q364 519 598 580V922H178V1077H598V1372Q456 1326 262 1317L166 1470Q574 1467 967 1696L1069 1579Q839 1443 760 1411V1077H1141Q1127 1285 1127 1521Q1127 1608 1128 1704H1286Q1286 1323 1305 1077H1849V922H1319Q1341 730 1401 530Q1539 684 1630 866L1769 807Q1644 563 1462 375Q1478 334 1563 209T1681 83Q1725 83 1751 362L1911 301ZM1821 1272L1690 1159Q1597 1375 1337 1499L1468 1618Q1724 1472 1821 1272Z" />
+ <glyph unicode="玻" horiz-adv-x="2048" d="M1985 2L1882 -131Q1569 -32 1393 160Q1272 51 958 -129L848 12Q1127 128 1286 281Q1128 501 1079 768H1020V918H1264V1276H985V639Q985 236 795 -16L713 -125L571 -31Q681 84 745 210T820 455T832 856L829 1425H1264V1700H1419V1425H1898Q1839 1139 1800 1006L1645 1030Q1692 1195 1702 1276H1419V918H1757Q1729 528 1501 272Q1661 104 1985 2ZM1581 768H1223Q1271 579 1401 397Q1547 589 1581 768ZM791 383L213 209L131 346L412 424V891H221V1040H412V1395H166V1544H780V1395H567V1040H752V891H567V471L791 532V383Z" />
+ <glyph unicode="璃" horiz-adv-x="2048" d="M1931 1389H729V1538H1217V1706H1382V1538H1931V1389ZM721 305L160 166L80 315L356 375V866H164V1016H356V1421H150V1571H696V1421H512V1016H680V866H512V412L721 467V305ZM1604 1010L1493 913Q1431 994 1335 1059Q1252 993 1063 911L977 1036Q1160 1101 1202 1139Q1092 1187 981 1217L1094 1323Q1220 1286 1319 1235Q1393 1299 1440 1378L1563 1290Q1507 1219 1444 1159Q1520 1111 1604 1010ZM1833 37Q1833 -40 1788 -84T1667 -129H1513L1466 27Q1554 18 1616 18Q1653 18 1665 27T1677 72V481H1303Q1260 346 1212 262Q1419 279 1430 281Q1415 317 1337 395L1470 438Q1591 302 1647 117L1509 59L1479 156L1010 98L938 244L1053 254L1147 481H907V-141H752V631H1184Q1195 661 1206 748H803V1321H958V897H1616V1305H1772V748H1358Q1348 685 1335 631H1833V37Z" />
+ <glyph unicode="私" horiz-adv-x="2048" d="M1057 983H719V823L772 866Q919 763 1055 549L924 455Q845 611 719 711V-139H557V643Q419 407 197 207L82 322Q394 578 549 983H156V1133H561V1425Q337 1389 195 1382L137 1536Q637 1561 940 1706L1022 1571Q851 1486 719 1450V1133H1057V983ZM1964 4Q1883 -28 1802 -68Q1749 124 1747 125L899 51L842 221L995 233Q1234 839 1391 1667L1559 1608Q1404 860 1163 238L1692 274Q1567 524 1477 633L1618 692Q1834 456 1964 4Z" />
+ <glyph unicode="而" horiz-adv-x="2048" d="M1890 1423H1124Q1097 1222 1051 1120H1753V63Q1736 -23 1685 -64T1407 -94L1356 57L1493 55Q1597 52 1597 111V971H1321V61H1165V971H911V57H750V971H485V-139H324V1120H872Q934 1231 958 1423H182V1573H1890V1423Z" />
+ <glyph unicode="能" horiz-adv-x="2048" d="M1094 1118L961 1034L899 1149L170 1110L129 1268L270 1272Q421 1490 526 1729L682 1661Q549 1402 451 1272L813 1286Q755 1374 686 1440L823 1516Q999 1352 1094 1118ZM1913 1176Q1864 809 1694 809H1319Q1216 820 1177 871T1137 963V1671H1292V1343Q1599 1430 1778 1571L1872 1454Q1670 1283 1292 1190V1016Q1301 958 1397 958H1667Q1738 958 1763 1233L1913 1176ZM979 80Q979 9 946 -33T865 -88T631 -98L573 59Q687 47 735 47Q823 47 823 102V295H395V-113H240V989H979V80ZM823 717V840H395V717H823ZM823 444V567H395V444H823ZM1964 256Q1926 43 1866 -23T1718 -90H1333Q1235 -90 1190 -30T1145 84V739H1300V455Q1584 520 1794 676L1901 561Q1654 372 1300 301V111Q1300 59 1370 59H1702Q1750 59 1774 116T1812 330L1964 256Z" />
+ <glyph unicode="身" horiz-adv-x="2048" d="M1892 985Q1710 739 1526 567V47Q1526 -28 1470 -77T1341 -127H1106L1049 51L1309 41Q1364 50 1364 102V432Q1034 169 266 -63L152 72Q913 280 1274 543L344 426L254 584L510 610V1530L874 1534Q944 1601 1016 1747L1159 1671Q1091 1564 1063 1536H1526V778Q1750 1065 1767 1090L1892 985ZM1364 1253V1386H666V1253H1364ZM1364 961V1104H666V961H1364ZM1364 690V811H666V623L1364 690Z" />
+ <glyph unicode="食" horiz-adv-x="2048" d="M1960 1079L1851 938Q1688 1002 1556 1075V416H1100Q1223 296 1333 242Q1469 307 1550 397L1673 291Q1570 202 1466 162Q1658 65 1944 10L1829 -127Q1175 44 911 416H643V57L1075 106V-41L362 -137L299 27L489 43V1079Q361 1011 190 946L88 1090Q380 1182 630 1358T981 1735L1124 1673L1106 1634Q1367 1295 1960 1079ZM1534 1087Q1210 1268 1018 1501Q811 1255 502 1087H946V1274H1102V1087H1534ZM1399 825L1401 938H643V825H1399ZM1401 565V676H643V565H1401Z" />
+
+ <!-- Upper latin -->
+ <glyph unicode="C" horiz-adv-x="1479" d="M1399 465Q1335 218 1176 97T793 -25Q433 -25 269 200T104 743Q104 1094 297 1292T795 1491Q1009 1491 1161 1382T1374 1063L1184 1018Q1136 1171 1038 1248T793 1325Q553 1325 429 1168T305 745Q305 439 435 290T776 141Q948 141 1055 234T1206 514L1399 465Z" />
+ <glyph unicode="J" horiz-adv-x="1024" d="M860 469Q860 200 752 88T449 -25Q252 -25 154 85T55 418L229 442Q231 296 286 223T449 150Q548 150 596 197T655 305T666 459V1466H860V469Z" />
+ <glyph unicode="T" horiz-adv-x="1251" d="M1206 1292H721V0H526V1292H45V1466H1206V1292Z" />
+
+ <!-- Lower latin -->
+ <glyph unicode="a" horiz-adv-x="1139" d="M1057 0H868Q842 50 831 131Q650 -25 440 -25Q272 -25 175 59T78 281Q78 413 171 498T496 612L664 637Q758 652 819 674Q819 755 814 788T785 858T706 916T561 938Q445 938 378 895T285 735L109 758Q138 921 258 1003T588 1085Q779 1085 868 1029T978 892T999 686V444Q999 223 1007 148T1057 0ZM819 467V532Q678 485 474 458T270 285Q270 212 325 165T483 117Q616 117 717 196T819 467Z" />
+ <glyph unicode="e" horiz-adv-x="1139" d="M1059 485H264Q275 309 364 216T588 123Q691 123 761 177T868 342L1053 319Q1008 153 888 64T588 -25Q349 -25 215 121T80 522Q80 773 210 929T578 1085Q694 1085 801 1034T984 861T1059 485ZM874 633Q863 795 774 866T578 938Q451 938 369 853T274 633H874Z" />
+ <glyph unicode="h" horiz-adv-x="1139" d="M1004 0H823V670Q823 800 767 865T600 930Q490 930 404 854T317 580V0H137V1466H317V940Q445 1085 637 1085Q740 1085 834 1043T966 914T1004 672V0Z" />
+ <glyph unicode="i" horiz-adv-x="455" d="M317 0H137V1061H317V0ZM317 1262H137V1466H317V1262Z" />
+ <glyph unicode="n" horiz-adv-x="1139" d="M1004 0H823V645Q823 808 765 869T602 930Q522 930 451 891T349 781T319 580V0H139V1061H301V911H305Q362 998 445 1041T639 1085Q723 1085 805 1055T933 965T992 837T1004 653V0Z" />
+ <glyph unicode="p" horiz-adv-x="1139" d="M307 924Q408 1085 610 1085Q819 1085 940 934T1061 539Q1061 280 927 128T598 -25Q427 -25 324 111H319V-408H139V1061H303V924H307ZM586 123Q712 123 794 227T877 539Q877 734 798 839T594 944Q466 944 384 827T301 524Q301 327 380 225T586 123Z" />
+ <glyph unicode="s" horiz-adv-x="1024" d="M729 764Q717 851 659 894T496 938Q393 938 330 903T266 801Q266 738 316 711T516 645Q684 602 767 569T897 477T944 311Q944 169 828 72T518 -25Q316 -25 203 60T63 317L242 344Q256 233 324 178T516 123Q634 123 697 172T760 293Q760 341 731 370T659 413T463 465Q237 519 165 596T92 780Q92 913 198 999T483 1085Q673 1085 778 1011T905 788L729 764Z" />
+ <glyph unicode="t" horiz-adv-x="569" d="M551 2Q471 -14 416 -14Q298 -14 244 27T178 133T166 311V922H35V1061H166V1325L346 1434V1061H526V922H346V301Q346 221 362 188T446 154Q485 154 526 162L551 2Z" />
+ <glyph unicode="x" horiz-adv-x="1024" d="M1010 0H788L512 420L233 0H14L403 553L45 1061H268Q486 732 506 694L766 1061H981L614 563L1010 0Z" />
+</font>
+</defs>
+</svg>
diff --git a/LayoutTests/svg/W3C-SVG-1.1/text-align-08-b.svg-disabled b/LayoutTests/svg/W3C-SVG-1.1/text-align-08-b.svg
similarity index 100%
rename from LayoutTests/svg/W3C-SVG-1.1/text-align-08-b.svg-disabled
rename to LayoutTests/svg/W3C-SVG-1.1/text-align-08-b.svg
diff --git a/LayoutTests/svg/W3C-SVG-1.1/text-fonts-03-t.svg-disabled b/LayoutTests/svg/W3C-SVG-1.1/text-fonts-03-t.svg
similarity index 100%
rename from LayoutTests/svg/W3C-SVG-1.1/text-fonts-03-t.svg-disabled
rename to LayoutTests/svg/W3C-SVG-1.1/text-fonts-03-t.svg
diff --git a/LayoutTests/svg/W3C-SVG-1.1/text-intro-01-t.svg-disabled b/LayoutTests/svg/W3C-SVG-1.1/text-intro-01-t.svg
similarity index 86%
rename from LayoutTests/svg/W3C-SVG-1.1/text-intro-01-t.svg-disabled
rename to LayoutTests/svg/W3C-SVG-1.1/text-intro-01-t.svg
index fadfdf5..03d58903 100644
--- a/LayoutTests/svg/W3C-SVG-1.1/text-intro-01-t.svg-disabled
+++ b/LayoutTests/svg/W3C-SVG-1.1/text-intro-01-t.svg
@@ -42,25 +42,27 @@
<!--======================================================================-->
<!--Content of Test Case follows... =====================-->
<!--======================================================================-->
+ <defs>
+ <!-- Important SVGExotic font instead of relying on MS Office Fonts to be present -->
+ <font-face font-family="SVGExotic">
+ <font-face-src>
+ <font-face-uri xlink:href="resources/SVGExotic.svg#exotic"/>
+ </font-face-src>
+ </font-face>
+ </defs>
<g id="test-body-content">
- <defs>
- <font id="Missy" horiz-adv-x="5">
- <font-face font-family="MissingInAction" font-weight="normal" font-style="normal" units-per-em="8" cap-height="8" x-height="4" ascent="8" descent="2" alphabetic="0" mathematical="4" ideographic="-2" hanging="8"/>
- <missing-glyph d="M1,3h2v2h-2z"/>
- </font>
- </defs>
<text font-family="Arial" font-size="40" fill="red" x="5" y="40">Test left-to-right text.</text>
- <g font-size="17" font-family="MissingInAction, 'LucidaSansUnicode','MS-Gothic'">
+ <g font-size="17" font-family="SVGExotic">
<text x="10" y="75">Polish: Mogę jeść szkło, i mi ...</text>
<text x="10" y="110">Russian: Я могу есть стекло, ...</text>
<text x="10" y="145" font-size="17">Greek: Μπορώ να φάω ...</text>
<text x="10" y="180">Hebrew: אני יכול לאכול זכוכית ... </text>
<text x="10" y="215">Yiddish: איך קען עסן גלאָז און ...</text>
</g>
- <g font-size="17" font-family="MissingInAction, SimHei,'LucidaSansUnicode', 'Arial Unicode MS'">
+ <g font-size="17" font-family="SVGExotic">
<text x="10" y="250">Chinese:我能吞下玻璃而不伤身体。</text>
</g>
- <g font-size="17" font-family="MissingInAction, 'MS-Gothic','LucidaSansUnicode', 'Arial Unicode MS'">
+ <g font-size="17" font-family="SVGExotic">
<text x="10" y="285" font-size="17">Japanese: 私はガラスを食べます。</text>
</g>
</g>
diff --git a/LayoutTests/svg/W3C-SVG-1.1/text-intro-02-b.svg-disabled b/LayoutTests/svg/W3C-SVG-1.1/text-intro-02-b.svg
similarity index 83%
rename from LayoutTests/svg/W3C-SVG-1.1/text-intro-02-b.svg-disabled
rename to LayoutTests/svg/W3C-SVG-1.1/text-intro-02-b.svg
index b7a4a7d..32a639d 100644
--- a/LayoutTests/svg/W3C-SVG-1.1/text-intro-02-b.svg-disabled
+++ b/LayoutTests/svg/W3C-SVG-1.1/text-intro-02-b.svg
@@ -74,17 +74,31 @@
<!--======================================================================-->
<!--Content of Test Case follows... =====================-->
<!--======================================================================-->
+ <defs>
+ <!-- Important SVGExotic font instead of relying on MS Office Fonts to be present -->
+ <font-face font-family="SVGExotic">
+ <font-face-src>
+ <font-face-uri xlink:href="resources/SVGExotic.svg#exotic"/>
+ </font-face-src>
+ </font-face>
+ </defs>
<g id="test-body-content">
<text font-family="Arial" font-size="17" fill="red" x="10" y="40">unicode-bidi="bidi-override" direction="ltr".</text>
- <g font-size="18" font-family="'Arial Unicode MS', 'LucidaSansUnicode','MS-Gothic'">
+ <g font-size="18" font-family="SVGExotic">
<text x="10" y="80" unicode-bidi="bidi-override" direction="ltr">Text "אני יכול לאכול זכוכית וזה לא מזיק לי" is in Hebrew</text>
</g>
+ <!-- NOTE: THIS SUBTEST IS BROKEN ON PURPOSE. SVG 1.1 2nd Edition changed the meaning of direction="rtl" and text-anchor properties.
+ text-anchor should be defined relative to writing direction, so with text-anchor="end" this test would work again.
+ Compare with LayoutTests/svg/W3C-SVG-1.1-SE/text-intro-02-b.svg, which contains this fix. -->
<text font-family="Arial" font-size="17" fill="red" x="10" y="140">unicode-bidi="bidi-override" direction="rtl".</text>
- <g font-size="18" font-family="'Arial Unicode MS', 'LucidaSansUnicode','MS-Gothic'">
+ <g font-size="18" font-family="SVGExotic">
<text x="10" y="180" unicode-bidi="bidi-override" direction="rtl">Text "אני יכול לאכול זכוכית וזה לא מזיק לי" is in Hebrew</text>
</g>
+ <!-- NOTE: THIS SUBTEST IS BROKEN ON PURPOSE. SVG 1.1 2nd Edition changed the meaning of direction="rtl" and text-anchor properties.
+ text-anchor should be defined relative to writing direction, so with text-anchor="end" this test would work again.
+ Compare with LayoutTests/svg/W3C-SVG-1.1-SE/text-intro-02-b.svg, which contains this fix. -->
<text font-family="Arial" font-size="17" fill="red" x="10" y="240">unicode-bidi="normal" direction="ltr".</text>
- <g font-size="18" font-family="'Arial Unicode MS', 'LucidaSansUnicode','MS-Gothic'">
+ <g font-size="18" font-family="SVGExotic">
<text x="10" y="280" unicode-bidi="normal" direction="rtl">Text "אני יכול לאכול זכוכית וזה לא מזיק לי" is in Hebrew</text>
</g>
</g>
diff --git a/LayoutTests/svg/W3C-SVG-1.1/text-intro-03-b.svg-disabled b/LayoutTests/svg/W3C-SVG-1.1/text-intro-03-b.svg
similarity index 92%
rename from LayoutTests/svg/W3C-SVG-1.1/text-intro-03-b.svg-disabled
rename to LayoutTests/svg/W3C-SVG-1.1/text-intro-03-b.svg
index 06db1d9..245de4e 100644
--- a/LayoutTests/svg/W3C-SVG-1.1/text-intro-03-b.svg-disabled
+++ b/LayoutTests/svg/W3C-SVG-1.1/text-intro-03-b.svg
@@ -59,8 +59,16 @@
<!--======================================================================-->
<!--Content of Test Case follows... =====================-->
<!--======================================================================-->
+ <defs>
+ <!-- Important SVGExotic font instead of relying on MS Office Fonts to be present -->
+ <font-face font-family="SVGExotic">
+ <font-face-src>
+ <font-face-uri xlink:href="resources/SVGExotic.svg#exoticVertical"/>
+ </font-face-src>
+ </font-face>
+ </defs>
<g id="test-body-content">
- <g font-size="14" font-family="'Arial Unicode MS', 'LucidaSansUnicode','MS-Gothic'" writing-mode="tb">
+ <g font-size="14" font-family="SVGExotic" writing-mode="tb">
<text x="70" y="10">Text "我能吞下玻璃而不伤身体。" in Chinese</text>
<text x="230" y="10" font-size="13">Japanese: 私はガラスを食べられます。それは私を傷つけません。</text>
<text x="370" y="13" glyph-orientation-vertical="0" font-size="10">Japanese: 私はガラスを食べられます。それは私を傷つけません。</text>
diff --git a/LayoutTests/svg/W3C-SVG-1.1/text-intro-04-t.svg-disabled b/LayoutTests/svg/W3C-SVG-1.1/text-intro-04-t.svg
similarity index 92%
rename from LayoutTests/svg/W3C-SVG-1.1/text-intro-04-t.svg-disabled
rename to LayoutTests/svg/W3C-SVG-1.1/text-intro-04-t.svg
index 453c2f0..85d5fc1 100644
--- a/LayoutTests/svg/W3C-SVG-1.1/text-intro-04-t.svg-disabled
+++ b/LayoutTests/svg/W3C-SVG-1.1/text-intro-04-t.svg
@@ -50,9 +50,17 @@
<!--======================================================================-->
<!--Content of Test Case follows... =====================-->
<!--======================================================================-->
+ <defs>
+ <!-- Important SVGExotic font instead of relying on MS Office Fonts to be present -->
+ <font-face font-family="SVGExotic">
+ <font-face-src>
+ <font-face-uri xlink:href="resources/SVGExotic.svg#exotic"/>
+ </font-face-src>
+ </font-face>
+ </defs>
<g id="test-body-content">
<text font-family="Arial" font-size="16" fill="red" x="10" y="20">Test horizontal text.</text>
- <g font-size="17" font-family="'Arial Unicode MS', 'LucidaSansUnicode','MS-Gothic'">
+ <g font-size="17" font-family="SVGExotic">
<text x="10" y="60">Polish: Mogę jeść szkło, i mi nie szkodzi.</text>
<text x="10" y="90">Russian: Я могу есть стекло, это мне не вредит.</text>
<text x="10" y="120" font-size="15">Greek: Μπορώ να φάω σπασμένα γυαλιά χωρίς να πάθω τίποτα.</text>
diff --git a/LayoutTests/svg/custom/glyph-transformation-with-hkern-expected.txt b/LayoutTests/svg/custom/glyph-transformation-with-hkern-expected.txt
index d7ac5c2..851b190 100644
--- a/LayoutTests/svg/custom/glyph-transformation-with-hkern-expected.txt
+++ b/LayoutTests/svg/custom/glyph-transformation-with-hkern-expected.txt
@@ -8,6 +8,6 @@
chunk 1 text run 1 at (30.00,30.00) startOffset 0 endOffset 1 width 25.27: "R"
chunk 1 text run 1 at (50.00,50.00) startOffset 0 endOffset 1 width 27.23: "O"
chunk 1 text run 1 at (70.00,70.00) startOffset 0 endOffset 1 width 21.39: "T"
- chunk 1 text run 1 at (90.00,90.00) startOffset 0 endOffset 1 width 23.34: "A"
+ chunk 1 text run 1 at (90.00,90.00) startOffset 0 endOffset 1 width 23.35: "A"
chunk 1 text run 1 at (110.00,110.00) startOffset 0 endOffset 1 width 21.39: "T"
- chunk 1 text run 1 at (130.00,130.00) startOffset 0 endOffset 1 width 23.34: "E"
+ chunk 1 text run 1 at (130.00,130.00) startOffset 0 endOffset 1 width 23.35: "E"
diff --git a/LayoutTests/svg/text/bidi-reorder-value-lists.svg b/LayoutTests/svg/text/bidi-reorder-value-lists.svg
new file mode 100644
index 0000000..7dfa78c
--- /dev/null
+++ b/LayoutTests/svg/text/bidi-reorder-value-lists.svg
@@ -0,0 +1,26 @@
+<svg width="400" height="400" xmlns="http://www.w3.org/2000/svg">
+ <g font-size="16" transform="scale(4,4)">
+ <!-- The order of all characters in both lines should be the same, the spacing is different due the absolute positioning in the second line -->
+ <text x="10 20 30 40 50" y="30">Test אבגדה</text>
+
+ <!--
+ Quoting SVG 1.1: Whenever the character data within a ‘tspan’ element is re-ordered, the corresponding
+ elements within the ‘x’, ‘y’, ‘dx’, ‘dy’ and ‘rotate’ are also re-ordered to maintain the correspondence.
+
+ The text is processed in logical order (as defined in the markup).
+ 10 = T | LTR -> char 0
+ 20 = e | LTR -> char 1
+ 30 = s | LTR -> char 2
+ 40 = t | LTR -> char 3
+ 50 = | LTR -> char 4
+ 88 = א | RTL -> char 9
+ 79 = ב | RTL -> char 8
+ 72 = ג | RTL -> char 7
+ 64 = ד | RTL -> char 6
+ 55 = ה | RTL -> char 5
+ It's rendered according to the BiDi algorithm as: Test הדגבא
+ The Hebrew string is reordered, and the x/y/dx/dy/rotate lists as well to maintain correspondence.
+ -->
+ <text x="10 20 30 40 50 88 79 72 64 55" y="60">Test אבגדה</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/text/bidi-text-anchor-direction.svg b/LayoutTests/svg/text/bidi-text-anchor-direction.svg
new file mode 100644
index 0000000..19c4df4
--- /dev/null
+++ b/LayoutTests/svg/text/bidi-text-anchor-direction.svg
@@ -0,0 +1,13 @@
+<svg version="1.1" baseProfile="basic" id="svg-root"
+ width="100%" height="100%" viewBox="0 0 480 360"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <g font-size="10" font-family="'Arial Unicode MS', 'LucidaSansUnicode','MS-Gothic'">
+ <text x="240" y="50" unicode-bidi="bidi-override" direction="ltr" text-anchor="start">Text "אני יכול לאכול זכוכית וזה לא מזיק לי" is in Hebrew</text>
+ <text x="240" y="80" unicode-bidi="bidi-override" direction="ltr" text-anchor="middle">Text "אני יכול לאכול זכוכית וזה לא מזיק לי" is in Hebrew</text>
+ <text x="240" y="110" unicode-bidi="bidi-override" direction="ltr" text-anchor="end">Text "אני יכול לאכול זכוכית וזה לא מזיק לי" is in Hebrew</text>
+
+ <text x="240" y="150" unicode-bidi="bidi-override" direction="rtl" text-anchor="start">Text "אני יכול לאכול זכוכית וזה לא מזיק לי" is in Hebrew</text>
+ <text x="240" y="180" unicode-bidi="bidi-override" direction="rtl" text-anchor="middle">Text "אני יכול לאכול זכוכית וזה לא מזיק לי" is in Hebrew</text>
+ <text x="240" y="220" unicode-bidi="bidi-override" direction="rtl" text-anchor="end">Text "אני יכול לאכול זכוכית וזה לא מזיק לי" is in Hebrew</text>
+ </g>
+</svg>
diff --git a/LayoutTests/svg/text/bidi-text-query.svg b/LayoutTests/svg/text/bidi-text-query.svg
new file mode 100644
index 0000000..d6b320f
--- /dev/null
+++ b/LayoutTests/svg/text/bidi-text-query.svg
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg width="100%" height="100%" viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg">
+<g font-family="Arial" font-size="18">
+ <text x="10" y="50"><tspan direction="ltr" unicode-bidi="bidi-override">نشاط التدويل، W3C</tspan></text>
+ <text x="10" y="80"><tspan direction="ltr" unicode-bidi="normal">نشاط التدويل، W3C</tspan></text>
+ <g id="container"/>
+
+ <script type="text/javascript">
+ function highlightText(text, start, length, color) {
+ var startExtent = text.getExtentOfChar(start);
+ var endExtent = text.getExtentOfChar(start + length);
+
+ // Highlight rect that we've selected using the extent information
+ var rectElement = document.createElementNS("http://www.w3.org/2000/svg", "svg:rect");
+ rectElement.setAttribute("x", startExtent.x);
+ rectElement.setAttribute("y", endExtent.y);
+ rectElement.setAttribute("width", endExtent.x + endExtent.width - startExtent.x);
+ rectElement.setAttribute("height", endExtent.height);
+ rectElement.setAttribute("fill-opacity", "0.4");
+ rectElement.setAttribute("fill", color);
+ document.getElementById("container").appendChild(rectElement);
+ }
+
+ // Highlight arabic text by an half-opaque rect rectangle and latin text by a green one.
+ var text1 = document.getElementsByTagName("text")[0];
+ highlightText(text1, 0, text1.getNumberOfChars() - 5, "red");
+ highlightText(text1, text1.getNumberOfChars() - 3, 2, "green");
+
+ var text2 = document.getElementsByTagName("text")[1];
+ highlightText(text2, 0, text2.getNumberOfChars() - 5, "red");
+ highlightText(text2, text2.getNumberOfChars() - 3, 2, "green");
+ </script>
+</g>
+</svg>
diff --git a/LayoutTests/svg/text/bidi-tspans.svg b/LayoutTests/svg/text/bidi-tspans.svg
new file mode 100644
index 0000000..6387bbe
--- /dev/null
+++ b/LayoutTests/svg/text/bidi-tspans.svg
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg">
+<g font-family="Arial" font-size="18">
+ <!-- Both lines should look identical -->
+ <text x="230" y="150" text-anchor="middle" direction="rtl">نشاط التدويل "dirRTL ubEmbed, اختبار"!</text>
+ <text x="230" y="180" text-anchor="middle" direction="rtl">نشاط التدويل "<tspan>dirRTL ubEmbed, اختبار</tspan>"!</text>
+</g>
+</svg>
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 7e7cf3f..ae57d18 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,174 @@
+2011-03-14 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ REGRESSION (r68976): Incorrect bidi rendering in SVG text
+ https://bugs.webkit.org/show_bug.cgi?id=53980
+
+ rework the test engine or SVG "text-intro" tests so we can turn them back on
+ https://bugs.webkit.org/show_bug.cgi?id=6524
+
+ svg/W3C-SVG-1.1/text-intro-0*.svg fail when MS Office fonts are present
+ https://bugs.webkit.org/show_bug.cgi?id=11662
+
+ svg/batik/text/textBiDi.svg failing
+ https://bugs.webkit.org/show_bug.cgi?id=17392
+
+ SVG bidi examples at w3C I18N WG tutorials are not rendered correctly.
+ https://bugs.webkit.org/show_bug.cgi?id=24374
+
+ Implement proper bidirectionality support for SVG text.
+
+ BiDi didn't work properly until now, because the x/y/dx/dy/rotate value lists are stored in logical order (aka. in
+ the order the characters appear in the markup), and when laying out bidi text, we associated the current character
+ in visual order with the current x/y/dx/dy/rotate value in logical order, messing up RTL text layout.
+ The BiDi algorithm itself, inherited by RenderBlockLineLayout, works just fine, the inline box tree is correct.
+
+ Long story:
+ Before the inline box tree is created, SVGTextLayoutAttributesBuilder builds a list of x/y/dx/dy/rotate/<text metrics>
+ for each RenderSVGInlineText* object, called SVGTextLayoutAttributes. This happens in logical order, as specified in
+ the markup. <text x="10 20" y="10">abcdef</text> creates a SVGTextLayoutAttributes object in the renderer associated with
+ "abcdef" that contains (10, 20) for x, (10) for y, the dx/dy/rotate lists are empty, and the SVGTextMetrics list holds 6
+ width/height values for each of the glyphs (and some other infromation, see SVGTextMetrics class).
+ The SVGTextLayoutAttributes object is _used by_ RenderBlockLineLayout when applying the BiDi algorithm as SVG demands
+ that BiDi reordering does not happen across text chunks (a text chunk is defined by an absolute position, eg. x="10").
+
+ To summarize: SVGTextLayoutAttributes are stored in all RenderSVGInlineText renderers, caching the metrics of all
+ characters, their position based on the DOM attributes x/y/dx/dy/rotate. Using that information it's possible to
+ determine whether a position starts a new text chunk, and that's used by RenderBlockLineLayout to create the
+ inline box tree, in _visual order_, as it will appear on screen.
+
+ After the inline box tree is created, the SVGRootInlineBox traverses its children in visual order and feeds the
+ found text boxes to SVGTextLayoutEngine, which lays out the text on a line or a path, according to SVG text layout
+ rules. For each character of the passed in InlineTextBox, it determines the x/y/dx/dy/rotate value, and the position
+ in the <text metrics> list of the renderer. The problem here is that the passed in text boxes are in visual order,
+ the x/y/.. lists are all in logical order.
+
+ Example: <text direction="rtl" unicde-bidi="bidi-override" x="10 20">abcdef</text>, reverse the text direction:
+ the visual order now is: "fedcba", where 'f' should be associated with x="10" and 'e' with x="20".
+
+ Fix that problem, by computing a list of text boxes in _logical_ order in advance and pass it to SVGTextLayoutEngine,
+ before it starts processing the boxes in visual order, fed by SVGRootInlineBox. When laying oout text, we can now
+ process text in visual order, but grab the x/y/.. coordinates from the renderer in logical order.
+
+ Some more work was needed to truly fix Arabic. The SVGTextLayoutAttributesBuilder measured all characters isolated,
+ which is not a problem with latin text, but results in wrong advances for Arabic text, as isolated forms, instead of
+ shaped forms are measured. This broke text-anchor support, text queries on Arabic text etc. Fixed now, covered by
+ dozens of new tests.
+
+ Tests: svg/W3C-I18N/g-dirLTR-ubNone.svg
+ svg/W3C-I18N/g-dirLTR-ubOverride.svg
+ svg/W3C-I18N/g-dirRTL-ubNone.svg
+ svg/W3C-I18N/g-dirRTL-ubOverride.svg
+ svg/W3C-I18N/text-anchor-dirLTR-anchorEnd.svg
+ svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle.svg
+ svg/W3C-I18N/text-anchor-dirLTR-anchorStart.svg
+ svg/W3C-I18N/text-anchor-dirNone-anchorEnd.svg
+ svg/W3C-I18N/text-anchor-dirNone-anchorMiddle.svg
+ svg/W3C-I18N/text-anchor-dirNone-anchorStart.svg
+ svg/W3C-I18N/text-anchor-dirRTL-anchorEnd.svg
+ svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle.svg
+ svg/W3C-I18N/text-anchor-dirRTL-anchorStart.svg
+ svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd.svg
+ svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle.svg
+ svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart.svg
+ svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd.svg
+ svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle.svg
+ svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart.svg
+ svg/W3C-I18N/text-anchor-no-markup.svg
+ svg/W3C-I18N/text-dirLTR-ubNone.svg
+ svg/W3C-I18N/text-dirLTR-ubOverride.svg
+ svg/W3C-I18N/text-dirRTL-ubNone.svg
+ svg/W3C-I18N/text-dirRTL-ubOverride.svg
+ svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context.svg
+ svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context.svg
+ svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context.svg
+ svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context.svg
+ svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context.svg
+ svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context.svg
+ svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context.svg
+ svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context.svg
+ svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context.svg
+ svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context.svg
+ svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context.svg
+ svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context.svg
+ svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context.svg
+ svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context.svg
+ svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context.svg
+ svg/W3C-I18N/tspan-direction-ltr.svg
+ svg/W3C-I18N/tspan-direction-rtl.svg
+ svg/W3C-SVG-1.1-SE/text-intro-02-b.svg
+ svg/W3C-SVG-1.1-SE/text-intro-05-t.svg
+ svg/W3C-SVG-1.1-SE/text-intro-09-b.svg
+ svg/W3C-SVG-1.1/text-align-08-b.svg
+ svg/W3C-SVG-1.1/text-fonts-03-t.svg
+ svg/W3C-SVG-1.1/text-intro-01-t.svg
+ svg/W3C-SVG-1.1/text-intro-02-b.svg
+ svg/W3C-SVG-1.1/text-intro-03-b.svg
+ svg/W3C-SVG-1.1/text-intro-04-t.svg
+ svg/text/bidi-reorder-value-lists.svg
+ svg/text/bidi-text-anchor-direction.svg
+ svg/text/bidi-text-query.svg
+ svg/text/bidi-tspans.svg
+
+ * rendering/RenderBlockLineLayout.cpp: Remove hack that forced LTR support when unicode-bidi="normal" and handling SVG text.
+ (WebCore::RenderBlock::determineStartPosition):
+ * rendering/svg/SVGInlineTextBox.cpp: s/fragment.positionListOffset/fragment.characterOffset/
+ (WebCore::SVGInlineTextBox::offsetForPositionInFragment):
+ (WebCore::SVGInlineTextBox::constructTextRun):
+ (WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
+ * rendering/svg/SVGRenderTreeAsText.cpp: Ditto.
+ (WebCore::writeSVGInlineTextBox):
+ * rendering/svg/SVGRootInlineBox.cpp: Add new buildTextBoxListInLogicalOrder(), collecting all text boxes recursively in logical order (aka. as specified in markup).
+ This is needed as we have to process x/y/dx/dy/rotate value lists of text/tspan/.. elements in logical order, not in visual
+ order as the characters are presented on screen.
+ (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
+ (WebCore::SVGRootInlineBox::buildTextBoxListInLogicalOrder):
+ (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
+ * rendering/svg/SVGRootInlineBox.h:
+ * rendering/svg/SVGTextChunk.cpp: Cleanup code, minimize SVGTextChunks memory consumption.
+ (WebCore::SVGTextChunk::SVGTextChunk): A text chunk now know whether its base progress direction is left-to-right or right-to-left.
+ (WebCore::SVGTextChunk::calculateLength):
+ (WebCore::SVGTextChunk::calculateTextAnchorShift): Make text-anchor direction aware. text-anchor="start/end" meaning depends on the context (ltr vs. rtl).
+ * rendering/svg/SVGTextChunk.h: Adapt code, merging three members into a bitfield.
+ (WebCore::SVGTextChunk::isVerticalText):
+ (WebCore::SVGTextChunk::hasDesiredTextLength):
+ (WebCore::SVGTextChunk::hasTextAnchor):
+ (WebCore::SVGTextChunk::hasLengthAdjustSpacing):
+ (WebCore::SVGTextChunk::hasLengthAdjustSpacingAndGlyphs):
+ * rendering/svg/SVGTextChunkBuilder.cpp: Adapt to SVGTextChunk code changes.
+ (WebCore::SVGTextChunkBuilder::addTextChunk):
+ (WebCore::SVGTextChunkBuilder::processTextChunk):
+ * rendering/svg/SVGTextFragment.h: Add metricsListOffset, needed only while laying out text.
+ (WebCore::SVGTextFragment::SVGTextFragment): Rename positionListOffset to characterOffset, as it describes an offset in the textRenderer->characters() array.
+ * rendering/svg/SVGTextLayoutAttributesBuilder.cpp
+ (WebCore::SVGTextLayoutAttributesBuilder::propagateLayoutAttributes): Fix measuring Arabic text in LTR/RTL modes. Assure that each SVGTextMetrics object
+ that we cache, refers to the _rendered_ character. For Arabic text that means, that we're
+ measuring the shaped width of the glyph, not the glyph in its isolated form. Without that
+ fix reordering boxes containing Arabic is wrong.
+ * rendering/svg/SVGTextLayoutEngine.cpp: SVGTextLayoutEngine is fed with text boxes to be laid out in _visual_ order, left-to-right, after the BiDi algorithm
+ has been applied by RenderBlockLineLayout to create the inline box tree. The coordinates lists x/y/dx/dy/rotate have
+ to be processed in _logical_ order. SVGRootInlineBox now passes a list of text boxes in logical order to SVGTextLayoutEngine,
+ to assure it grabs the coordinates from the correct InlineTextBox. See examples at the top of the ChangeLog.
+ (WebCore::SVGTextLayoutEngine::SVGTextLayoutEngine):
+ (WebCore::SVGTextLayoutEngine::recordTextFragment): No need to measure text here anymore, SVGTextLayoutAttributesBuilder now provides exact advances for each glyph.
+ The width of a SVGTextFragment is always equal to the sum of each glyph advance. (This was not the case for
+ Arabic until now.)
+ (WebCore::SVGTextLayoutEngine::finalizeTransformMatrices):
+ (WebCore::SVGTextLayoutEngine::nextLogicalBoxAndOffset): Computes the next logical box and the offset to the next coordinate value in its position list.
+ (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
+ * rendering/svg/SVGTextLayoutEngine.h: Add CharacterRange helper struct.
+ (WebCore::SVGTextLayoutEngine::CharacterRange::CharacterRange):
+ * rendering/svg/SVGTextMetrics.cpp: Remove unused measureAllCharactersIndividually() method.
+ (WebCore::constructTextRun): Pass direction and unicode-bidi="override" values to the TextRun, otherwhise LTR is always asumed.
+ * rendering/svg/SVGTextMetrics.h:
+ (WebCore::SVGTextMetrics::setWidth): Add private setter, only SVGTextLayoutAttributesBuilder is allowed to modify the metrics (to fix up glyph widths for Arabic).
+ * rendering/svg/SVGTextQuery.cpp: s/fragment.positionListOffset/fragment.characterOffset/
+ (WebCore::SVGTextQuery::subStringLengthCallback):
+ (WebCore::SVGTextQuery::startPositionOfCharacterCallback):
+ (WebCore::SVGTextQuery::endPositionOfCharacterCallback):
+ (WebCore::calculateGlyphBoundaries):
+
2011-03-15 Sergio Villar Senin <svillar@igalia.com>
Reviewed by Xan Lopez.
diff --git a/Source/WebCore/rendering/RenderBlockLineLayout.cpp b/Source/WebCore/rendering/RenderBlockLineLayout.cpp
index 3ed28d2..90e4ec6 100644
--- a/Source/WebCore/rendering/RenderBlockLineLayout.cpp
+++ b/Source/WebCore/rendering/RenderBlockLineLayout.cpp
@@ -1109,12 +1109,7 @@
pos = last->lineBreakPos();
resolver.setStatus(last->lineBreakBidiStatus());
} else {
- bool ltr = style()->isLeftToRightDirection()
- #if ENABLE(SVG)
- || (style()->unicodeBidi() == UBNormal && isSVGText())
- #endif
- ;
-
+ bool ltr = style()->isLeftToRightDirection();
Direction direction = ltr ? LeftToRight : RightToLeft;
resolver.setLastStrongDir(direction);
resolver.setLastDir(direction);
diff --git a/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp b/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp
index 05e1357..17bbfaa 100644
--- a/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp
+++ b/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp
@@ -73,7 +73,7 @@
if (!fragment.transform.isIdentity())
textRun.setHorizontalGlyphStretch(narrowPrecisionToFloat(fragment.transform.xScale()));
- return fragment.positionListOffset - start() + textRenderer->scaledFont().offsetForPosition(textRun, position * scalingFactor, includePartialGlyphs);
+ return fragment.characterOffset - start() + textRenderer->scaledFont().offsetForPosition(textRun, position * scalingFactor, includePartialGlyphs);
}
float SVGInlineTextBox::positionForOffset(int) const
@@ -402,7 +402,7 @@
RenderText* text = textRenderer();
ASSERT(text);
- TextRun run(text->characters() + fragment.positionListOffset
+ TextRun run(text->characters() + fragment.characterOffset
, fragment.length
, false /* allowTabs */
, 0 /* xPos, only relevant with allowTabs=true */
@@ -425,7 +425,7 @@
if (startPosition >= endPosition)
return false;
- int offset = static_cast<int>(fragment.positionListOffset) - start();
+ int offset = static_cast<int>(fragment.characterOffset) - start();
int length = static_cast<int>(fragment.length);
if (startPosition >= offset + length || endPosition <= offset)
diff --git a/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp b/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp
index 0f94fdd..a099f87 100644
--- a/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp
+++ b/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp
@@ -464,8 +464,8 @@
SVGTextFragment& fragment = fragments.at(i);
writeIndent(ts, indent + 1);
- unsigned startOffset = fragment.positionListOffset;
- unsigned endOffset = fragment.positionListOffset + fragment.length;
+ unsigned startOffset = fragment.characterOffset;
+ unsigned endOffset = fragment.characterOffset + fragment.length;
// FIXME: Remove this hack, once the new text layout engine is completly landed. We want to preserve the old layout test results for now.
ts << "chunk 1 ";
@@ -500,7 +500,7 @@
ts << " override";
}
- ts << ": " << quoteAndEscapeNonPrintables(text.substring(fragment.positionListOffset, fragment.length)) << "\n";
+ ts << ": " << quoteAndEscapeNonPrintables(text.substring(fragment.characterOffset, fragment.length)) << "\n";
}
}
diff --git a/Source/WebCore/rendering/svg/SVGRootInlineBox.cpp b/Source/WebCore/rendering/svg/SVGRootInlineBox.cpp
index c2289d6..6d6b9fe 100644
--- a/Source/WebCore/rendering/svg/SVGRootInlineBox.cpp
+++ b/Source/WebCore/rendering/svg/SVGRootInlineBox.cpp
@@ -73,8 +73,18 @@
void SVGRootInlineBox::computePerCharacterLayoutInformation()
{
+ RenderBlock* parentBlock = block();
+ ASSERT(parentBlock);
+
+ // Build list of all text boxes which belong to our root renderer, in logical order,
+ // aka. the order of the characters as they appear in the original document.
+ // This is needed to maintain correspondence between the x/y/dx/dy/rotate value
+ // lists and the potentially reordered characters in the inline box tree.
+ Vector<SVGInlineTextBox*> boxesInLogicalOrder;
+ buildTextBoxListInLogicalOrder(parentBlock, boxesInLogicalOrder);
+
// Perform SVG text layout phase two (see SVGTextLayoutEngine for details).
- SVGTextLayoutEngine characterLayout;
+ SVGTextLayoutEngine characterLayout(boxesInLogicalOrder);
layoutCharactersInTextBoxes(this, characterLayout);
// Perform SVG text layout phase three (see SVGTextChunkBuilder for details).
@@ -86,6 +96,27 @@
layoutRootBox();
}
+void SVGRootInlineBox::buildTextBoxListInLogicalOrder(RenderObject* start, Vector<SVGInlineTextBox*>& boxes)
+{
+ bool ltr = start->style()->isLeftToRightDirection();
+ for (RenderObject* child = start->firstChild(); child; child = child->nextSibling()) {
+ if (child->isSVGInline()) {
+ buildTextBoxListInLogicalOrder(child, boxes);
+ continue;
+ }
+
+ if (!child->isSVGInlineText())
+ continue;
+
+ RenderSVGInlineText* text = toRenderSVGInlineText(child);
+ for (InlineTextBox* textBox = ltr ? text->firstTextBox() : text->lastTextBox(); textBox; textBox = ltr ? textBox->nextTextBox() : textBox->prevTextBox()) {
+ if (!textBox->isSVGInlineTextBox())
+ continue;
+ boxes.append(static_cast<SVGInlineTextBox*>(textBox));
+ }
+ }
+}
+
void SVGRootInlineBox::layoutCharactersInTextBoxes(InlineFlowBox* start, SVGTextLayoutEngine& characterLayout)
{
for (InlineBox* child = start->firstChild(); child; child = child->nextOnLine()) {
@@ -108,8 +139,12 @@
if (isTextPath) {
// Build text chunks for all <textPath> children, using the line layout algorithm.
// This is needeed as text-anchor is just an additional startOffset for text paths.
- SVGTextLayoutEngine lineLayout;
+ Vector<SVGInlineTextBox*> boxesInLogicalOrder;
+ buildTextBoxListInLogicalOrder(flowBox->renderer(), boxesInLogicalOrder);
+
+ SVGTextLayoutEngine lineLayout(boxesInLogicalOrder);
layoutCharactersInTextBoxes(flowBox, lineLayout);
+
characterLayout.beginTextPathLayout(child->renderer(), lineLayout);
}
diff --git a/Source/WebCore/rendering/svg/SVGRootInlineBox.h b/Source/WebCore/rendering/svg/SVGRootInlineBox.h
index 2e073c9..4a29039 100644
--- a/Source/WebCore/rendering/svg/SVGRootInlineBox.h
+++ b/Source/WebCore/rendering/svg/SVGRootInlineBox.h
@@ -55,6 +55,7 @@
InlineBox* closestLeafChildForPosition(const IntPoint&);
private:
+ void buildTextBoxListInLogicalOrder(RenderObject*, Vector<SVGInlineTextBox*>&);
void layoutCharactersInTextBoxes(InlineFlowBox*, SVGTextLayoutEngine&);
void layoutChildBoxes(InlineFlowBox*);
void layoutRootBox();
diff --git a/Source/WebCore/rendering/svg/SVGTextChunk.cpp b/Source/WebCore/rendering/svg/SVGTextChunk.cpp
index 5dea6ad2..49407e5 100644
--- a/Source/WebCore/rendering/svg/SVGTextChunk.cpp
+++ b/Source/WebCore/rendering/svg/SVGTextChunk.cpp
@@ -27,10 +27,8 @@
namespace WebCore {
-SVGTextChunk::SVGTextChunk(bool isVerticalText, ETextAnchor textAnchor, SVGTextContentElement::SVGLengthAdjustType lengthAdjust, float desiredTextLength)
- : m_isVerticalText(isVerticalText)
- , m_textAnchor(textAnchor)
- , m_lengthAdjust(lengthAdjust)
+SVGTextChunk::SVGTextChunk(unsigned chunkStyle, float desiredTextLength)
+ : m_chunkStyle(chunkStyle)
, m_desiredTextLength(desiredTextLength)
{
}
@@ -52,7 +50,7 @@
SVGTextFragment& fragment = fragments.at(i);
characters += fragment.length;
- if (m_isVerticalText)
+ if (m_chunkStyle & VerticalText)
length += fragment.height;
else
length += fragment.width;
@@ -63,7 +61,7 @@
}
// Resepect gap between chunks.
- if (m_isVerticalText)
+ if (m_chunkStyle & VerticalText)
length += fragment.y - (lastFragment->y + lastFragment->height);
else
length += fragment.x - (lastFragment->x + lastFragment->width);
@@ -75,17 +73,11 @@
float SVGTextChunk::calculateTextAnchorShift(float length) const
{
- switch (m_textAnchor) {
- case TA_START:
- return 0;
- case TA_MIDDLE:
+ if (m_chunkStyle & MiddleAnchor)
return -length / 2;
- case TA_END:
- return -length;
- };
-
- ASSERT_NOT_REACHED();
- return 0;
+ if (m_chunkStyle & EndAnchor)
+ return m_chunkStyle & RightToLeftText ? 0 : -length;
+ return m_chunkStyle & RightToLeftText ? -length : 0;
}
} // namespace WebCore
diff --git a/Source/WebCore/rendering/svg/SVGTextChunk.h b/Source/WebCore/rendering/svg/SVGTextChunk.h
index ebe6d81..9618d9f 100644
--- a/Source/WebCore/rendering/svg/SVGTextChunk.h
+++ b/Source/WebCore/rendering/svg/SVGTextChunk.h
@@ -31,34 +31,37 @@
// A SVGTextChunk describes a range of SVGTextFragments, see the SVG spec definition of a "text chunk".
class SVGTextChunk {
public:
- SVGTextChunk(bool isVerticalText, ETextAnchor, SVGTextContentElement::SVGLengthAdjustType, float desiredTextLength);
+ enum ChunkStyle {
+ DefaultStyle = 1 << 0,
+ MiddleAnchor = 1 << 1,
+ EndAnchor = 1 << 2,
+ RightToLeftText = 1 << 3,
+ VerticalText = 1 << 4,
+ LengthAdjustSpacing = 1 << 5,
+ LengthAdjustSpacingAndGlyphs = 1 << 6
+ };
+
+ SVGTextChunk(unsigned chunkStyle, float desiredTextLength);
void calculateLength(float& length, unsigned& characters) const;
float calculateTextAnchorShift(float length) const;
- bool isVerticalText() const { return m_isVerticalText; }
- ETextAnchor textAnchor() const { return m_textAnchor; }
- SVGTextContentElement::SVGLengthAdjustType lengthAdjust() const { return m_lengthAdjust; }
+ bool isVerticalText() const { return m_chunkStyle & VerticalText; }
float desiredTextLength() const { return m_desiredTextLength; }
Vector<SVGInlineTextBox*>& boxes() { return m_boxes; }
const Vector<SVGInlineTextBox*>& boxes() const { return m_boxes; }
- bool hasDesiredTextLength() const { return m_lengthAdjust != SVGTextContentElement::LENGTHADJUST_UNKNOWN && m_desiredTextLength > 0; }
- bool hasTextAnchor() const { return m_textAnchor != TA_START; }
+ bool hasDesiredTextLength() const { return m_desiredTextLength > 0 && ((m_chunkStyle & LengthAdjustSpacing) || (m_chunkStyle & LengthAdjustSpacingAndGlyphs)); }
+ bool hasTextAnchor() const { return m_chunkStyle & RightToLeftText ? !(m_chunkStyle & EndAnchor) : (m_chunkStyle & MiddleAnchor) || (m_chunkStyle & EndAnchor); }
+ bool hasLengthAdjustSpacing() const { return m_chunkStyle & LengthAdjustSpacing; }
+ bool hasLengthAdjustSpacingAndGlyphs() const { return m_chunkStyle & LengthAdjustSpacingAndGlyphs; }
private:
// Contains all SVGInlineTextBoxes this chunk spans.
Vector<SVGInlineTextBox*> m_boxes;
- // writing-mode specific property.
- bool m_isVerticalText;
-
- // text-anchor specific properties.
- ETextAnchor m_textAnchor;
-
- // textLength/lengthAdjust specific properties.
- SVGTextContentElement::SVGLengthAdjustType m_lengthAdjust;
+ unsigned m_chunkStyle;
float m_desiredTextLength;
};
diff --git a/Source/WebCore/rendering/svg/SVGTextChunkBuilder.cpp b/Source/WebCore/rendering/svg/SVGTextChunkBuilder.cpp
index bbbae6c..47311bd 100644
--- a/Source/WebCore/rendering/svg/SVGTextChunkBuilder.cpp
+++ b/Source/WebCore/rendering/svg/SVGTextChunkBuilder.cpp
@@ -101,15 +101,47 @@
const SVGRenderStyle* svgStyle = style->svgStyle();
ASSERT(svgStyle);
- SVGTextContentElement::SVGLengthAdjustType lengthAdjust = SVGTextContentElement::LENGTHADJUST_UNKNOWN;
- float desiredTextLength = 0;
+ // Build chunk style flags.
+ unsigned chunkStyle = SVGTextChunk::DefaultStyle;
+ // Handle 'direction' property.
+ if (!style->isLeftToRightDirection())
+ chunkStyle |= SVGTextChunk::RightToLeftText;
+
+ // Handle 'writing-mode' property.
+ if (svgStyle->isVerticalWritingMode())
+ chunkStyle |= SVGTextChunk::VerticalText;
+
+ // Handle 'text-anchor' property.
+ switch (svgStyle->textAnchor()) {
+ case TA_START:
+ break;
+ case TA_MIDDLE:
+ chunkStyle |= SVGTextChunk::MiddleAnchor;
+ break;
+ case TA_END:
+ chunkStyle |= SVGTextChunk::EndAnchor;
+ break;
+ };
+
+ // Handle 'lengthAdjust' property.
+ float desiredTextLength = 0;
if (SVGTextContentElement* textContentElement = SVGTextContentElement::elementFromRenderer(textRenderer->parent())) {
- lengthAdjust = static_cast<SVGTextContentElement::SVGLengthAdjustType>(textContentElement->lengthAdjust());
desiredTextLength = textContentElement->textLength().value(textContentElement);
+
+ switch (static_cast<SVGTextContentElement::SVGLengthAdjustType>(textContentElement->lengthAdjust())) {
+ case SVGTextContentElement::LENGTHADJUST_UNKNOWN:
+ break;
+ case SVGTextContentElement::LENGTHADJUST_SPACING:
+ chunkStyle |= SVGTextChunk::LengthAdjustSpacing;
+ break;
+ case SVGTextContentElement::LENGTHADJUST_SPACINGANDGLYPHS:
+ chunkStyle |= SVGTextChunk::LengthAdjustSpacingAndGlyphs;
+ break;
+ };
}
- SVGTextChunk chunk(svgStyle->isVerticalWritingMode(), svgStyle->textAnchor(), lengthAdjust, desiredTextLength);
+ SVGTextChunk chunk(chunkStyle, desiredTextLength);
Vector<SVGInlineTextBox*>& boxes = chunk.boxes();
for (unsigned i = boxStart; i < boxStart + boxCount; ++i)
@@ -137,7 +169,7 @@
bool isVerticalText = chunk.isVerticalText();
if (processTextLength) {
- if (chunk.lengthAdjust() == SVGTextContentElement::LENGTHADJUST_SPACING) {
+ if (chunk.hasLengthAdjustSpacing()) {
float textLengthShift = (chunk.desiredTextLength() - chunkLength) / chunkCharacters;
unsigned atCharacter = 0;
for (unsigned boxPosition = 0; boxPosition < boxCount; ++boxPosition) {
@@ -147,7 +179,7 @@
processTextLengthSpacingCorrection(isVerticalText, textLengthShift, fragments, atCharacter);
}
} else {
- ASSERT(chunk.lengthAdjust() == SVGTextContentElement::LENGTHADJUST_SPACINGANDGLYPHS);
+ ASSERT(chunk.hasLengthAdjustSpacingAndGlyphs());
float scale = chunk.desiredTextLength() / chunkLength;
AffineTransform spacingAndGlyphsTransform;
@@ -172,7 +204,7 @@
return;
// If we previously applied a lengthAdjust="spacing" correction, we have to recalculate the chunk length, to be able to apply the text-anchor shift.
- if (processTextLength && chunk.lengthAdjust() == SVGTextContentElement::LENGTHADJUST_SPACING) {
+ if (processTextLength && chunk.hasLengthAdjustSpacing()) {
chunkLength = 0;
chunkCharacters = 0;
chunk.calculateLength(chunkLength, chunkCharacters);
diff --git a/Source/WebCore/rendering/svg/SVGTextFragment.h b/Source/WebCore/rendering/svg/SVGTextFragment.h
index 2e520da..b5b3c57 100644
--- a/Source/WebCore/rendering/svg/SVGTextFragment.h
+++ b/Source/WebCore/rendering/svg/SVGTextFragment.h
@@ -28,7 +28,8 @@
// A SVGTextFragment describes a text fragment of a RenderSVGInlineText which can be rendered at once.
struct SVGTextFragment {
SVGTextFragment()
- : positionListOffset(0)
+ : characterOffset(0)
+ , metricsListOffset(0)
, length(0)
, x(0)
, y(0)
@@ -37,8 +38,9 @@
{
}
- // The first rendered character starts at RenderSVGInlineText::characters() + positionListOffset.
- unsigned positionListOffset;
+ // The first rendered character starts at RenderSVGInlineText::characters() + characterOffset.
+ unsigned characterOffset;
+ unsigned metricsListOffset;
unsigned length;
float x;
diff --git a/Source/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp b/Source/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp
index 3122912..fdd91f1 100644
--- a/Source/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp
+++ b/Source/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp
@@ -200,11 +200,24 @@
unsigned valueListPosition = atCharacter;
unsigned metricsLength = 1;
+ SVGTextMetrics lastMetrics = SVGTextMetrics::emptyMetrics();
+
for (unsigned textPosition = 0; textPosition < textLength; textPosition += metricsLength) {
const UChar& currentCharacter = characters[textPosition];
- SVGTextMetrics metrics = SVGTextMetrics::measureCharacterRange(text, textPosition, 1);
- metricsLength = metrics.length();
+ SVGTextMetrics startToCurrentMetrics = SVGTextMetrics::measureCharacterRange(text, 0, textPosition + 1);
+ SVGTextMetrics currentMetrics = SVGTextMetrics::measureCharacterRange(text, textPosition, 1);
+
+ // Frequent case for Arabic text: when measuring a single character the arabic isolated form is taken
+ // when rendering the glyph "in context" (with it's surrounding characters) it changes due to shaping.
+ // So whenever runWidthAdvance != currentMetrics.width(), we are processing a text run whose length is
+ // not equal to the sum of the individual lengths of the glyphs, when measuring them isolated.
+ float runWidthAdvance = startToCurrentMetrics.width() - lastMetrics.width();
+ if (runWidthAdvance != currentMetrics.width())
+ currentMetrics.setWidth(runWidthAdvance);
+
+ lastMetrics = startToCurrentMetrics;
+ metricsLength = currentMetrics.length();
if (!preserveWhiteSpace && characterIsSpace(currentCharacter) && characterIsSpaceOrNull(lastCharacter)) {
assignEmptyLayoutAttributesForCharacter(attributes);
@@ -212,7 +225,7 @@
continue;
}
- assignLayoutAttributesForCharacter(attributes, metrics, valueListPosition);
+ assignLayoutAttributesForCharacter(attributes, currentMetrics, valueListPosition);
if (metricsLength > 1) {
for (unsigned i = 0; i < metricsLength - 1; ++i)
@@ -225,6 +238,7 @@
#if DUMP_TEXT_LAYOUT_ATTRIBUTES > 0
fprintf(stderr, "\nDumping layout attributes for RenderSVGInlineText, renderer=%p, node=%p (atCharacter: %i)\n", text, text->node(), atCharacter);
+ fprintf(stderr, "BiDi properties: unicode-bidi=%i, block direction=%i\n", text->style()->unicodeBidi(), text->style()->direction());
attributes.dump();
#endif
diff --git a/Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp b/Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp
index c25ed79..d0e8f5e 100644
--- a/Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp
+++ b/Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp
@@ -34,7 +34,7 @@
namespace WebCore {
-SVGTextLayoutEngine::SVGTextLayoutEngine()
+SVGTextLayoutEngine::SVGTextLayoutEngine(Vector<SVGInlineTextBox*>& boxesInLogicalOrder)
: m_x(0)
, m_y(0)
, m_dx(0)
@@ -46,6 +46,13 @@
, m_textPathSpacing(0)
, m_textPathScaling(1)
{
+ unsigned size = boxesInLogicalOrder.size();
+ for (unsigned i = 0; i < size; ++i) {
+ SVGInlineTextBox* textBox = boxesInLogicalOrder.at(i);
+ m_ranges.append(CharacterRange(textBox->start(), textBox->end(), textBox));
+ }
+
+ ASSERT(!m_ranges.isEmpty());
}
void SVGTextLayoutEngine::updateCharacerPositionIfNeeded(float& x, float& y)
@@ -113,23 +120,31 @@
m_dy = dy;
}
-void SVGTextLayoutEngine::recordTextFragment(SVGInlineTextBox* textBox, RenderSVGInlineText* text, unsigned positionListOffset, const SVGTextMetrics& lastCharacterMetrics)
+void SVGTextLayoutEngine::recordTextFragment(SVGInlineTextBox* textBox, Vector<SVGTextMetrics>& textMetricsValues, unsigned characterOffset, unsigned metricsListOffset)
{
ASSERT(!m_currentTextFragment.length);
+ ASSERT(metricsListOffset > 0);
// Figure out length of fragment.
- m_currentTextFragment.length = positionListOffset - m_currentTextFragment.positionListOffset;
+ m_currentTextFragment.length = characterOffset - m_currentTextFragment.characterOffset;
// Figure out fragment metrics.
- if (m_currentTextFragment.length == 1) {
- // Fast path, can rely on already computed per-character metrics.
- m_currentTextFragment.width = lastCharacterMetrics.width();
- m_currentTextFragment.height = lastCharacterMetrics.height();
- } else {
- // Need to measure the whole range (range metrics != sum of character metrics)
- SVGTextMetrics metrics = SVGTextMetrics::measureCharacterRange(text, m_currentTextFragment.positionListOffset, m_currentTextFragment.length);
- m_currentTextFragment.width = metrics.width();
- m_currentTextFragment.height = metrics.height();
+ SVGTextMetrics& lastCharacterMetrics = textMetricsValues.at(metricsListOffset - 1);
+ m_currentTextFragment.width = lastCharacterMetrics.width();
+ m_currentTextFragment.height = lastCharacterMetrics.height();
+
+ if (m_currentTextFragment.length > 1) {
+ // SVGTextLayoutAttributesBuilder assures that the length of the range is equal to the sum of the individual lengths of the glyphs.
+ float length = 0;
+ if (m_isVerticalText) {
+ for (unsigned i = m_currentTextFragment.metricsListOffset; i < metricsListOffset; ++i)
+ length += textMetricsValues.at(i).height();
+ m_currentTextFragment.height = length;
+ } else {
+ for (unsigned i = m_currentTextFragment.metricsListOffset; i < metricsListOffset; ++i)
+ length += textMetricsValues.at(i).width();
+ m_currentTextFragment.width = length;
+ }
}
textBox->textFragments().append(m_currentTextFragment);
@@ -281,7 +296,7 @@
SVGInlineTextBox* textBox = boxes.at(boxPosition);
Vector<SVGTextFragment>& fragments = textBox->textFragments();
fprintf(stderr, "-> Box %i: Dumping text fragments for SVGInlineTextBox, textBox=%p, textRenderer=%p\n", boxPosition, textBox, textBox->textRenderer());
- fprintf(stderr, " textBox properties, start=%i, len=%i\n", textBox->start(), textBox->len());
+ fprintf(stderr, " textBox properties, start=%i, len=%i, box direction=%i\n", textBox->start(), textBox->len(), textBox->direction());
fprintf(stderr, " textRenderer properties, textLength=%i\n", textBox->textRenderer()->textLength());
const UChar* characters = textBox->textRenderer()->characters();
@@ -289,9 +304,9 @@
unsigned fragmentCount = fragments.size();
for (unsigned i = 0; i < fragmentCount; ++i) {
SVGTextFragment& fragment = fragments.at(i);
- String fragmentString(characters + fragment.positionListOffset, fragment.length);
- fprintf(stderr, " -> Fragment %i, x=%lf, y=%lf, width=%lf, height=%lf, positionListOffset=%i, length=%i, characters='%s'\n"
- , i, fragment.x, fragment.y, fragment.width, fragment.height, fragment.positionListOffset, fragment.length, fragmentString.utf8().data());
+ String fragmentString(characters + fragment.characterOffset, fragment.length);
+ fprintf(stderr, " -> Fragment %i, x=%lf, y=%lf, width=%lf, height=%lf, characterOffset=%i, length=%i, characters='%s'\n"
+ , i, fragment.x, fragment.y, fragment.width, fragment.height, fragment.characterOffset, fragment.length, fragmentString.utf8().data());
}
}
#endif
@@ -328,6 +343,29 @@
boxes.clear();
}
+void SVGTextLayoutEngine::nextLogicalBoxAndOffset(unsigned consumeCharacters, unsigned& positionListOffset, SVGInlineTextBox*& box)
+{
+ ASSERT(!m_ranges.isEmpty());
+
+ unsigned consumed = 0;
+ do {
+ CharacterRange& firstRange = m_ranges.first();
+ if (!consumed) {
+ positionListOffset = firstRange.start;
+ box = firstRange.box;
+ } else
+ ASSERT(firstRange.box == box);
+
+ ++consumed;
+ if (firstRange.start == firstRange.end) {
+ m_ranges.remove(0);
+ continue;
+ }
+
+ ++firstRange.start;
+ } while (consumed < consumeCharacters);
+}
+
void SVGTextLayoutEngine::layoutTextOnLineOrPath(SVGInlineTextBox* textBox, RenderSVGInlineText* text, const RenderStyle* style)
{
SVGElement* lengthContext = static_cast<SVGElement*>(text->parent()->node());
@@ -339,25 +377,15 @@
ASSERT(svgStyle);
SVGTextLayoutAttributes& attributes = text->layoutAttributes();
- Vector<float>& xValues = attributes.xValues();
- Vector<float>& yValues = attributes.yValues();
- Vector<float>& dxValues = attributes.dxValues();
- Vector<float>& dyValues = attributes.dyValues();
- Vector<float>& rotateValues = attributes.rotateValues();
Vector<SVGTextMetrics>& textMetricsValues = attributes.textMetricsValues();
unsigned boxStart = textBox->start();
unsigned boxLength = textBox->len();
unsigned textMetricsSize = textMetricsValues.size();
- ASSERT(textMetricsSize <= xValues.size());
- ASSERT(textMetricsSize <= yValues.size());
- ASSERT(xValues.size() == yValues.size());
-
- if (boxLength > textMetricsSize)
- textMetricsSize = boxLength;
unsigned positionListOffset = 0;
unsigned metricsListOffset = 0;
+ unsigned characterOffset = 0;
const UChar* characters = text->characters();
const Font& font = style->font();
@@ -372,34 +400,43 @@
baselineShift -= baselineLayout.calculateAlignmentBaselineShift(m_isVerticalText, text);
// Main layout algorithm.
- unsigned positionListSize = xValues.size();
- for (; metricsListOffset < textMetricsSize && positionListOffset < positionListSize; ++metricsListOffset) {
+ // Find the start of the current text box in this list, respecting ligatures.
+ for (; metricsListOffset < textMetricsSize; ++metricsListOffset) {
SVGTextMetrics& metrics = textMetricsValues.at(metricsListOffset);
+
// Advance to text box start location.
- if (positionListOffset < boxStart) {
- positionListOffset += metrics.length();
+ if (characterOffset < boxStart) {
+ characterOffset += metrics.length();
continue;
}
-
+
// Stop if we've finished processing this text box.
- if (positionListOffset >= boxStart + boxLength)
+ if (characterOffset >= boxStart + boxLength)
break;
+ SVGInlineTextBox* ownerBox = 0;
+ nextLogicalBoxAndOffset(metrics.length(), positionListOffset, ownerBox);
+
+ SVGTextLayoutAttributes& currentBoxAttributes = toRenderSVGInlineText(ownerBox->textRenderer())->layoutAttributes();
+ Vector<float>& xValues = currentBoxAttributes.xValues();
+ Vector<float>& yValues = currentBoxAttributes.yValues();
+
float x = xValues.at(positionListOffset);
float y = yValues.at(positionListOffset);
// When we've advanced to the box start offset, determine using the original x/y values,
- // wheter this character starts a new text chunk, before doing any further processing.
- if (positionListOffset == boxStart)
- textBox->setStartsNewTextChunk(text->characterStartsNewTextChunk(boxStart));
+ // whether this character starts a new text chunk, before doing any further processing.
+ if (characterOffset == boxStart)
+ textBox->setStartsNewTextChunk(toRenderSVGInlineText(ownerBox->textRenderer())->characterStartsNewTextChunk(positionListOffset));
if (metrics == SVGTextMetrics::emptyMetrics()) {
- positionListOffset += metrics.length();
+ characterOffset += metrics.length();
continue;
}
- const UChar* currentCharacter = characters + positionListOffset;
+ const UChar* currentCharacter = characters + characterOffset;
float angle = 0;
+ Vector<float>& rotateValues = currentBoxAttributes.rotateValues();
if (!rotateValues.isEmpty()) {
float newAngle = rotateValues.at(positionListOffset);
if (newAngle != SVGTextLayoutAttributes::emptyValue())
@@ -418,7 +455,7 @@
updateCharacerPositionIfNeeded(x, y);
// Apply dx/dy value adjustments to current text position, if needed.
- updateRelativePositionAdjustmentsIfNeeded(dxValues, dyValues, positionListOffset);
+ updateRelativePositionAdjustmentsIfNeeded(currentBoxAttributes.dxValues(), currentBoxAttributes.dyValues(), positionListOffset);
// Calculate SVG Fonts kerning, if needed.
float kerning = spacingLayout.calculateSVGKerning(m_isVerticalText, metrics.glyph());
@@ -461,7 +498,7 @@
// Skip character, if we're before the path.
if (textPathOffset < 0) {
- positionListOffset += metrics.length();
+ characterOffset += metrics.length();
continue;
}
@@ -513,16 +550,17 @@
// If we already started a fragment, close it now.
if (didStartTextFragment && shouldStartNewFragment) {
applySpacingToNextCharacter = false;
- recordTextFragment(textBox, text, positionListOffset, textMetricsValues.at(metricsListOffset - 1));
+ recordTextFragment(textBox, textMetricsValues, characterOffset, metricsListOffset);
}
// Eventually start a new fragment, if not yet done.
if (!didStartTextFragment || shouldStartNewFragment) {
- ASSERT(!m_currentTextFragment.positionListOffset);
+ ASSERT(!m_currentTextFragment.characterOffset);
ASSERT(!m_currentTextFragment.length);
didStartTextFragment = true;
- m_currentTextFragment.positionListOffset = positionListOffset;
+ m_currentTextFragment.characterOffset = characterOffset;
+ m_currentTextFragment.metricsListOffset = metricsListOffset;
m_currentTextFragment.x = x;
m_currentTextFragment.y = y;
@@ -563,7 +601,7 @@
updateCurrentTextPosition(xNew, yNew, glyphAdvance + spacing);
}
- positionListOffset += metrics.length();
+ characterOffset += metrics.length();
lastAngle = angle;
}
@@ -571,7 +609,7 @@
return;
// Close last open fragment, if needed.
- recordTextFragment(textBox, text, positionListOffset, textMetricsValues.at(metricsListOffset - 1));
+ recordTextFragment(textBox, textMetricsValues, characterOffset, metricsListOffset);
}
}
diff --git a/Source/WebCore/rendering/svg/SVGTextLayoutEngine.h b/Source/WebCore/rendering/svg/SVGTextLayoutEngine.h
index 631e4cd..6341c75 100644
--- a/Source/WebCore/rendering/svg/SVGTextLayoutEngine.h
+++ b/Source/WebCore/rendering/svg/SVGTextLayoutEngine.h
@@ -47,7 +47,7 @@
class SVGTextLayoutEngine {
WTF_MAKE_NONCOPYABLE(SVGTextLayoutEngine);
public:
- SVGTextLayoutEngine();
+ SVGTextLayoutEngine(Vector<SVGInlineTextBox*>& boxesInLogicalOrder);
SVGTextChunkBuilder& chunkLayoutBuilder() { return m_chunkLayoutBuilder; }
void beginTextPathLayout(RenderObject*, SVGTextLayoutEngine& lineLayout);
@@ -57,17 +57,35 @@
void finishLayout();
private:
+ struct CharacterRange {
+ CharacterRange(unsigned newStart = 0, unsigned newEnd = 0, SVGInlineTextBox* newBox = 0)
+ : start(newStart)
+ , end(newEnd)
+ , box(newBox)
+ {
+ }
+
+ unsigned start;
+ unsigned end;
+ SVGInlineTextBox* box;
+ };
+
+ typedef Vector<CharacterRange> CharacterRanges;
+
void updateCharacerPositionIfNeeded(float& x, float& y);
void updateCurrentTextPosition(float x, float y, float glyphAdvance);
void updateRelativePositionAdjustmentsIfNeeded(Vector<float>& dxValues, Vector<float>& dyValues, unsigned valueListPosition);
- void recordTextFragment(SVGInlineTextBox*, RenderSVGInlineText*, unsigned positionListOffset, const SVGTextMetrics& lastCharacterMetrics);
+ void recordTextFragment(SVGInlineTextBox*, Vector<SVGTextMetrics>& textMetricValues, unsigned characterOffset, unsigned metricsListOffset);
bool parentDefinesTextLength(RenderObject*) const;
void layoutTextOnLineOrPath(SVGInlineTextBox*, RenderSVGInlineText*, const RenderStyle*);
void finalizeTransformMatrices(Vector<SVGInlineTextBox*>&);
+ void nextLogicalBoxAndOffset(unsigned consumeCharacters, unsigned& positionListOffset, SVGInlineTextBox*&);
+
private:
+ CharacterRanges m_ranges;
Vector<SVGInlineTextBox*> m_lineLayoutBoxes;
Vector<SVGInlineTextBox*> m_pathLayoutBoxes;
SVGTextChunkBuilder m_chunkLayoutBuilder;
diff --git a/Source/WebCore/rendering/svg/SVGTextMetrics.cpp b/Source/WebCore/rendering/svg/SVGTextMetrics.cpp
index d75bdb3..042bc22 100644
--- a/Source/WebCore/rendering/svg/SVGTextMetrics.cpp
+++ b/Source/WebCore/rendering/svg/SVGTextMetrics.cpp
@@ -74,7 +74,17 @@
static TextRun constructTextRun(RenderSVGInlineText* text, const UChar* characters, unsigned position, unsigned length)
{
- TextRun run(characters + position, length);
+ RenderStyle* style = text->style();
+ ASSERT(style);
+
+ TextRun run(characters + position
+ , length
+ , false /* allowTabs */
+ , 0 /* xPos, only relevant with allowTabs=true */
+ , 0 /* padding, only relevant for justified text, not relevant for SVG */
+ , TextRun::AllowTrailingExpansion
+ , !style->isLeftToRightDirection()
+ , style->unicodeBidi() == Override /* directionalOverride */);
#if ENABLE(SVG_FONTS)
run.setReferencingRenderObject(text);
@@ -92,22 +102,6 @@
return SVGTextMetrics(text, run, position, text->textLength());
}
-void SVGTextMetrics::measureAllCharactersIndividually(RenderSVGInlineText* text, Vector<SVGTextMetrics>& allMetrics)
-{
- ASSERT(text);
- const UChar* characters = text->characters();
- unsigned length = text->textLength();
-
- TextRun run(constructTextRun(text, 0, 0, 0));
- for (unsigned position = 0; position < length; ) {
- run.setText(characters + position, 1);
-
- SVGTextMetrics metrics(text, run, position, text->textLength());
- allMetrics.append(metrics);
- position += metrics.length();
- }
-}
-
}
#endif // ENABLE(SVG)
diff --git a/Source/WebCore/rendering/svg/SVGTextMetrics.h b/Source/WebCore/rendering/svg/SVGTextMetrics.h
index 7ef0f7d..cb016b6 100644
--- a/Source/WebCore/rendering/svg/SVGTextMetrics.h
+++ b/Source/WebCore/rendering/svg/SVGTextMetrics.h
@@ -32,7 +32,6 @@
public:
static SVGTextMetrics emptyMetrics();
static SVGTextMetrics measureCharacterRange(RenderSVGInlineText*, unsigned position, unsigned length);
- static void measureAllCharactersIndividually(RenderSVGInlineText*, Vector<SVGTextMetrics>&);
bool operator==(const SVGTextMetrics&);
@@ -62,6 +61,10 @@
const Glyph& glyph() const { return m_glyph; }
private:
+ friend class SVGTextLayoutAttributesBuilder;
+ void setWidth(float width) { m_width = width; }
+
+private:
SVGTextMetrics();
SVGTextMetrics(RenderSVGInlineText*, const TextRun&, unsigned position, unsigned textLength);
diff --git a/Source/WebCore/rendering/svg/SVGTextQuery.cpp b/Source/WebCore/rendering/svg/SVGTextQuery.cpp
index 1a4cdab..5f3523e 100644
--- a/Source/WebCore/rendering/svg/SVGTextQuery.cpp
+++ b/Source/WebCore/rendering/svg/SVGTextQuery.cpp
@@ -313,7 +313,7 @@
if (!mapStartEndPositionsIntoFragmentCoordinates(queryData, fragment, startPosition, endPosition))
return false;
- SVGTextMetrics metrics = SVGTextMetrics::measureCharacterRange(queryData->textRenderer, fragment.positionListOffset + startPosition, endPosition - startPosition);
+ SVGTextMetrics metrics = SVGTextMetrics::measureCharacterRange(queryData->textRenderer, fragment.characterOffset + startPosition, endPosition - startPosition);
float fragmentLength = queryData->isVerticalText ? metrics.height() : metrics.width();
data->subStringLength += mapLengthThroughFragmentTransformation(fragment, queryData->isVerticalText, fragmentLength);
@@ -353,7 +353,7 @@
data->startPosition = FloatPoint(fragment.x, fragment.y);
if (startPosition) {
- SVGTextMetrics metrics = SVGTextMetrics::measureCharacterRange(queryData->textRenderer, fragment.positionListOffset, startPosition);
+ SVGTextMetrics metrics = SVGTextMetrics::measureCharacterRange(queryData->textRenderer, fragment.characterOffset, startPosition);
if (queryData->isVerticalText)
data->startPosition.move(0, metrics.height());
else
@@ -399,7 +399,7 @@
data->endPosition = FloatPoint(fragment.x, fragment.y);
- SVGTextMetrics metrics = SVGTextMetrics::measureCharacterRange(queryData->textRenderer, fragment.positionListOffset, startPosition + 1);
+ SVGTextMetrics metrics = SVGTextMetrics::measureCharacterRange(queryData->textRenderer, fragment.characterOffset, startPosition + 1);
if (queryData->isVerticalText)
data->endPosition.move(0, metrics.height());
else
@@ -478,14 +478,14 @@
extent.setLocation(FloatPoint(fragment.x, fragment.y - queryData->textRenderer->scaledFont().fontMetrics().floatAscent() / scalingFactor));
if (startPosition) {
- SVGTextMetrics metrics = SVGTextMetrics::measureCharacterRange(queryData->textRenderer, fragment.positionListOffset, startPosition);
+ SVGTextMetrics metrics = SVGTextMetrics::measureCharacterRange(queryData->textRenderer, fragment.characterOffset, startPosition);
if (queryData->isVerticalText)
extent.move(0, metrics.height());
else
extent.move(metrics.width(), 0);
}
- SVGTextMetrics metrics = SVGTextMetrics::measureCharacterRange(queryData->textRenderer, fragment.positionListOffset + startPosition, 1);
+ SVGTextMetrics metrics = SVGTextMetrics::measureCharacterRange(queryData->textRenderer, fragment.characterOffset + startPosition, 1);
extent.setSize(FloatSize(metrics.width(), metrics.height()));
if (fragment.transform.isIdentity())