Changeset 58187 in webkit
- Timestamp:
- Apr 23, 2010 1:39:38 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r58182 r58187 1 2010-04-23 MORITA Hajime <morrita@google.com> 2 3 Reviewed by Nikolas Zimmermann. 4 5 https://bugs.webkit.org/show_bug.cgi?id=37187 6 SVG <use href="foo"> is interpreted as <use href="#foo"> 7 8 * platform/mac/svg/custom/broken-internal-references-expected.checksum: Added. 9 * platform/mac/svg/custom/broken-internal-references-expected.png: Added. 10 * platform/mac/svg/custom/broken-internal-references-expected.txt: Added. 11 * svg/custom/broken-internal-references.svg: Added. 12 * svg/dynamic-updates/SVGTRefElement-dom-href-attr-expected.txt: 13 * svg/dynamic-updates/script-tests/SVGTRefElement-dom-href-attr.js: 14 (executeTest): Updated to follow this fix. href value should be an URL, not an id. 15 1 16 2010-04-23 Adam Langley <agl@chromium.org> 2 17 -
trunk/LayoutTests/svg/dynamic-updates/SVGTRefElement-dom-href-attr-expected.txt
r52960 r58187 9 9 10 10 11 PASS trefElement.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is " testFail"11 PASS trefElement.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is "#testFail" 12 12 PASS textElement.textContent is "Test failed" 13 PASS trefElement.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is " testPass"13 PASS trefElement.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is "#testPass" 14 14 PASS textElement.textContent is "Test passed" 15 15 PASS successfullyParsed is true -
trunk/LayoutTests/svg/dynamic-updates/script-tests/SVGTRefElement-dom-href-attr.js
r52960 r58187 23 23 24 24 var trefElement = createSVGElement("tref"); 25 trefElement.setAttributeNS(xlinkNS, "xlink:href", " testFail");25 trefElement.setAttributeNS(xlinkNS, "xlink:href", "#testFail"); 26 26 textElement.appendChild(trefElement); 27 27 28 shouldBeEqualToString("trefElement.getAttributeNS('" + xlinkNS + "', 'href')", " testFail");28 shouldBeEqualToString("trefElement.getAttributeNS('" + xlinkNS + "', 'href')", "#testFail"); 29 29 shouldBeEqualToString("textElement.textContent", "Test failed"); 30 30 31 31 function executeTest() { 32 trefElement.setAttributeNS(xlinkNS, "xlink:href", " testPass");33 shouldBeEqualToString("trefElement.getAttributeNS('" + xlinkNS + "', 'href')", " testPass");32 trefElement.setAttributeNS(xlinkNS, "xlink:href", "#testPass"); 33 shouldBeEqualToString("trefElement.getAttributeNS('" + xlinkNS + "', 'href')", "#testPass"); 34 34 shouldBeEqualToString("textElement.textContent", "Test passed"); 35 35 -
trunk/WebCore/ChangeLog
r58186 r58187 1 2010-04-23 MORITA Hajime <morrita@google.com> 2 3 Reviewed by Nikolas Zimmermann. 4 5 https://bugs.webkit.org/show_bug.cgi?id=37187 6 SVG <use href="foo"> is interpreted as <use href="#foo"> 7 8 getTarget() did return url parameter as is if doesn't have 9 fragment identifier. So fixed to return empty string in such case 10 because we need to distinguish "yyy.html" from "xxx.svg#yyy.html". 11 12 Test: svg/custom/broken-internal-references.svg 13 14 * svg/SVGElement.cpp: 15 (WebCore::SVGElement::insertedIntoDocument): 16 * svg/SVGURIReference.cpp: 17 (WebCore::SVGURIReference::getTarget): 18 1 19 2010-04-23 Simon Fraser <simon.fraser@apple.com> 2 20 -
trunk/WebCore/svg/SVGElement.cpp
r56402 r58187 282 282 SVGDocumentExtensions* extensions = document()->accessSVGExtensions(); 283 283 284 String resourceId = SVGURIReference::getTarget(getAttribute(idAttributeName()));284 String resourceId = getAttribute(idAttributeName()); 285 285 if (extensions->isPendingResource(resourceId)) { 286 286 OwnPtr<HashSet<SVGStyledElement*> > clients(extensions->removePendingResource(resourceId)); -
trunk/WebCore/svg/SVGURIReference.cpp
r53879 r58187 61 61 unsigned int start = url.find('#') + 1; 62 62 return url.substring(start, url.length() - start); 63 } else // Normal Reference, ie. style="color-profile:changeColor"64 return url;63 } else // The url doesn't have any target. 64 return String(); 65 65 } 66 66
Note: See TracChangeset
for help on using the changeset viewer.