Set document.URL (location) to url of active document when navigation started for javascript:-generated documents per HTML5 (Nested javascript: iframe doesn't load, runs into nesting limit for frames with same URL)
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox74 | --- | fixed |
People
(Reporter: i.cyberface, Assigned: bzbarsky)
References
()
Details
(Keywords: dev-doc-complete, Whiteboard: DUPEME?, [wptsync upstream])
Attachments
(6 files, 1 obsolete file)
1.61 KB,
text/html
|
Details | |
59 bytes,
text/x-review-board-request
|
bzbarsky
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
bzbarsky
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
bzbarsky
:
review+
|
Details |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
Comment 1•12 years ago
|
||
Comment 2•12 years ago
|
||
Updated•10 years ago
|
Assignee | ||
Comment 3•10 years ago
|
||
Comment 4•10 years ago
|
||
Updated•10 years ago
|
Comment 5•10 years ago
|
||
Updated•10 years ago
|
Updated•10 years ago
|
Assignee | ||
Comment 6•10 years ago
|
||
Comment 7•10 years ago
|
||
Assignee | ||
Comment 8•10 years ago
|
||
Comment 9•10 years ago
|
||
Assignee | ||
Comment 10•10 years ago
|
||
Comment 11•10 years ago
|
||
Comment 12•10 years ago
|
||
Assignee | ||
Comment 13•10 years ago
|
||
Comment 14•10 years ago
|
||
Assignee | ||
Comment 15•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Comment 16•10 years ago
|
||
Updated•8 years ago
|
Updated•8 years ago
|
Updated•8 years ago
|
Assignee | ||
Comment 19•8 years ago
|
||
Comment 20•8 years ago
|
||
Comment 21•7 years ago
|
||
Comment 22•7 years ago
|
||
Comment 23•7 years ago
|
||
Assignee | ||
Comment 24•7 years ago
|
||
Assignee | ||
Comment 25•7 years ago
|
||
Comment 26•7 years ago
|
||
Assignee | ||
Comment 27•7 years ago
|
||
Comment 28•7 years ago
|
||
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Updated•7 years ago
|
Assignee | ||
Comment 32•7 years ago
|
||
mozreview-review |
Assignee | ||
Comment 33•7 years ago
|
||
mozreview-review |
Assignee | ||
Comment 34•7 years ago
|
||
mozreview-review-reply |
Assignee | ||
Comment 35•7 years ago
|
||
mozreview-review |
Updated•7 years ago
|
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 42•7 years ago
|
||
mozreview-review-reply |
Comment 43•7 years ago
|
||
mozreview-review-reply |
Comment 44•7 years ago
|
||
mozreview-review-reply |
Assignee | ||
Comment 45•7 years ago
|
||
Assignee | ||
Comment 46•7 years ago
|
||
mozreview-review |
Assignee | ||
Comment 47•7 years ago
|
||
mozreview-review |
Assignee | ||
Comment 48•7 years ago
|
||
Comment 49•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Assignee | ||
Comment 51•7 years ago
|
||
Comment 52•7 years ago
|
||
Comment 54•6 years ago
|
||
Comment 55•6 years ago
|
||
Assignee | ||
Comment 56•5 years ago
|
||
Assignee | ||
Comment 57•5 years ago
|
||
Some notes about the changes:
Both test_bug384014.html and test_bug123696.html were testing reloading of
javascript: URI. The expected result of the iframes after reloading would
become about:blank. I deleted both file and instead wrote with
web-platform-test to cover reloading of javascript: URI since wpt is more
preferable.
storage-cache-error.html was utilizing javascript: URI to test bug 1262766.
javascript: URI would cause CacheStorage::Keys throw a dom security exception
as it's null principal. With my patches the iframe's URL would no longer be
the javascript: URI, so it's no longer applicable for the test case. Instead we
can test what bug 1262766 was originally about - that CacheStorage::Keys would
throw a dom security exception if it's in a private browsing window.
Comment 58•5 years ago
|
||
Comment 61•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a7ec30cb5c9c
https://hg.mozilla.org/mozilla-central/rev/68447a9ccb6a
Assignee | ||
Comment 64•5 years ago
|
||
Eric, was comment 63 supposed to go on a different bug?
Comment 65•5 years ago
|
||
Yep. Not sure how that happened. Thanks for catching it.
Updated•5 years ago
|
Comment 66•5 years ago
|
||
Would the following be a reasonable summary of the changes as applied to documentation?
- This is a bug fix that only needs to be mentioned in release notes/Fx74 for developers, rather than requiring other documentation changes.
- Would it be correct to state this in that page as "When loading and executing a script using the javascript: URL scheme, the script's principal is now correctly initialized to be the active document's URI, regardless of document nesting depth" or something similar?
Assignee | ||
Comment 67•5 years ago
|
||
This is a bug fix that only needs to be mentioned in release notes/Fx74 for developers, rather than requiring other documentation changes.
That depends on whether anything documented the URL of "javascript:" result documents....
Would it be correct to state this in that page as
That's not an accurate description of the change. The change concerns the case when you evaluate a "javascript:" URL and the resulting value is a string. In that case, that string is parsed to create an HTML document. The URL of that document used to be the "javascript:" URL that returned the string, but in this bug that was changed to the URL of the document that the "javascript:" URL was evaluated in. The only change is what the URL is; there are no changes to principals (origins) involved.
Comment 68•5 years ago
|
||
Wow - I'm glad I asked. I never in a million years would have gotten that from anything said in these comments or by reading the code. I mean, maybe if I'd spent a month or two reading the code I'd have figured it out, but that's not the kind of time I could have given it. Glad I asked. :)
I have now added a note to Firefox 74 for developers that reads as follows:
When a JavaScript URL (
javascript:
) is evaluated and the result is a string, this string is parsed to create an HTML document, which is then presented. Previously, this document's URL (as reported by thedocument.location
property, for example) was the originatingjavascript:
URL; it is now correctly the URL of the originating document (bug 836567).
After substantial searching, I've found nowhere else that gets into these URLs in any real depth, so this should be all that's needed for this bug. Marking it as documentation complete; please let me know if this is unsatisfactory, or feel free to update the text yourself.
Updated•5 years ago
|
Assignee | ||
Comment 69•5 years ago
|
||
Perfect, thank you! I made a minor tweak to the "originating document" bit, but otherwise looks good. And thank you for checking for other docs on this!
Description
•