RESOLVED FIXED 171594
Script modules should be able to import data urls
https://bugs.webkit.org/show_bug.cgi?id=171594
Summary Script modules should be able to import data urls
Jake Archibald
Reported 2017-05-03 02:25:06 PDT
https://cdn.rawgit.com/jakearchibald/19cf3faecce9cba95a9a38105a00cc73/raw/387959fb7ac42355166e606579b5bac0606449e6/ This page imports a data URL script, but WebKit doesn't execute it, it suggests it's failed a CORS check.
Attachments
Patch (6.79 KB, patch)
2017-06-03 03:53 PDT, Yusuke Suzuki
no flags
Archive of layout-test-results from ews101 for mac-elcapitan (1005.28 KB, application/zip)
2017-06-03 04:50 PDT, Build Bot
no flags
Archive of layout-test-results from ews104 for mac-elcapitan-wk2 (1.08 MB, application/zip)
2017-06-03 04:57 PDT, Build Bot
no flags
Archive of layout-test-results from ews124 for ios-simulator-wk2 (941.08 KB, application/zip)
2017-06-03 05:20 PDT, Build Bot
no flags
Archive of layout-test-results from ews115 for mac-elcapitan (1.77 MB, application/zip)
2017-06-03 05:23 PDT, Build Bot
no flags
Patch (12.26 KB, patch)
2017-06-03 05:55 PDT, Yusuke Suzuki
no flags
Archive of layout-test-results from ews102 for mac-elcapitan (975.26 KB, application/zip)
2017-06-03 06:53 PDT, Build Bot
no flags
Archive of layout-test-results from ews104 for mac-elcapitan-wk2 (1.06 MB, application/zip)
2017-06-03 06:59 PDT, Build Bot
no flags
Patch (13.28 KB, patch)
2017-06-03 07:00 PDT, Yusuke Suzuki
no flags
Jake Archibald
Comment 1 2017-05-03 03:33:32 PDT
<script type="module" src="data:application/javascript;"> seems to fail a CORS check too.
Yusuke Suzuki
Comment 2 2017-06-02 07:58:14 PDT
We should set `options.sameOriginDataURLFlag = SameOriginDataURLFlag::Set` for requests for modules. Classic script's request also should have this flag. At that time, we should add a FIXME to it to note that this sameOriginDataURLFlag is removed once we change data URL handling according to https://github.com/whatwg/fetch/issues/381.
Yusuke Suzuki
Comment 3 2017-06-03 03:53:31 PDT Comment hidden (obsolete)
Build Bot
Comment 4 2017-06-03 04:50:53 PDT Comment hidden (obsolete)
Build Bot
Comment 5 2017-06-03 04:50:55 PDT Comment hidden (obsolete)
Build Bot
Comment 6 2017-06-03 04:57:35 PDT Comment hidden (obsolete)
Build Bot
Comment 7 2017-06-03 04:57:36 PDT Comment hidden (obsolete)
Build Bot
Comment 8 2017-06-03 05:20:05 PDT Comment hidden (obsolete)
Build Bot
Comment 9 2017-06-03 05:20:07 PDT Comment hidden (obsolete)
Build Bot
Comment 10 2017-06-03 05:23:04 PDT Comment hidden (obsolete)
Build Bot
Comment 11 2017-06-03 05:23:06 PDT Comment hidden (obsolete)
Yusuke Suzuki
Comment 12 2017-06-03 05:55:41 PDT
Build Bot
Comment 13 2017-06-03 06:53:02 PDT Comment hidden (obsolete)
Build Bot
Comment 14 2017-06-03 06:53:03 PDT Comment hidden (obsolete)
Build Bot
Comment 15 2017-06-03 06:59:01 PDT Comment hidden (obsolete)
Build Bot
Comment 16 2017-06-03 06:59:03 PDT Comment hidden (obsolete)
Yusuke Suzuki
Comment 17 2017-06-03 07:00:48 PDT
youenn fablet
Comment 18 2017-06-03 08:47:57 PDT
Comment on attachment 311924 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=311924&action=review > Source/WebCore/ChangeLog:11 > + Script tag resources should have SameOriginDataURLFlag::Set to load data URLs This is ok. We should also try to kill SameOriginDataURLFlag.
Yusuke Suzuki
Comment 19 2017-06-03 09:02:18 PDT
Comment on attachment 311924 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=311924&action=review Thanks! >> Source/WebCore/ChangeLog:11 >> + Script tag resources should have SameOriginDataURLFlag::Set to load data URLs > > This is ok. > We should also try to kill SameOriginDataURLFlag. Yeah, this flag is now removed from the spec :)
WebKit Commit Bot
Comment 20 2017-06-03 09:31:17 PDT
Comment on attachment 311924 [details] Patch Clearing flags on attachment: 311924 Committed r217760: <http://trac.webkit.org/changeset/217760>
WebKit Commit Bot
Comment 21 2017-06-03 09:31:19 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.