use <img> tags instead of <object> tags for svgs

This commit is contained in:
Robby Findler 2018-01-04 11:08:42 -07:00 committed by Matthew Flatt
parent 00739632cf
commit 1d8221a321

View File

@ -1317,17 +1317,11 @@
(if (path? p) (if (path? p)
(url->string* (path->url (path->complete-path p))) (url->string* (path->url (path->complete-path p)))
p))]) p))])
`((,(if svg? 'object 'img) `((img
([,(if svg? 'data 'src) ,srcref] ([src ,srcref]
[alt ,(content->string (element-content e))] [alt ,(content->string (element-content e))]
,@(if svg?
`([type "image/svg+xml"])
null)
,@sz ,@sz
,@(attribs)) ,@(attribs))))))]
,@(if svg?
`((param ([name "src"] [value ,srcref])))
null)))))]
[(element-style-property-matching e script-property?) [(element-style-property-matching e script-property?)
=> =>
(lambda (v) (lambda (v)
@ -1496,8 +1490,8 @@
(list (list
(add-padding (add-padding
cvt cvt
`(object `(img
([data ,(install-file "pict.svg" bstr)] ([src ,(install-file "pict.svg" bstr)]
[type "image/svg+xml"]))))))] [type "image/svg+xml"]))))))]
[else #f]))) [else #f])))