Prepare SVG image intrinsic size negotiation: Stop sharing SVGImages. This is needed as SVG image will soon depend on the place where its used. Size negotiation has to be implemented for border-image/mask-image/background-image/html:img/svg:image. This is all done already, I'm splitting up my master patch into smaller pieces, this is part one.
Created attachment 105433 [details] Patch
Comment on attachment 105433 [details] Patch Attachment 105433 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/9547407 New failing tests: http/tests/security/canvas-remote-read-remote-image-blocked-then-allowed.html http/tests/inspector/network/network-cachedresources-with-same-urls.html
Created attachment 105595 [details] Patch v2 Fix regressions, should now pass cr-linux-ews again.
Comment on attachment 105595 [details] Patch v2 Oops, uploaded wrong version.
Created attachment 105601 [details] Patch v3
Created attachment 105604 [details] Patch v4 Heh, Patch v3 still contained a missing change to RenderImage.cpp, sorry for the patch spam. This time I got merging everything right.
The patch looks sane to me. But I'd suggest that you ask someone with more experiences in CachedResources. The sentence about the "less dangerous way" scares me :P
CC'ing some experts, this is probably for Antti to review.
Why is this needed in the first place? Isn't SVG scaling just a paint/hit test time transform? Anyway, I don't think this is the right way to go. Repeatedly re-requesting a resource from network so we can render it in different sizes is not good and we shouldn't complicate the cache code further by introducing the strange concept of "unique cached resource". Eventually we probably want to separate the cache storage layer (which holds the bits) and the interoperation layer (the decoded forms of the resource). That would make things easier here too. For now, if you need to cache SVG trees in multiple sizes then that's exactly what you should do. HashMap<IntSize, SVGImage> and all that.
s/interoperation/interpretation/
As discussed with Antti, this approach is bad - I've come up with a new concept, that's going to be discussed in a new bug report, see bug 69416.