haikuwebkit/LayoutTests/svg/custom/uri-reference-handling-expe...

14 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2011-07-29 Rob Buis <rbuis@rim.com> URL references are completely broken in SVG https://bugs.webkit.org/show_bug.cgi?id=63283 Reviewed by Nikolas Zimmermann. Change SVGURIElement::getTarget to be more strict about iri resolving and make it serve as a central place to resolve a iri to a SVGElement. The iri can be same-document or external, for now we only handle the former, the latter will be handled in bug 65344. Accept as same-document if the iri combined with the base uri equals the document url (ignoring the fragment identifier). For convenience a method is added to lookup the element, if found. Tests: svg/custom/external-paintserver-reference.svg svg/custom/linking-base-external-reference.xhtml svg/custom/uri-reference-handling.svg * css/CSSCursorImageValue.cpp: (WebCore::resourceReferencedByCursorElement): (WebCore::CSSCursorImageValue::~CSSCursorImageValue): (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed): * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::getFontData): * css/CSSFontSelector.h: (WebCore::CSSFontSelector::document): * css/SVGCSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applySVGProperty): * rendering/svg/RenderSVGTextPath.cpp: (WebCore::RenderSVGTextPath::layoutPath): * rendering/svg/SVGResources.cpp: (WebCore::targetReferenceFromResource): (WebCore::paintingResourceFromSVGPaint): * svg/SVGAltGlyphElement.cpp: (WebCore::SVGAltGlyphElement::hasValidGlyphElements): * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::requestImageResource): (WebCore::SVGFEImageElement::build): * svg/SVGGlyphRefElement.cpp: (WebCore::SVGGlyphRefElement::hasValidGlyphElement): * svg/SVGLinearGradientElement.cpp: (WebCore::SVGLinearGradientElement::collectGradientAttributes): * svg/SVGMPathElement.cpp: (WebCore::SVGMPathElement::pathElement): * svg/SVGPaint.cpp: (WebCore::SVGPaint::matchesTargetURI): * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::collectPatternAttributes): * svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::collectGradientAttributes): * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::updateReferencedText): (WebCore::SVGTRefElement::svgAttributeChanged): (WebCore::SVGTRefElement::buildPendingResource): * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::insertedIntoDocument): * svg/SVGURIReference.cpp: (WebCore::SVGURIReference::fragmentIdentifierFromIRIString): (WebCore::SVGURIReference::targetElementFromIRIString): * svg/SVGURIReference.h: * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::buildPendingResource): (WebCore::SVGUseElement::hasCycleUseReferencing): (WebCore::SVGUseElement::expandUseElementsInShadowTree): * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::targetElement): Canonical link: https://commits.webkit.org/81190@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@92047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-07-30 03:22:56 +00:00
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderSVGRoot {svg} at (0,0) size 110x110
RenderSVGHiddenContainer {defs} at (0,0) size 0x0
RenderSVGResourceLinearGradient {linearGradient} [id="green"] [gradientUnits=objectBoundingBox] [start=(0,0)] [end=(1,1)]
RenderSVGGradientStop {stop} [offset=0.50] [color=#008000]
RenderSVGResourceLinearGradient {linearGradient} [id="red"] [gradientUnits=objectBoundingBox] [start=(0,0)] [end=(1,1)]
RenderSVGGradientStop {stop} [offset=0.00] [color=#FF0000]
RenderSVGRect {rect} at (0,0) size 50x50 [fill={[type=LINEAR-GRADIENT] [id="green"]}] [x=0.00] [y=0.00] [width=50.00] [height=50.00]
RenderSVGRect {rect} at (60,0) size 50x50 [fill={[type=SOLID] [color=#008000]}] [x=60.00] [y=0.00] [width=50.00] [height=50.00]
RenderSVGRect {rect} at (0,60) size 50x50 [fill={[type=LINEAR-GRADIENT] [id="green"]}] [x=0.00] [y=60.00] [width=50.00] [height=50.00]
RenderSVGRect {rect} at (60,60) size 50x50 [fill={[type=SOLID] [color=#008000]}] [x=60.00] [y=60.00] [width=50.00] [height=50.00]