RESOLVED FIXED 157650
REGRESSION: Web Inspector: Fails to load sourceMappingURL with relative URL
https://bugs.webkit.org/show_bug.cgi?id=157650
Summary REGRESSION: Web Inspector: Fails to load sourceMappingURL with relative URL
Joseph Pecoraro
Reported 2016-05-12 17:43:27 PDT
Created attachment 278789 [details] [TEST] Test Case * SUMMARY Fails to load sourceMappingURL with relative URL. * TEST - index.html - assets/ - style.css - style.css.map Inside: style.css /*# sourceMappingURL=assets/style.css.map */ * STEPS TO REPRODUCE 1. Inspect index.html 2. Show Resources 3. Reload => Source Map failed to load => Error shows wrong URL "/style.css.map" instead of "/assets/style.css.map" * NOTES Spec says the sourceMappingURL should be resolved relative to the resource it is in: <https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit> > When the source mapping URL is not absolute, then it is relative to the generated > code’s “source origin”. The source origin is determined by one of the following cases: > If the generated source is not associated with a script element that has a “src” attribute > and there exists a //# sourceURL comment in the generated code, that comment should be used > to determine the source origin. Note: Previously, this was “//@ sourceURL”, as with > “//@ sourceMappingURL”, it is reasonable to accept both but //# is preferred. > > If the generated code is associated with a script element and the script element has a > “src” attribute, the “src” attribute of the script element will be the source origin. > > If the generated code is associated with a script element and the script element does > not have a “src” attribute, then the source origin will be the page’s origin. > > If the generated code is being evaluated as a string with the eval() function or via > new Function(), then the source origin will be the page’s origin.
Attachments
[TEST] Test Case (3.45 KB, application/zip)
2016-05-12 17:43 PDT, Joseph Pecoraro
no flags
[PATCH] Proposed Fix (2.27 KB, patch)
2016-05-12 17:52 PDT, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 2016-05-12 17:43:46 PDT
Joseph Pecoraro
Comment 2 2016-05-12 17:52:05 PDT
Created attachment 278791 [details] [PATCH] Proposed Fix
WebKit Commit Bot
Comment 3 2016-05-12 18:23:59 PDT
Comment on attachment 278791 [details] [PATCH] Proposed Fix Clearing flags on attachment: 278791 Committed r200806: <http://trac.webkit.org/changeset/200806>
WebKit Commit Bot
Comment 4 2016-05-12 18:24:02 PDT
All reviewed patches have been landed. Closing bug.
Joseph Pecoraro
Comment 5 2016-06-23 13:02:25 PDT
*** Bug 159066 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.