Bug 67087

Summary: Prepare SVG image intrinsic size negotiation: Stop sharing SVGImages
Product: WebKit Reporter: Nikolas Zimmermann <zimmermann>
Component: SVGAssignee: Nikolas Zimmermann <zimmermann>
Status: RESOLVED INVALID    
Severity: Normal CC: ap, dglazkov, gavinp, japhet, koivisto, krit, tonyg, webkit.review.bot, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 47156    
Attachments:
Description Flags
Patch
webkit.review.bot: commit-queue-
Patch v2
none
Patch v3
none
Patch v4 none

Nikolas Zimmermann
Reported 2011-08-27 01:22:10 PDT
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.
Attachments
Patch (14.07 KB, patch)
2011-08-27 02:33 PDT, Nikolas Zimmermann
webkit.review.bot: commit-queue-
Patch v2 (13.98 KB, patch)
2011-08-30 01:58 PDT, Nikolas Zimmermann
no flags
Patch v3 (14.02 KB, patch)
2011-08-30 02:17 PDT, Nikolas Zimmermann
no flags
Patch v4 (14.73 KB, patch)
2011-08-30 02:58 PDT, Nikolas Zimmermann
no flags
Nikolas Zimmermann
Comment 1 2011-08-27 02:33:30 PDT
WebKit Review Bot
Comment 2 2011-08-27 03:13:41 PDT
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
Nikolas Zimmermann
Comment 3 2011-08-30 01:58:53 PDT
Created attachment 105595 [details] Patch v2 Fix regressions, should now pass cr-linux-ews again.
Nikolas Zimmermann
Comment 4 2011-08-30 02:00:31 PDT
Comment on attachment 105595 [details] Patch v2 Oops, uploaded wrong version.
Nikolas Zimmermann
Comment 5 2011-08-30 02:17:05 PDT
Created attachment 105601 [details] Patch v3
Nikolas Zimmermann
Comment 6 2011-08-30 02:58:08 PDT
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.
Dirk Schulze
Comment 7 2011-08-30 09:07:47 PDT
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
Alexey Proskuryakov
Comment 8 2011-08-31 17:13:10 PDT
CC'ing some experts, this is probably for Antti to review.
Antti Koivisto
Comment 9 2011-09-06 03:07:07 PDT
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.
Antti Koivisto
Comment 10 2011-09-06 03:09:26 PDT
s/interoperation/interpretation/
Nikolas Zimmermann
Comment 11 2011-10-05 06:38:35 PDT
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.
Note You need to log in before you can comment on or make changes to this bug.