Closed
Bug 949413
Opened 11 years ago
Closed 8 years ago
location.assign and location.replace ignore the document base URI and use the document URI as the base instead
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: sideshowbarker, Assigned: farre, Mentored)
References
()
Details
(Whiteboard: [lang=c++][tw-dom])
Attachments
(1 file)
See the test case at http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/001.html Hixie says per spec the expected result is that the iframe ends up showing the text "inner base used for resolution", which is the result that Chrome and Safari give. But in Firefox the result is "inner address used for resolution". * The source of 001.html has this: <base href="http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/outer-base/"> <body onload="frames[0].location = 'javascript:location.assign("test.txt")'"> <iframe src="http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/inner-address/inner.html"></iframe> * The source of http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/inner-address/inner.html has this: <base href="http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/inner-base/"> <p>Fail * The contents of http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/inner-address/test.txt are "inner address used for resolution". * The contents of http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/inner-base/test.txt are "inner base used for resolution".
Comment 1•11 years ago
|
||
Look like assign() and replace() both use the location URI as the base. Compare the href setter, which does something quite different. I don't know why the difference is there, exactly, but it seems fishy. The javascript: bit is a total red herring in this case; it's a pure Location issue.
Summary: resolving URL in some_iframe.location = javascript:location.assign("foo.txt") ignores iframe doc's base element → location.assign and location.replace ignore the document base URI and use the document URI as the base instead
Whiteboard: [mentor=bz][lang=c++]
Comment 2•10 years ago
|
||
I would like to give this bug a try, can someone assign me to it?
Updated•10 years ago
|
Assignee: nobody → badescunicu
Comment 3•10 years ago
|
||
I am very sorry, I can't finish this bug in a decent amount of time. Maybe someone can resolve it faster, so I have removed myself from the assignee list.
Assignee: badescunicu → nobody
Updated•10 years ago
|
Mentor: bzbarsky
Whiteboard: [mentor=bz][lang=c++] → [lang=c++]
Comment 4•10 years ago
|
||
Boris do you have any tips on how should I start with this bug?
Comment 5•10 years ago
|
||
I would like to work on this bug. I have built the mozilla-central source. Can anyone assign this to me please ?
Comment 6•10 years ago
|
||
Thanks for looking at this. Let us know if you encounter any problems.
Assignee: nobody → jacksonisaac2008
Comment 8•9 years ago
|
||
@jdm Sorry, was busy with academics. I am building mozilla again, so maybe you can assign it to nobody so that someone else can work on it. If no one takes it I will give it a try after my build is done.
Flags: needinfo?(jacksonisaac2008)
Updated•8 years ago
|
Assignee: jacksonisaac2008 → nobody
Updated•8 years ago
|
Whiteboard: [lang=c++] → [lang=c++][tw-dom]
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → afarre
Assignee | ||
Comment 9•8 years ago
|
||
Location.replace actually already does this. It's only assign that's not doing it.
Assignee | ||
Comment 10•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/46459/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/46459/
Attachment #8741398 -
Flags: review?(bzbarsky)
Comment 11•8 years ago
|
||
Comment on attachment 8741398 [details] MozReview Request: Bug 949413 - Set href with context in Location.assign r?bz https://reviewboard.mozilla.org/r/46459/#review43007 The tests here should be web platform tests, not mochitests. r=me with that.
Attachment #8741398 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 12•8 years ago
|
||
Comment on attachment 8741398 [details] MozReview Request: Bug 949413 - Set href with context in Location.assign r?bz Review request updated; see interdiff: https://reviewboard.mozilla.org/r/46459/diff/1-2/
Assignee | ||
Comment 13•8 years ago
|
||
Pushed it to a new review, how do I close the old one?
Assignee | ||
Comment 14•8 years ago
|
||
Oh, it didn't create a new review, it updated the old one. I'm starting to really like mozreview :)
Comment 15•8 years ago
|
||
Note that mozreview decides to carry over an r+ by default, so if you want me to look at the patch you should probably let me know (e.g. by requesting review directly in bugzilla)...
Assignee | ||
Comment 16•8 years ago
|
||
Right. I had to re-write the test case when I moved it over to web-platform so I guess if you could just check that I didn't mess it up I'd be glad. Is there a process for requesting reviews in bugzilla or do I just do it in the comments?
Comment 17•8 years ago
|
||
You click the "Details" link on the attachment, and in the resulting view under "Flags" change the "review" combobox to "?" and put in who you're requesting review from.
Assignee | ||
Updated•8 years ago
|
Attachment #8741398 -
Flags: review+ → review?(bzbarsky)
Comment 18•8 years ago
|
||
Comment on attachment 8741398 [details] MozReview Request: Bug 949413 - Set href with context in Location.assign r?bz https://reviewboard.mozilla.org/r/46459/#review43377 r=me
Attachment #8741398 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 19•8 years ago
|
||
Comment on attachment 8741398 [details] MozReview Request: Bug 949413 - Set href with context in Location.assign r?bz Review request updated; see interdiff: https://reviewboard.mozilla.org/r/46459/diff/2-3/
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 20•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7530958aa148
Comment 21•8 years ago
|
||
Instead of the "expected: PASS" thing, you should just remove the relevant entry from the .ini file.
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 22•8 years ago
|
||
Comment on attachment 8741398 [details] MozReview Request: Bug 949413 - Set href with context in Location.assign r?bz Review request updated; see interdiff: https://reviewboard.mozilla.org/r/46459/diff/3-4/
Assignee | ||
Comment 23•8 years ago
|
||
Thanks, fixed that!
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 24•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/e3a467fdf81a
Keywords: checkin-needed
Comment 25•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e3a467fdf81a
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•