Created attachment 164201 [details] SVG use fail for <object> data Chromium issue: http://code.google.com/p/chromium/issues/detail?id=148786 When the SVG document is embedded as inline <object> data, the use element doesn't seem work. Same document embedded as inline <img> data works fine (see attached test).
The problem seems to be that href's are always considered external when embedding via <object> data. SVGURIReference::isExternalURIReference(): // If the URI matches our documents URL, early exit, we're dealing with a local reference. ASSERT(document); KURL url = document->completeURL(uri); if (equalIgnoringFragmentIdentifier(url, document->url())) return false; // If the URI doesn't contain a base string, just see if it starts with a fragment-identifier. return uri.find('#') != notFound; For <object> data-embedded SVGs, the document URL is set to the actual 'data' attribute value (unlike <img>'s). So the test above falls through and hits the last return.... which is odd as it doesn't seem to do what the comment says at all: shouldn't we just check if the first character matches '#'? I'll post a patch shortly.
Created attachment 164214 [details] Patch
Comment on attachment 164214 [details] Patch Clearing flags on attachment: 164214 Committed r128702: <http://trac.webkit.org/changeset/128702>
All reviewed patches have been landed. Closing bug.