A lots of image can't be shown. When I converted them into png format (from pdf), they appeared good.
<rdar://problem/14444333>
Created attachment 206672 [details] initial patch does anybody know why there are pdf, png, svg formats in the Icons/ folder instead of unified format?
btw, without this patch I get 'IndexSizeError: DOM Exception 1: Index or size was negative, or greater than the allowed value'.
Created attachment 206674 [details] Before
Created attachment 206675 [details] After
We use PDF so we don't need to have 2 PNGs for each icon. We need to support Retina displays on Mac. We have considered using SVGs instead of the PDFs, but have not had a chance to convert things.
Created attachment 207652 [details] patch Converted all PDF icons to SVG with pdf2svg and removed all PDF icons. Replaced all .pdf references to .svg in WebInspectorUI/UserInterface/ folder. Tested on Mac and it seems to work.
Comment on attachment 207652 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=207652&action=review > Source/WebInspectorUI/UserInterface/Images/DOMCharacterData.svg:4 > +<image id="image5" width="67" height="67" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEMAAABDCAYAAADHyrhzAAAABmJLR0QA/wD/AP+gvaeTAAAJ60lEQVR4nO1aW2wcVxn+5rozuzO73l1fN67XSRu3Is3FyCkFBKXtG7dKQA1K01AqUFUqHniBdyRUQIgHoE+oUlOSElXcHogqARJIhYJa6gRKmjQhcZzYa6+z3tnd2Zmd++HBjbsze7G9M06dyp+0D+ef/8w5+805/+0cYAc72MEONg5qI0ozJ058q6FUnrI1bdS2LYHYhN7qiYUFw9MOw8d0ISnPyJnM9/ZNT/9tvT5dyfjPqVOPrly9+nyteEOObpq3HhRDYyCfPy+N3fHg/kceKXbU6/TgzAsvfmfh7XM/cG1nQ6vndoCUzTYG7tn/4QNf+tyFds/b/tHzp0594fLMmV9/kIi4ieTQgCqOjo7ef/RoLfiMDQoIIfRfn332eJCIOM+jP5lEjGFBM9ufI8f10LAsLFercDxvTV4r3pClTPZXAD4T7NPyr/774slvXz4z85Nm2YAsY+/wMChq+5MQhGHbODc/D8O212ScIHj5yYPivulpq1m3xSvUasqx5rYY47ecCNt1YTmO72c6DrymL9orBI7D3bk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fmFrkeSsiC0ZNKbReTXmCiKQi6dgSzGMV9eabmzAaxeUarOXUN17lokY/Ici7Fsf+j3bNkFN1kQcM9IDjdUFcu1Khw3/AXXIGIsi7QkYTCZjKTAvGVkAKurZDCZRL8sQ6lrUHQNmmn07lyo1fuciZiAdCKORExYv88msKVk3ARNUcjKErKyBJcQ6KYJ3TRh2DYsx4HtuvBAQDwPAA2GocBQNFiaBs+yEDgOPMdCisXA0OHsQje0kEHTtC8tDBviBsFQFGRBgCxE+1XXgxtYjjRNt5TaWuIMVhB8dwbqZvS3e281CCEt/4PmubmgXgsZcVl+s7ldrFW3ZfF2MyhWay1nwyzPnwzqtZDBJRI/puj3LLPnEZxbmIdmmkHV2wJL1SpmS8s+mdTfrx167LG/BHXb+qN//PTn55ZnZz/kU6QAkY9B5DlQt0Gq4WF1iwdXBACMHTz43cknjv0oKG/rTZLDg5/QVfVavVRaSzYIwZoXuJ0xPHHXa+2IADokavump8sD42MPSP1Zrd3z2xUDd+6ZkbLZBzs97xq2/fPEiSSjG8dLc3Oft3R9ex6dbwDJoQE1u2vX9w88/vgPu+ltKIY99/LLPDHsZyzL/KhjO9HcJrsFYHn2BicKJ/YfOfKn93suO9jBDj54+D8Nvem8zfc0vgAAAABJRU5ErkJggg=="/> Most of these SVGs are just wrapping PNGs. That is not the same quality as the original PDFs. I will see if I can convert them here.
I have all the PDFs converted. Will post a patch soon.
I am running into an issue with SVG and canvas. "Unable to get image data from canvas because the canvas has been tainted by cross-origin data."
This likely happens because WebCore::SVGImage does not have virtual bool hasSingleSecurityOrigin() const { return true; }, and PDFDocumentImage does. If hasSingleSecurityOrigin() does not return true the canvas will be tainted.
Yep, adding hasSingleSecurityOrigin() to return true makes it work. But that certainly can't land. I filed a blocking bug 119492.
Created attachment 208211 [details] Patch
Comment on attachment 208211 [details] Patch rs=me
Landed the first part of this in http://trac.webkit.org/changeset/153761. The rest (42 PDFs) is still blocked on bug 119492.
Created attachment 208293 [details] Patch
Comment on attachment 208293 [details] Patch r=me
r153894