Summary: | <use> not working when the SVG doc is embedded in <object> data | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Florin Malita <fmalita> | ||||||
Component: | SVG | Assignee: | Florin Malita <fmalita> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | krit, pdr, schenney, webkit.review.bot, zimmermann | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Florin Malita
2012-09-14 11:58:27 PDT
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. |