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.
<rdar://problem/26133763>
Created attachment 278791 [details] [PATCH] Proposed Fix
Comment on attachment 278791 [details] [PATCH] Proposed Fix Clearing flags on attachment: 278791 Committed r200806: <http://trac.webkit.org/changeset/200806>
All reviewed patches have been landed. Closing bug.
*** Bug 159066 has been marked as a duplicate of this bug. ***