WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-15799-20120524141505.patch (text/plain), 57.56 KB, created by
Rob Buis
on 2012-05-24 11:15:07 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Rob Buis
Created:
2012-05-24 11:15:07 PDT
Size:
57.56 KB
patch
obsolete
>Subversion Revision: 118174 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 5af2b8da9a4f21583482920127aa31f5a3b05123..441fa13fa662f70675ecd7662f2527fc0bf0eeb5 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,78 @@ >+2012-05-24 Rob Buis <rwlbuis@webkit.org> >+ >+ Bug 15799: textPath element does not re-render when referenced path changes >+ https://bugs.webkit.org/show_bug.cgi?id=15799 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Support textPath updating to changes on the referenced path. To make this possible >+ refactor the event listener logic from SVGTRefElement into SubtreeModificationEventListener. >+ >+ Tests: svg/custom/textPath-change-id-expected.svg >+ svg/custom/textPath-change-id-pattern-expected.svg >+ svg/custom/textPath-change-id-pattern.svg >+ svg/custom/textPath-change-id.svg >+ svg/custom/textPath-change-id2-expected.svg >+ svg/custom/textPath-change-id2-pattern-expected.svg >+ svg/custom/textPath-change-id2-pattern.svg >+ svg/custom/textPath-change-id2.svg >+ svg/custom/textPath-change-reference-expected.svg >+ svg/custom/textPath-change-reference-pattern-expected.svg >+ svg/custom/textPath-change-reference-pattern.svg >+ svg/custom/textPath-change-reference-using-baseval-expected.svg >+ svg/custom/textPath-change-reference-using-baseval-pattern-expected.svg >+ svg/custom/textPath-change-reference-using-baseval-pattern.svg >+ svg/custom/textPath-change-reference-using-baseval.svg >+ svg/custom/textPath-change-reference.svg >+ svg/custom/textPath-change-reference2-expected.svg >+ svg/custom/textPath-change-reference2-pattern-expected.svg >+ svg/custom/textPath-change-reference2-pattern.svg >+ svg/custom/textPath-change-reference2-using-baseval-expected.svg >+ svg/custom/textPath-change-reference2-using-baseval-pattern-expected.svg >+ svg/custom/textPath-change-reference2-using-baseval-pattern.svg >+ svg/custom/textPath-change-reference2-using-baseval.svg >+ svg/custom/textPath-change-reference2.svg >+ svg/custom/textPath-insert-path-expected.svg >+ svg/custom/textPath-insert-path-pattern-expected.svg >+ svg/custom/textPath-insert-path-pattern.svg >+ svg/custom/textPath-insert-path.svg >+ svg/custom/textPath-modify-child-expected.svg >+ svg/custom/textPath-modify-child-pattern-expected.svg >+ svg/custom/textPath-modify-child-pattern.svg >+ svg/custom/textPath-modify-child.svg >+ svg/custom/textPath-path-change-expected.svg >+ svg/custom/textPath-path-change-pattern-expected.svg >+ svg/custom/textPath-path-change-pattern.svg >+ svg/custom/textPath-path-change-using-svg-dom-expected.svg >+ svg/custom/textPath-path-change-using-svg-dom-pattern-expected.svg >+ svg/custom/textPath-path-change-using-svg-dom-pattern.svg >+ svg/custom/textPath-path-change-using-svg-dom.svg >+ svg/custom/textPath-path-change.svg >+ svg/custom/textPath-path-change2-expected.svg >+ svg/custom/textPath-path-change2-pattern-expected.svg >+ svg/custom/textPath-path-change2-pattern.svg >+ svg/custom/textPath-path-change2.svg >+ svg/custom/textPath-remove-path-expected.svg >+ svg/custom/textPath-remove-path-pattern-expected.svg >+ svg/custom/textPath-remove-path-pattern.svg >+ svg/custom/textPath-remove-path.svg >+ svg/custom/textPath-set-id-expected.svg >+ svg/custom/textPath-set-id.svg >+ svg/custom/textPath-startoffset-expected.svg >+ svg/custom/textPath-startoffset-pattern-expected.svg >+ svg/custom/textPath-startoffset-pattern.svg >+ svg/custom/textPath-startoffset.svg >+ >+ * svg/SVGTextPathElement.cpp: >+ (WebCore::SVGTextPathElement::~SVGTextPathElement): >+ (WebCore): >+ (WebCore::SVGTextPathElement::clearResourceReferences): >+ (WebCore::SVGTextPathElement::svgAttributeChanged): >+ (WebCore::SVGTextPathElement::buildPendingResource): >+ (WebCore::SVGTextPathElement::insertedInto): >+ (WebCore::SVGTextPathElement::removedFrom): >+ * svg/SVGTextPathElement.h: >+ > 2012-05-23 Andreas Kling <kling@webkit.org> > > Let Element::detachAttribute() handle removal of the attribute. >diff --git a/Source/WebCore/svg/SVGTextPathElement.cpp b/Source/WebCore/svg/SVGTextPathElement.cpp >index 8b59f4e887eabcd3a58496b3b37e765f255bc9f7..064bd6d2b482f30a896a4c64c1d0ec33856aba70 100644 >--- a/Source/WebCore/svg/SVGTextPathElement.cpp >+++ b/Source/WebCore/svg/SVGTextPathElement.cpp >@@ -61,6 +61,18 @@ PassRefPtr<SVGTextPathElement> SVGTextPathElement::create(const QualifiedName& t > return adoptRef(new SVGTextPathElement(tagName, document)); > } > >+SVGTextPathElement::~SVGTextPathElement() >+ >+{ >+ clearResourceReferences(); >+} >+ >+void SVGTextPathElement::clearResourceReferences() >+{ >+ ASSERT(document()); >+ document()->accessSVGExtensions()->removeAllTargetReferencesForElement(this); >+} >+ > bool SVGTextPathElement::isSupportedAttribute(const QualifiedName& attrName) > { > DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); >@@ -106,6 +118,11 @@ void SVGTextPathElement::svgAttributeChanged(const QualifiedName& attrName) > > SVGElementInstance::InvalidationGuard invalidationGuard(this); > >+ if (SVGURIReference::isKnownAttribute(attrName)) { >+ buildPendingResource(); >+ return; >+ } >+ > if (attrName == SVGNames::startOffsetAttr) > updateRelativeLengthsInformation(); > >@@ -139,26 +156,41 @@ bool SVGTextPathElement::rendererIsNeeded(const NodeRenderingContext& context) > return false; > } > >-Node::InsertionNotificationRequest SVGTextPathElement::insertedInto(Node* rootParent) >+void SVGTextPathElement::buildPendingResource() > { >- SVGStyledElement::insertedInto(rootParent); >- if (!rootParent->inDocument()) >- return InsertionDone; >+ clearResourceReferences(); >+ if (!inDocument()) >+ return; > > String id; >- Element* targetElement = SVGURIReference::targetElementFromIRIString(href(), document(), &id); >- if (!targetElement) { >+ Element* target = SVGURIReference::targetElementFromIRIString(href(), document(), &id); >+ if (!target) { > if (hasPendingResources() || id.isEmpty()) >- return InsertionDone; >+ return; > >- ASSERT(!hasPendingResources()); > document()->accessSVGExtensions()->addPendingResource(id, this); > ASSERT(hasPendingResources()); >+ } else if (target->isSVGElement()) { >+ // Register us with the target in the dependencies map. Any change of hrefElement >+ // that leads to relayout/repainting now informs us, so we can react to it. >+ document()->accessSVGExtensions()->addElementReferencingTarget(this, static_cast<SVGElement*>(target)); > } >+} > >+Node::InsertionNotificationRequest SVGTextPathElement::insertedInto(Node* rootParent) >+{ >+ SVGTextContentElement::insertedInto(rootParent); >+ buildPendingResource(); > return InsertionDone; > } > >+void SVGTextPathElement::removedFrom(Node* rootParent) >+{ >+ SVGTextContentElement::removedFrom(rootParent); >+ if (rootParent->inDocument()) >+ clearResourceReferences(); >+} >+ > bool SVGTextPathElement::selfHasRelativeLengths() const > { > return startOffset().isRelative() >diff --git a/Source/WebCore/svg/SVGTextPathElement.h b/Source/WebCore/svg/SVGTextPathElement.h >index 452e60e00265185f927e33e3bea26b37b0a3031e..71dc37dc9b42dcfc2ad5233686dd463473da71cc 100644 >--- a/Source/WebCore/svg/SVGTextPathElement.h >+++ b/Source/WebCore/svg/SVGTextPathElement.h >@@ -115,7 +115,13 @@ public: > private: > SVGTextPathElement(const QualifiedName&, Document*); > >+ virtual ~SVGTextPathElement(); >+ >+ void clearResourceReferences(); >+ >+ virtual void buildPendingResource(); > virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE; >+ virtual void removedFrom(Node*) OVERRIDE; > > bool isSupportedAttribute(const QualifiedName&); > virtual void parseAttribute(const Attribute&) OVERRIDE; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 8ae138a75b23ceb11acaad30ade58f01fdc5c8d4..6957633f91fa03e1955af96080ace641d52f83bb 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,82 @@ >+2012-05-24 Rob Buis <rwlbuis@webkit.org> >+ >+ Bug 15799: textPath element does not re-render when referenced path changes >+ https://bugs.webkit.org/show_bug.cgi?id=15799 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ - textPath-path-change-id.svg, react to change of id attribute on referenced path (makes the xlink:href valid). >+ - textPath-path-change-id2.svg, react to change of id attribute on referenced path (makes the xlink:href invalid). >+ - textPath-path-set-id.svg, react to setting of id attribute on referenced path (makes the xlink:href valid). >+ - textPath-change-reference.svg, <textPath> references existing <path>, change the xlink:href to a non-existing one. >+ - textPath-change-reference-using-baseval.svg, <textPath> references existing <path>, change the xlink:href to a non-existing one using SVG DOM. >+ - textPath-change-reference2.svg, <textPath> references non-existing <path>, change xlink:href to an existing one. >+ - textPath-change-reference2-using-baseval.svg, <textPath> references non-existing <path>, change xlink:href to an existing one using SVG DOM. >+ - textPath-insert-path.svg, <textPath> references non-existing <path>, <path> added dynamically. >+ - textPath-modify-child.svg, react to change on textPath content. >+ - textPath-path-change-using-svg-dom.svg, react to change on pathSegList of referenced path. >+ - textPath-path-change.svg, react to change on d attribute of referenced path. >+ - textPath-path-change2.svg, react to change on d attribute of path referenced by multiple <textPath>s. >+ - textPath-remove-path.svg, <textPath> references existing <path>, <path> is removed from DOM. >+ - textPath-startoffset.svg, react to startOffset attribute change on <textPath>. >+ >+ These tests are duplicated for <textPath> inside a <pattern>. >+ >+ * svg/custom/textPath-change-id-expected.svg: Added. >+ * svg/custom/textPath-change-id-pattern-expected.svg: Added. >+ * svg/custom/textPath-change-id-pattern.svg: Added. >+ * svg/custom/textPath-change-id.svg: Added. >+ * svg/custom/textPath-change-id2-expected.svg: Added. >+ * svg/custom/textPath-change-id2-pattern-expected.svg: Added. >+ * svg/custom/textPath-change-id2-pattern.svg: Added. >+ * svg/custom/textPath-change-id2.svg: Added. >+ * svg/custom/textPath-change-reference-expected.svg: Added. >+ * svg/custom/textPath-change-reference-pattern-expected.svg: Added. >+ * svg/custom/textPath-change-reference-pattern.svg: Added. >+ * svg/custom/textPath-change-reference-using-baseval-expected.svg: Added. >+ * svg/custom/textPath-change-reference-using-baseval-pattern-expected.svg: Added. >+ * svg/custom/textPath-change-reference-using-baseval-pattern.svg: Added. >+ * svg/custom/textPath-change-reference-using-baseval.svg: Added. >+ * svg/custom/textPath-change-reference.svg: Added. >+ * svg/custom/textPath-change-reference2-expected.svg: Added. >+ * svg/custom/textPath-change-reference2-pattern-expected.svg: Added. >+ * svg/custom/textPath-change-reference2-pattern.svg: Added. >+ * svg/custom/textPath-change-reference2-using-baseval-expected.svg: Added. >+ * svg/custom/textPath-change-reference2-using-baseval-pattern-expected.svg: Added. >+ * svg/custom/textPath-change-reference2-using-baseval-pattern.svg: Added. >+ * svg/custom/textPath-change-reference2-using-baseval.svg: Added. >+ * svg/custom/textPath-change-reference2.svg: Added. >+ * svg/custom/textPath-insert-path-expected.svg: Added. >+ * svg/custom/textPath-insert-path-pattern-expected.svg: Added. >+ * svg/custom/textPath-insert-path-pattern.svg: Added. >+ * svg/custom/textPath-insert-path.svg: Added. >+ * svg/custom/textPath-modify-child-expected.svg: Added. >+ * svg/custom/textPath-modify-child-pattern-expected.svg: Added. >+ * svg/custom/textPath-modify-child-pattern.svg: Added. >+ * svg/custom/textPath-modify-child.svg: Added. >+ * svg/custom/textPath-path-change-expected.svg: Added. >+ * svg/custom/textPath-path-change-pattern-expected.svg: Added. >+ * svg/custom/textPath-path-change-pattern.svg: Added. >+ * svg/custom/textPath-path-change-using-svg-dom-expected.svg: Added. >+ * svg/custom/textPath-path-change-using-svg-dom-pattern-expected.svg: Added. >+ * svg/custom/textPath-path-change-using-svg-dom-pattern.svg: Added. >+ * svg/custom/textPath-path-change-using-svg-dom.svg: Added. >+ * svg/custom/textPath-path-change.svg: Added. >+ * svg/custom/textPath-path-change2-expected.svg: Added. >+ * svg/custom/textPath-path-change2-pattern-expected.svg: Added. >+ * svg/custom/textPath-path-change2-pattern.svg: Added. >+ * svg/custom/textPath-path-change2.svg: Added. >+ * svg/custom/textPath-remove-path-expected.svg: Added. >+ * svg/custom/textPath-remove-path-pattern-expected.svg: Added. >+ * svg/custom/textPath-remove-path-pattern.svg: Added. >+ * svg/custom/textPath-remove-path.svg: Added. >+ * svg/custom/textPath-set-id-expected.svg: Added. >+ * svg/custom/textPath-set-id.svg: Added. >+ * svg/custom/textPath-startoffset-expected.svg: Added. >+ * svg/custom/textPath-startoffset-pattern-expected.svg: Added. >+ * svg/custom/textPath-startoffset-pattern.svg: Added. >+ * svg/custom/textPath-startoffset.svg: Added. >+ > 2012-05-23 Grzegorz Czajkowski <g.czajkowski@samsung.com> > > Unreviewed, rolling out r118157. >diff --git a/LayoutTests/svg/custom/textPath-change-id-expected.svg b/LayoutTests/svg/custom/textPath-change-id-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..7f4e700e318381a7ab531db98e6b730ade914dfe >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-id-expected.svg >@@ -0,0 +1,6 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <path id="foo" d="M150 50 L 450 50" /> >+ <text> >+ <textPath id="theTP" xlink:href="#foo">PASS</textPath> >+ </text> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-id-pattern-expected.svg b/LayoutTests/svg/custom/textPath-change-id-pattern-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..335c517e3e11f85591c363c7ba6ed9490cb7600a >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-id-pattern-expected.svg >@@ -0,0 +1,9 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <path id="foo" d="M150 50 L 450 50" /> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="400" height="400"> >+ <text> >+ <textPath id="theTP" xlink:href="#foo">PASS</textPath> >+ </text> >+ </pattern> >+ <rect width="400" height="400" fill="url(#pat)" stroke="black" stroke-width="1"/> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-id-pattern.svg b/LayoutTests/svg/custom/textPath-change-id-pattern.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..2195324af616c95e2e5d01b59357452ddcde5486 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-id-pattern.svg >@@ -0,0 +1,17 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="bar" d="M150 50 L 450 50" /> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="400" height="400"> >+ <text> >+ <textPath id="theTP" xlink:href="#foo">PASS</textPath> >+ </text> >+ </pattern> >+ <rect width="400" height="400" fill="url(#pat)" stroke="black" stroke-width="1"/> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var path = document.getElementById("bar"); >+ path.setAttribute("id","foo"); >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-id.svg b/LayoutTests/svg/custom/textPath-change-id.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..66c81e07755e45910e82ca64d11f468b3cd8a0fe >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-id.svg >@@ -0,0 +1,14 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="bar" d="M150 50 L 450 50" /> >+ <text> >+ <textPath id="theTP" xlink:href="#foo">PASS</textPath> >+ </text> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var path = document.getElementById("bar"); >+ path.setAttribute("id","foo"); >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-id2-expected.svg b/LayoutTests/svg/custom/textPath-change-id2-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..cbe810ca6c4101bcb7228ba67356270a1a32d773 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-id2-expected.svg >@@ -0,0 +1,3 @@ >+<svg xmlns="http://www.w3.org/2000/svg"> >+ <text x="50" y="50">PASS</text> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-id2-pattern-expected.svg b/LayoutTests/svg/custom/textPath-change-id2-pattern-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..8c530449001a1b53ad84fe34e2f9e7641a3b5357 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-id2-pattern-expected.svg >@@ -0,0 +1,10 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <path id="bar" d="M150 50 L 450 50" /> >+ <text x="50" y="50">PASS</text> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="400" height="400"> >+ <text> >+ <textPath id="theTP" xlink:href="#foo">FAIL</textPath> >+ </text> >+ </pattern> >+ <rect width="400" height="400" fill="url(#pat)" stroke="black" stroke-width="1"/> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-id2-pattern.svg b/LayoutTests/svg/custom/textPath-change-id2-pattern.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..bb54a817781386a88b82150b1c7454af74fe9a92 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-id2-pattern.svg >@@ -0,0 +1,18 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="foo" d="M150 50 L 450 50" /> >+ <text x="50" y="50">PASS</text> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="400" height="400"> >+ <text> >+ <textPath id="theTP" xlink:href="#foo">FAIL</textPath> >+ </text> >+ </pattern> >+ <rect width="400" height="400" fill="url(#pat)" stroke="black" stroke-width="1"/> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var path = document.getElementById("foo"); >+ path.setAttribute("id", "bar"); >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-id2.svg b/LayoutTests/svg/custom/textPath-change-id2.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..e136e72669e1d8d98fd708daf14a7ac790724dbb >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-id2.svg >@@ -0,0 +1,15 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <text x="50" y="50">PASS</text> >+ <path id="foo" d="M150 50 L 450 50" /> >+ <text> >+ <textPath id="theTP" xlink:href="#foo">FAIL</textPath> >+ </text> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var path = document.getElementById("foo"); >+ path.setAttribute("id", "bar"); >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-reference-expected.svg b/LayoutTests/svg/custom/textPath-change-reference-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..501823edf1cd0a6cadcd1e0fe84604909428b714 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-reference-expected.svg >@@ -0,0 +1,6 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <path id="thePath" d="M150 50 L 450 50" /> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">PASS</textPath> >+ </text> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-reference-pattern-expected.svg b/LayoutTests/svg/custom/textPath-change-reference-pattern-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..5947912f9ab403b42a602bde85ba8c9c77e766fa >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-reference-pattern-expected.svg >@@ -0,0 +1,9 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <path id="thePath" d="M50 50 L 150 50" /> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="100" height="100"> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">PASS</textPath> >+ </text> >+ </pattern> >+ <rect width="200" height="200" fill="url(#pat)" stroke="black" stroke-width="1"/> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-reference-pattern.svg b/LayoutTests/svg/custom/textPath-change-reference-pattern.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..f2e8e0b1d38ef6b48d0c9a2a3b3698961e26d076 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-reference-pattern.svg >@@ -0,0 +1,17 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="thePath" d="M50 50 L 150 50" /> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="100" height="100"> >+ <text> >+ <textPath id="theTP" xlink:href="#wrongPath">PASS</textPath> >+ </text> >+ </pattern> >+ <rect width="200" height="200" fill="url(#pat)" stroke="black" stroke-width="1"/> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var tp = document.getElementById("theTP"); >+ tp.setAttributeNS("http://www.w3.org/1999/xlink","href","#thePath"); >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-reference-using-baseval-expected.svg b/LayoutTests/svg/custom/textPath-change-reference-using-baseval-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..501823edf1cd0a6cadcd1e0fe84604909428b714 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-reference-using-baseval-expected.svg >@@ -0,0 +1,6 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <path id="thePath" d="M150 50 L 450 50" /> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">PASS</textPath> >+ </text> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-reference-using-baseval-pattern-expected.svg b/LayoutTests/svg/custom/textPath-change-reference-using-baseval-pattern-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..5947912f9ab403b42a602bde85ba8c9c77e766fa >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-reference-using-baseval-pattern-expected.svg >@@ -0,0 +1,9 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <path id="thePath" d="M50 50 L 150 50" /> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="100" height="100"> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">PASS</textPath> >+ </text> >+ </pattern> >+ <rect width="200" height="200" fill="url(#pat)" stroke="black" stroke-width="1"/> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-reference-using-baseval-pattern.svg b/LayoutTests/svg/custom/textPath-change-reference-using-baseval-pattern.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..3900ac15306bc9b2b73bee4994663204cb5aa196 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-reference-using-baseval-pattern.svg >@@ -0,0 +1,17 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="thePath" d="M50 50 L 150 50" /> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="100" height="100"> >+ <text> >+ <textPath id="theTP" xlink:href="#wrongPath">PASS</textPath> >+ </text> >+ </pattern> >+ <rect width="200" height="200" fill="url(#pat)" stroke="black" stroke-width="1"/> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var tp = document.getElementById("theTP"); >+ tp.href.baseVal = "#thePath"; >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-reference-using-baseval.svg b/LayoutTests/svg/custom/textPath-change-reference-using-baseval.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..944a4c049fe7c5ea145cf8e05b73fa0ad3cf60a5 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-reference-using-baseval.svg >@@ -0,0 +1,15 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="thePath" d="M150 50 L 450 50" /> >+ <text> >+ <textPath id="theTP" xlink:href="#wrongPath">PASS</textPath> >+ </text> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var path = document.createElementNS("http://www.w3.org/2000/svg", "path"); >+ var tp = document.getElementById("theTP"); >+ tp.href.baseVal = "#thePath"; >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-reference.svg b/LayoutTests/svg/custom/textPath-change-reference.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..69ac24a9f0a0bd514bf9d4446e2d04606f7b0113 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-reference.svg >@@ -0,0 +1,14 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="thePath" d="M150 50 L 450 50" /> >+ <text> >+ <textPath id="theTP" xlink:href="#wrongPath">PASS</textPath> >+ </text> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var tp = document.getElementById("theTP"); >+ tp.setAttributeNS("http://www.w3.org/1999/xlink","href","#thePath"); >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-reference2-expected.svg b/LayoutTests/svg/custom/textPath-change-reference2-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..cbe810ca6c4101bcb7228ba67356270a1a32d773 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-reference2-expected.svg >@@ -0,0 +1,3 @@ >+<svg xmlns="http://www.w3.org/2000/svg"> >+ <text x="50" y="50">PASS</text> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-reference2-pattern-expected.svg b/LayoutTests/svg/custom/textPath-change-reference2-pattern-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..14d5fd7138003e0eb59953e55faaf2287cb67df5 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-reference2-pattern-expected.svg >@@ -0,0 +1,5 @@ >+<svg xmlns="http://www.w3.org/2000/svg"> >+ <text x="50" y="50">PASS</text> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="100" height="100"/> >+ <rect width="200" height="200" fill="url(#pat)" stroke="black" stroke-width="1"/> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-reference2-pattern.svg b/LayoutTests/svg/custom/textPath-change-reference2-pattern.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..ed70d9955514c53178ff46238e9c2d51972e6deb >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-reference2-pattern.svg >@@ -0,0 +1,18 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="thePath" d="M50 50 L 150 50" /> >+ <text x="50" y="50">PASS</text> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="100" height="100"> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">FAIL</textPath> >+ </text> >+ </pattern> >+ <rect width="200" height="200" fill="url(#pat)" stroke="black" stroke-width="1"/> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var tp = document.getElementById("theTP"); >+ tp.setAttributeNS("http://www.w3.org/1999/xlink","href","#wrongPath"); >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-reference2-using-baseval-expected.svg b/LayoutTests/svg/custom/textPath-change-reference2-using-baseval-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..cbe810ca6c4101bcb7228ba67356270a1a32d773 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-reference2-using-baseval-expected.svg >@@ -0,0 +1,3 @@ >+<svg xmlns="http://www.w3.org/2000/svg"> >+ <text x="50" y="50">PASS</text> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-reference2-using-baseval-pattern-expected.svg b/LayoutTests/svg/custom/textPath-change-reference2-using-baseval-pattern-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..87de0f5a2ad1092e2b999ecdde8c19374ebd283c >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-reference2-using-baseval-pattern-expected.svg >@@ -0,0 +1,4 @@ >+<svg xmlns="http://www.w3.org/2000/svg"> >+ <text x="50" y="50">PASS</text> >+ <rect width="200" height="200" fill="none" stroke="black" stroke-width="1"/> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-reference2-using-baseval-pattern.svg b/LayoutTests/svg/custom/textPath-change-reference2-using-baseval-pattern.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..ae3890c74318c5385d76140084304a9dee1b7ff9 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-reference2-using-baseval-pattern.svg >@@ -0,0 +1,5 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <text x="50" y="50">PASS</text> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="100" height="100"/> >+ <rect width="200" height="200" fill="url(#pat)" stroke="black" stroke-width="1"/> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-reference2-using-baseval.svg b/LayoutTests/svg/custom/textPath-change-reference2-using-baseval.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..89e58c9f9586fb49ae3428e11b469f338ed1681f >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-reference2-using-baseval.svg >@@ -0,0 +1,15 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="thePath" d="M150 50 L 450 50" /> >+ <text x="50" y="50">PASS</text> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">FAIL</textPath> >+ </text> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var tp = document.getElementById("theTP"); >+ tp.href.baseVal = "#wrongPath"; >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-change-reference2.svg b/LayoutTests/svg/custom/textPath-change-reference2.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..6f65177203dc8ed691ee4eca29e8282b511bc970 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-change-reference2.svg >@@ -0,0 +1,15 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="thePath" d="M150 50 L 450 50" /> >+ <text x="50" y="50">PASS</text> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">FAIL</textPath> >+ </text> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var tp = document.getElementById("theTP"); >+ tp.setAttributeNS("http://www.w3.org/1999/xlink","href","#wrongPath"); >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-insert-path-expected.svg b/LayoutTests/svg/custom/textPath-insert-path-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..481100fdb27dbb2a274e6b316631bc15f91b0b76 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-insert-path-expected.svg >@@ -0,0 +1,6 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <path id="thePath" d="M50 50 L 450 50" /> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">PASS</textPath> >+ </text> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-insert-path-pattern-expected.svg b/LayoutTests/svg/custom/textPath-insert-path-pattern-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..7ecdd42c3602b5e7560bde5a18ebf866cfe583b5 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-insert-path-pattern-expected.svg >@@ -0,0 +1,9 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="thePath" d="M150 50 L 450 50"/> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="400" height="400"> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">PASS</textPath> >+ </text> >+ </pattern> >+ <rect width="400" height="400" fill="url(#pat)" stroke="black" stroke-width="1"/> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-insert-path-pattern.svg b/LayoutTests/svg/custom/textPath-insert-path-pattern.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..deac519b80c120b384d5a649029443ef1c2357f2 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-insert-path-pattern.svg >@@ -0,0 +1,18 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="400" height="400"> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">PASS</textPath> >+ </text> >+ </pattern> >+ <rect width="400" height="400" fill="url(#pat)" stroke="black" stroke-width="1"/> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var path = document.createElementNS("http://www.w3.org/2000/svg", "path"); >+ path.setAttribute("id", "thePath"); >+ path.setAttribute("d", "M150 50 L 450 50"); >+ document.rootElement.appendChild(path); >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-insert-path.svg b/LayoutTests/svg/custom/textPath-insert-path.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..eeb36e8af0751a9a152a3e5c961f592aa4676c9a >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-insert-path.svg >@@ -0,0 +1,15 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">PASS</textPath> >+ </text> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var path = document.createElementNS("http://www.w3.org/2000/svg", "path"); >+ path.setAttribute("id", "thePath"); >+ path.setAttribute("d", "M50 50 L 450 50"); >+ document.rootElement.appendChild(path); >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-modify-child-expected.svg b/LayoutTests/svg/custom/textPath-modify-child-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..481100fdb27dbb2a274e6b316631bc15f91b0b76 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-modify-child-expected.svg >@@ -0,0 +1,6 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <path id="thePath" d="M50 50 L 450 50" /> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">PASS</textPath> >+ </text> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-modify-child-pattern-expected.svg b/LayoutTests/svg/custom/textPath-modify-child-pattern-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..2ecb13fdde336c263dfd4e2107134f997e7a29a8 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-modify-child-pattern-expected.svg >@@ -0,0 +1,9 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <path id="thePath" d="M50 50 L 450 50" /> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="400" height="400"> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">PASS</textPath> >+ </text> >+ </pattern> >+ <rect width="400" height="400" fill="url(#pat)" stroke="black" stroke-width="1"/> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-modify-child-pattern.svg b/LayoutTests/svg/custom/textPath-modify-child-pattern.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..f89af22512bd1fe07c1235f92d7871a353358797 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-modify-child-pattern.svg >@@ -0,0 +1,17 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="thePath" d="M50 50 L 450 50" /> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="400" height="400"> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">FAIL</textPath> >+ </text> >+ </pattern> >+ <rect width="400" height="400" fill="url(#pat)" stroke="black" stroke-width="1"/> >+ <script><![CDATA[ >+ function runTest() { >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(); >+ var tp = document.getElementById("theTP"); >+ tp.firstChild.textContent = "PASS"; >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-modify-child.svg b/LayoutTests/svg/custom/textPath-modify-child.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..5bab7a6328a7280f4f5504e83dea91efc5b28358 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-modify-child.svg >@@ -0,0 +1,14 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="thePath" d="M50 50 L 450 50" /> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">FAIL</textPath> >+ </text> >+ <script><![CDATA[ >+ function runTest() { >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(); >+ var tp = document.getElementById("theTP"); >+ tp.firstChild.textContent = "PASS"; >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-path-change-expected.svg b/LayoutTests/svg/custom/textPath-path-change-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..4f1182b93884c5cf1b6f20552b1db9b86ab883f7 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-path-change-expected.svg >@@ -0,0 +1,7 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <path id="thePath" d="M50 150 L 450 150" /> >+ <text x="50" y="100">This text should be ABOVE the other line.</text> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">This text should be BELOW the other line.</textPath> >+ </text> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-path-change-pattern-expected.svg b/LayoutTests/svg/custom/textPath-path-change-pattern-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..5668141ee6b38b3b93f26876e078853f4c85c5b9 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-path-change-pattern-expected.svg >@@ -0,0 +1,10 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <path id="thePath" d="M50 150 L 450 150" /> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="400" height="400"> >+ <text x="50" y="100">This text should be ABOVE the other line.</text> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">This text should be BELOW the other line.</textPath> >+ </text> >+ </pattern> >+ <rect width="400" height="400" fill="url(#pat)" stroke="black" stroke-width="1"/> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-path-change-pattern.svg b/LayoutTests/svg/custom/textPath-path-change-pattern.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..771129587058d9296b46acda1202bc3a81fb965e >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-path-change-pattern.svg >@@ -0,0 +1,18 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="thePath" d="M50 0 L 150 50" /> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="400" height="400"> >+ <text x="50" y="100">This text should be ABOVE the other line.</text> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">This text should be BELOW the other line.</textPath> >+ </text> >+ </pattern> >+ <rect width="400" height="400" fill="url(#pat)" stroke="black" stroke-width="1"/> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var path = document.getElementById("thePath"); >+ path.setAttribute("d", "M50 150 L 450 150"); >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-path-change-using-svg-dom-expected.svg b/LayoutTests/svg/custom/textPath-path-change-using-svg-dom-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..4f1182b93884c5cf1b6f20552b1db9b86ab883f7 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-path-change-using-svg-dom-expected.svg >@@ -0,0 +1,7 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <path id="thePath" d="M50 150 L 450 150" /> >+ <text x="50" y="100">This text should be ABOVE the other line.</text> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">This text should be BELOW the other line.</textPath> >+ </text> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-path-change-using-svg-dom-pattern-expected.svg b/LayoutTests/svg/custom/textPath-path-change-using-svg-dom-pattern-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..5668141ee6b38b3b93f26876e078853f4c85c5b9 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-path-change-using-svg-dom-pattern-expected.svg >@@ -0,0 +1,10 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <path id="thePath" d="M50 150 L 450 150" /> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="400" height="400"> >+ <text x="50" y="100">This text should be ABOVE the other line.</text> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">This text should be BELOW the other line.</textPath> >+ </text> >+ </pattern> >+ <rect width="400" height="400" fill="url(#pat)" stroke="black" stroke-width="1"/> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-path-change-using-svg-dom-pattern.svg b/LayoutTests/svg/custom/textPath-path-change-using-svg-dom-pattern.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..2bb9a5be12e18f5c0b1a2146397583b947bb6c5e >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-path-change-using-svg-dom-pattern.svg >@@ -0,0 +1,23 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="thePath" d="M50 50 L 450 50" /> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="400" height="400"> >+ <text x="50" y="100">This text should be ABOVE the other line.</text> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">This text should be BELOW the other line.</textPath> >+ </text> >+ </pattern> >+ <rect width="400" height="400" fill="url(#pat)" stroke="black" stroke-width="1"/> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var path = document.getElementById("thePath"); >+ pathSegList = path.pathSegList; >+ pathSegList.clear(); >+ pathSeg = path.createSVGPathSegMovetoAbs(50, 150); >+ pathSegList.appendItem(pathSeg); >+ pathSeg = path.createSVGPathSegLinetoAbs(450, 150); >+ pathSegList.appendItem(pathSeg); >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-path-change-using-svg-dom.svg b/LayoutTests/svg/custom/textPath-path-change-using-svg-dom.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..26538aca8c00db8b04fd3291d863bed1da823097 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-path-change-using-svg-dom.svg >@@ -0,0 +1,20 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="thePath" d="M50 50 L 450 50" /> >+ <text x="50" y="100">This text should be ABOVE the other line.</text> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">This text should be BELOW the other line.</textPath> >+ </text> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var path = document.getElementById("thePath"); >+ pathSegList = path.pathSegList; >+ pathSegList.clear(); >+ pathSeg = path.createSVGPathSegMovetoAbs(50, 150); >+ pathSegList.appendItem(pathSeg); >+ pathSeg = path.createSVGPathSegLinetoAbs(450, 150); >+ pathSegList.appendItem(pathSeg); >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-path-change.svg b/LayoutTests/svg/custom/textPath-path-change.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..e0d706acf47188f8f5e865c8c24d53f5563e940d >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-path-change.svg >@@ -0,0 +1,15 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="thePath" d="M50 50 L 450 50" /> >+ <text x="50" y="100">This text should be ABOVE the other line.</text> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">This text should be BELOW the other line.</textPath> >+ </text> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var path = document.getElementById("thePath"); >+ path.setAttribute("d", "M50 150 L 450 150"); >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-path-change2-expected.svg b/LayoutTests/svg/custom/textPath-path-change2-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..a8da532966349bfdd94f98b4d6a2edae80fc6c19 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-path-change2-expected.svg >@@ -0,0 +1,7 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <path id="thePath" d="M50 150 L 450 150" /> >+ <text> >+ <textPath xlink:href="#thePath">This text should be ABOVE the other line.</textPath> >+ <textPath xlink:href="#thePath"><tspan dy="20">This text should be BELOW the other line.</tspan></textPath> >+ </text> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-path-change2-pattern-expected.svg b/LayoutTests/svg/custom/textPath-path-change2-pattern-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..433158ca3a9f97ad09b8bae1f0dea0c343fa077e >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-path-change2-pattern-expected.svg >@@ -0,0 +1,10 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <path id="thePath" d="M50 150 L 450 150" /> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="400" height="400"> >+ <text> >+ <textPath xlink:href="#thePath">This text should be ABOVE the other line.</textPath> >+ <textPath xlink:href="#thePath"><tspan dy="20">This text should be BELOW the other line.</tspan></textPath> >+ </text> >+ </pattern> >+ <rect width="400" height="400" fill="url(#pat)" stroke="black" stroke-width="1"/> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-path-change2-pattern.svg b/LayoutTests/svg/custom/textPath-path-change2-pattern.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..2263e64bfb31ff56864edbd2df95c15b3ff5cf2b >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-path-change2-pattern.svg >@@ -0,0 +1,18 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="thePath" d="M50 50 L 450 50" /> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="400" height="400"> >+ <text> >+ <textPath xlink:href="#thePath">This text should be ABOVE the other line.</textPath> >+ <textPath xlink:href="#thePath"><tspan dy="20">This text should be BELOW the other line.</tspan></textPath> >+ </text> >+ </pattern> >+ <rect width="400" height="400" fill="url(#pat)" stroke="black" stroke-width="1"/> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var path = document.getElementById("thePath"); >+ path.setAttribute("d", "M50 150 L 450 150"); >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-path-change2.svg b/LayoutTests/svg/custom/textPath-path-change2.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..6c2cbd430f8d6a95b5f8eab228666570eabcda82 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-path-change2.svg >@@ -0,0 +1,15 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="thePath" d="M50 50 L 450 50" /> >+ <text> >+ <textPath xlink:href="#thePath">This text should be ABOVE the other line.</textPath> >+ <textPath xlink:href="#thePath"><tspan dy="20">This text should be BELOW the other line.</tspan></textPath> >+ </text> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var path = document.getElementById("thePath"); >+ path.setAttribute("d", "M50 150 L 450 150"); >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-remove-path-expected.svg b/LayoutTests/svg/custom/textPath-remove-path-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..2611b9bc1ba6c9d6baf1c816e907af88eaa3b63b >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-remove-path-expected.svg >@@ -0,0 +1,6 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <text x="50" y="50">PASS</text> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">This text should not be visible</textPath> >+ </text> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-remove-path-pattern-expected.svg b/LayoutTests/svg/custom/textPath-remove-path-pattern-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..ae91de0b4eae96f12c961763f5c1cd2332f98aae >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-remove-path-pattern-expected.svg >@@ -0,0 +1,9 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <text x="50" y="50">PASS</text> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="400" height="400"> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">FAIL</textPath> >+ </text> >+ </pattern> >+ <rect width="400" height="400" fill="url(#pat)" stroke="black" stroke-width="1"/> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-remove-path-pattern.svg b/LayoutTests/svg/custom/textPath-remove-path-pattern.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..1422837d4ba5f7da2f6fe04acec31bc5f17e16df >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-remove-path-pattern.svg >@@ -0,0 +1,18 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="thePath" d="M150 50 L 450 50" /> >+ <text x="50" y="50">PASS</text> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="400" height="400"> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">FAIL</textPath> >+ </text> >+ </pattern> >+ <rect width="400" height="400" fill="url(#pat)" stroke="black" stroke-width="1"/> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var path = document.getElementById("thePath"); >+ path.parentNode.removeChild(path); >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-remove-path.svg b/LayoutTests/svg/custom/textPath-remove-path.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..8e0df9517322c1f26c41a4294f2d2e1270c2c0b6 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-remove-path.svg >@@ -0,0 +1,15 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="thePath" d="M150 100 L 450 100" /> >+ <text x="50" y="50">PASS</text> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">This text should not be visible</textPath> >+ </text> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var path = document.getElementById("thePath"); >+ path.parentNode.removeChild(path); >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-set-id-expected.svg b/LayoutTests/svg/custom/textPath-set-id-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..671c765792247e969a5dcfd5b2b42fa69b8aff57 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-set-id-expected.svg >@@ -0,0 +1,8 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <defs> >+ <path d="M150 50 L 450 50" /> >+ </defs> >+ <text> >+ <textPath id="theTP" xlink:href="#foo">PASS</textPath> >+ </text> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-set-id.svg b/LayoutTests/svg/custom/textPath-set-id.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..e24c71f7d167aed103af5c39ad50e81962494635 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-set-id.svg >@@ -0,0 +1,19 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <defs> >+ <path d="M150 50 L 450 50" /> >+ </defs> >+ <text> >+ <textPath id="theTP" xlink:href="#foo">FAIL</textPath> >+ </text> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var path = document.getElementsByTagName("path")[0]; >+ path.parentNode.addEventListener('DOMSubtreeModified', handler); >+ path.setAttribute("id","foo"); >+ if (window.layoutTestController) >+ layoutTestController.notifyDone(); >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-startoffset-expected.svg b/LayoutTests/svg/custom/textPath-startoffset-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..e47868261364e1fd607cf8ad58eb0bc1ab37b8fe >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-startoffset-expected.svg >@@ -0,0 +1,6 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <path id="thePath" d="M-150 50 L 450 50" /> >+ <text> >+ <textPath startOffset="200" id="theTP" xlink:href="#thePath">PASS</textPath> >+ </text> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-startoffset-pattern-expected.svg b/LayoutTests/svg/custom/textPath-startoffset-pattern-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..e637952a98eded2eaf8f624d3397abf041b4ae94 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-startoffset-pattern-expected.svg >@@ -0,0 +1,9 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <path id="thePath" d="M-150 50 L 450 50" /> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="200" height="200"> >+ <text> >+ <textPath startOffset="200" id="theTP" xlink:href="#thePath">PASS</textPath> >+ </text> >+ </pattern> >+ <rect width="200" height="200" fill="url(#pat)" stroke="black" stroke-width="1"/> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-startoffset-pattern.svg b/LayoutTests/svg/custom/textPath-startoffset-pattern.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..8b6c098be4be4a09fdbdecde0475ce8abb582b50 >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-startoffset-pattern.svg >@@ -0,0 +1,17 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="thePath" d="M-150 50 L 450 50" /> >+ <pattern id="pat" patternUnits="userSpaceOnUse" x="0" y="0" width="200" height="200"> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">PASS</textPath> >+ </text> >+ </pattern> >+ <rect width="200" height="200" fill="url(#pat)" stroke="black" stroke-width="1"/> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var tp = document.getElementById("theTP"); >+ tp.setAttribute("startOffset", "200"); >+ } >+ ]]></script> >+</svg> >diff --git a/LayoutTests/svg/custom/textPath-startoffset.svg b/LayoutTests/svg/custom/textPath-startoffset.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..b2f8a9704cfe9dd5dd00c9fe84d6340fc8d38f5e >--- /dev/null >+++ b/LayoutTests/svg/custom/textPath-startoffset.svg >@@ -0,0 +1,14 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> >+ <path id="thePath" d="M-150 50 L 450 50" /> >+ <text> >+ <textPath id="theTP" xlink:href="#thePath">PASS</textPath> >+ </text> >+ <script><![CDATA[ >+ if (window.layoutTestController) >+ layoutTestController.dumpAsText(true); >+ function runTest() { >+ var tp = document.getElementById("theTP"); >+ tp.setAttribute("startOffset", "200"); >+ } >+ ]]></script> >+</svg>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 15799
:
17047
|
27683
|
27854
|
95436
|
99097
|
99104
|
99152
|
99164
|
99172
|
99588
|
99652
|
99655
|
99656
|
99657
|
99665
|
99752
|
99772
|
99882
|
100043
|
100047
|
143034
|
143158
|
143314
|
143363
|
143436
|
143453
|
143598
|
143856
|
144062
|
144072
|
144081
|
144093