Bug 156368 - REGRESSION (r194898): Multi download of external SVG defs file by <use> xlinks:href (caching)
Summary: REGRESSION (r194898): Multi download of external SVG defs file by <use> xlink...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: Safari 9
Hardware: All All
: P2 Major
Assignee: Antti Koivisto
URL: http://www.hexanet.com/test/webkit-sv...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-04-07 14:42 PDT by hexalys
Modified: 2016-06-28 19:29 PDT (History)
15 users (show)

See Also:


Attachments
Sample network pane view of multi download on cold cache (135.88 KB, image/png)
2016-04-07 14:42 PDT, hexalys
no flags Details
patch (79.58 KB, patch)
2016-04-22 06:19 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (13.72 KB, patch)
2016-04-22 06:23 PDT, Antti Koivisto
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description hexalys 2016-04-07 14:42:43 PDT
Created attachment 275939 [details]
Sample network pane view of multi download on cold cache

You can notice this bug while looking at the Network panel in the Web Inspector on latest Safari 9 or Nightly. The SVG file is requested 5 times for 5 different fragment identifiers. It appears to be a Safari 9.3 regression. I am not seeing the problem on a 9.2 Simulator or older QtWebkit(s).

See URL for repro and snapshot.
Comment 1 Radar WebKit Bug Importer 2016-04-07 14:52:31 PDT
<rdar://problem/25611746>
Comment 2 bjankord 2016-04-21 12:21:11 PDT
I am seeing this issue in Safari 9.1 and Mobile Safari 9.3 on iOS
Comment 3 Lionel 2016-04-21 12:40:00 PDT
Seems to be a 9^ regression, since I have the same behaviour in 9.1 (OSX 10.11.4) but not in Safari 8.0.2 (OSX 10.10.1).
Comment 4 Timothy Hatcher 2016-04-21 12:57:05 PDT
Another test case here: https://github.com/martinwolf/safari-9-svg-external-content-bug
Comment 6 Simon Fraser (smfr) 2016-04-21 16:06:57 PDT
Regressed in http://trac.webkit.org/changeset/194898

rdar://problem/25572061
Comment 7 Antti Koivisto 2016-04-22 06:19:58 PDT
Created attachment 277056 [details]
patch
Comment 8 Antti Koivisto 2016-04-22 06:23:48 PDT
Created attachment 277057 [details]
patch
Comment 9 Stephanie (Sullivan) Rewis 2016-04-22 07:44:07 PDT
This is pretty huge since our design system uses large sprites of our icons and the way they're currently downloading every time is a very big problem. I hope this will be prioritized and fixed quickly.
Comment 10 Simon Fraser (smfr) 2016-04-22 10:15:20 PDT
Comment on attachment 277057 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=277057&action=review

> Source/WebCore/loader/TextResourceDecoder.h:55
> +    bool hasEqualEncodingForCharset(const String& charset) const;

'charset' argument name can be removed.

> LayoutTests/ChangeLog:16
> +        * platform/mac/fast/frames/frame-set-scaling-3d-expected.png:
> +        * platform/mac/fast/frames/frame-set-scaling-centered-expected.png:
> +        * platform/mac/fast/frames/frame-set-scaling-expected.png:
> +        * platform/mac/fast/frames/frame-set-scaling-rotate-expected.png:
> +        * platform/mac/fast/frames/frame-set-scaling-skew-expected.png:

I don't think you meant to include these in the changelog.
Comment 11 Antti Koivisto 2016-04-22 10:37:21 PDT
https://trac.webkit.org/r199881
Comment 12 Elliot Geno 2016-04-29 19:54:15 PDT
I think I found an additional bug... No SVGs are caching with an object tag: https://dl.dropboxusercontent.com/u/1256960/%20Research/JS/SVG_Parameters/dotObjectBug.html
Comment 13 Brady Eidson 2016-04-29 20:26:14 PDT
(In reply to comment #12)
> I think I found an additional bug... No SVGs are caching with an object tag:
> https://dl.dropboxusercontent.com/u/1256960/%20Research/JS/SVG_Parameters/
> dotObjectBug.html

That sounds like a related but different bug.

Could you file a new one to track it?
Comment 14 hexalys 2016-06-28 19:29:41 PDT
(In reply to comment #13)
> (In reply to comment #12)
> > I think I found an additional bug... No SVGs are caching with an object tag:
> > https://dl.dropboxusercontent.com/u/1256960/%20Research/JS/SVG_Parameters/
> > dotObjectBug.html
> 
> That sounds like a related but different bug.
> 
> Could you file a new one to track it?

I believe that is already a bug for this:
https://bugs.webkit.org/show_bug.cgi?id=106180

But I don't see a caching issue <object data=".svg"> in 202569.