[Webkit-unassigned] [Bug 68090] SVG as image uses very tiny default font-size

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 15 00:52:40 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=68090





--- Comment #6 from Nikolas Zimmermann <zimmermann at kde.org>  2011-12-15 00:52:40 PST ---
(In reply to comment #3)
> Cached resources may be shared between documents that have different settings. It seems very wrong to arbitrarily let the first document requesting the image to be the one determining its default font size.

That's true. But the common case is that a resources is shared between documents with the same settings (in eg. a regular browsing session).

Fixing that properly would involve marking CachedResources as "unique", to avoid to share it with another document. I worked on this during the early SVGImage-size-negotiation patches, and even had a patch for this. Though it's complex to get it right. I only implemented a simple logic, you could mark one resource as unique, and then the next time that resource was requested, it had to be reloaded from the wire. This is bad.

A correct design would allow us to, check whether a CachedResource should be unique or not, but at the point when the same resource is requested a 2nd time. Using the type of resources, say we know it's a SVGImage, we can then determine whether its okay to share these resources, or not.
That still wouldn't handle dynamic changes, eg. by changing the default font size from Safari. That would involve checking all resources, eg:

If two documents a.html / b.html share foo.svg, with the same min. font-size of 16, and you'd change a.htmls font-size to 14, then a new CachedResource would need to appear, that corresponds to a SVGImage with the different Settings object. (It's not necessary to actually create two CachedResources, one could invent another cache of SVGImage-by-Settings, inside of it, similar to how its done with SVGImageCache).

Anyhow, I'm just brainstorming, and wanted to note that the "real issue" is hard to fix.
This "workaround" will catch most common cases though, and fixes a real problem, that now hits us badly.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list