RESOLVED FIXED 5978
WebKIt+SVG should use SVGDocumentImpl for image/svg+xml
https://bugs.webkit.org/show_bug.cgi?id=5978
Summary WebKIt+SVG should use SVGDocumentImpl for image/svg+xml
Eric Seidel (no email)
Reported 2005-12-06 05:01:30 PST
WebKIt+SVG should use SVGDocumentImpl for image/svg+xml Currently we use DocumentImpl for everything. When we're actually sent a file with the SVG MIME type, I believe we are supposed to instantiate an SVGDocumentImpl instead, and default unnamespaced elements to the svg namespace.
Attachments
My first try at this... (2.90 KB, patch)
2006-03-08 13:33 PST, Rob Buis
no flags
Work in progress patch (5.29 KB, patch)
2006-05-01 01:05 PDT, Rob Buis
no flags
Cleaner patch where run-webkit-tests does not crash (15.34 KB, patch)
2006-05-18 13:51 PDT, Rob Buis
darin: review-
Improved patch (14.78 KB, patch)
2006-05-19 12:08 PDT, Rob Buis
darin: review+
Eric Seidel (no email)
Comment 1 2006-01-23 03:12:48 PST
Specifically we need to support these additional interfaces: http://www.w3.org/TR/SVG/struct.html#InterfaceSVGDocument it seems "rootElement" is the only real addition.
Rob Buis
Comment 2 2006-03-08 13:33:57 PST
Created attachment 6947 [details] My first try at this... Builds using SVGDocumentImpl when svg mimetype is encountered.
Rob Buis
Comment 3 2006-05-01 01:05:25 PDT
Created attachment 8048 [details] Work in progress patch I noticed the old patch didnt compile, this one does. It tries a new approach, unfortunately while it fixes the testcase it fails the webkit tests... Still trying to figure out why. Cheers, Rob.
Rob Buis
Comment 4 2006-05-18 13:51:43 PDT
Created attachment 8396 [details] Cleaner patch where run-webkit-tests does not crash With this patch, the run-webkit-tests do not crash anymore. Handling of title is left to WebCore:Document. Also handling of scripts is left to it. Cheers, Rob.
Darin Adler
Comment 5 2006-05-18 20:55:37 PDT
Comment on attachment 8396 [details] Cleaner patch where run-webkit-tests does not crash Generally we don't like to check in commented-out or #if 0'd out code. I'd like to understand why we need to do that here, such as in ~SVGDocument and SVGDocument::createElementNS. We also don't use braces around single line if statements like this one: + if (d->m_request.m_responseMIMEType == "image/svg+xml") { + d->m_doc = SVGDOMImplementation::instance()->createDocument(d->m_view.get()); + } else In SVGDOMImplementation, s_instance is no longer used so it should be removed. What is isSVGDocument for? You add it here, but I don't see any uses of it. Otherwise looks good.
Rob Buis
Comment 6 2006-05-19 12:08:46 PDT
Created attachment 8418 [details] Improved patch Hi Darin, I tried to correct the mistakes, most were there because I had to rush the patch last night. I think we can remove the unload dispatch since that is probably handled in the Frame. The isSVGDocument is from an unrelated patch, I removed it. Cheers, Rob.
Darin Adler
Comment 7 2006-05-19 18:41:59 PDT
Comment on attachment 8418 [details] Improved patch r=me
Note You need to log in before you can comment on or make changes to this bug.