Bug 6007
| Summary: | WebKit+SVG should have common code to validate uri references | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Eric Seidel (no email) <eric> |
| Component: | SVG | Assignee: | Rob Buis <rwlbuis> |
| Status: | NEW | ||
| Severity: | Normal | CC: | ahmad.saleem792, annevk, cigitia, ian, karlcow |
| Priority: | P4 | ||
| Version: | 420+ | ||
| Hardware: | Mac | ||
| OS: | OS X 10.4 | ||
| URL: | http://www.w3.org/TR/SVG11/struct.html#Head | ||
| Bug Depends on: | |||
| Bug Blocks: | 91791 | ||
Eric Seidel (no email)
WebKit+SVG should have common code to validate uri references
The SVG spec defines exactly what sort of elements can reference other elements in the SVG spec.
Although we do some checking, we don't have a nice consistant model. I think finding a nice way to
implement this (with a virtual function on SVGElement?) could be a win for both code clarity and spec
conformance.
For a list of which elements are allowed to map to which others:
http://www.w3.org/TR/SVG11/struct.html#Head
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Karl Dubost
16.1.5. URL reference attributes
https://svgwg.org/svg2-draft/linking.html#linkRefAttrs
URL references are normally specified with an ‘href’ attribute. The value of this attribute forms a reference for the desired resource (or secondary resource, if there is a fragment identifier). The value of the ‘href’ attribute must be a URL.
Because it is impractical for any application to check that a value is an URL reference, this specification follows the lead of the URL Specification in this matter and imposes no such conformance testing requirement on SVG authoring tools. An invalid URL does not make an SVG document non-conforming. SVG user agents are only required to process URLs when needed, as specified in Processing of URL references.
and https://svgwg.org/svg2-draft/linking.html#processingURL
A lot of the code in
https://searchfox.org/wubkat/source/Source/WebCore/svg/SVGURIReference.cpp
Ahmad Saleem
Some WPT Tests as well - https://wpt.fyi/results/svg?label=master&label=experimental&aligned&q=url-