Implement document.origin
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
People
(Reporter: annevk, Assigned: bzbarsky)
References
Details
(Keywords: dev-doc-needed)
Attachments
(3 files, 3 obsolete files)
4.11 KB,
patch
|
Details | Diff | Splinter Review | |
12.11 KB,
patch
|
Details | Diff | Splinter Review | |
14.89 KB,
patch
|
Details | Diff | Splinter Review |
Reporter | ||
Updated•11 years ago
|
Comment 1•11 years ago
|
||
Not sure where to affix a test so left that out for now.
Comment 2•11 years ago
|
||
The best place for a test should be somewhere in imptests where we have the tests for specs, it is still a bit tricky to submit such tests to github and then get them to be updated in our tree, so mochitest in content/base/ or dom/tests should be ok.
Comment 3•11 years ago
|
||
Comment on attachment 824203 [details] [diff] [review] Impl Doesn't seem to do what the spec says http://dom.spec.whatwg.org/#dom-document-origin http://www.whatwg.org/specs/web-apps/current-work/multipage/origin-0.html#origin
Comment 4•11 years ago
|
||
> Doesn't seem to do what the spec says drat! You're right! > http://dom.spec.whatwg.org/#dom-document-origin > http://www.whatwg.org/specs/web-apps/current-work/multipage/origin-0. > html#origin
Updated•10 years ago
|
Assignee | ||
Comment 5•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Comment 6•9 years ago
|
||
Comment on attachment 8530870 [details] [diff] [review] Implement document.origin >+ void GetOrigin(nsString& retval) const; Nit, (should fix also other case, but) aRetVal >+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=931884">Mozilla Bug 931884</a> >+<p id="display"> >+ <iframe></iframe> >+ <iframe id="blob-test"></iframe> <!-- will get blob: URI --> >+ <iframe src="data:text/html,Data"></iframe> >+ <iframe src="javascript:'javascript'"></iframe> >+ <iframe src="http://test1.mochi.test:8888/tests/dom/base/test/file_document_origin.html"></iframe> >+ <iframe src="http://sub1.xn--lt-uia.example.org:8000/tests/dom/base/test/file_document_origin.html"></iframe> I think we really should have tests for sandboxed stuff and srcdoc too.
Assignee | ||
Comment 7•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Assignee | ||
Comment 8•9 years ago
|
||
Updated•9 years ago
|
Assignee | ||
Comment 10•9 years ago
|
||
The status is that people were not happy with the spec for this when I posted an intent to implement, because document.origin is window-only, self.origin is worker-only, and the thing both contexts have is location.origin which is a completely nonsensical thing. So there was a lot of discussion about moving .origin to somewhere other than document (self?) for the window case... and then nothing happened. Anne, what's the story here? Seems like the spec still basically specs the thing which will cause everyone to write code that uses location.origin...
Reporter | ||
Comment 11•9 years ago
|
||
Chrome implements document.origin. We could make it self.origin instead I suppose if we can convince Chrome that is worth the churn. Making location.origin magical still seems like a bad solution to me. Trying to get rid of location.origin also seems like something that is unlikely to succeed, but we could try?
Assignee | ||
Comment 12•9 years ago
|
||
I think we should probably just do self.origin (in both window and worker) _and_ document.origin, give up on location.origin and just steer people away from it, and move on. The other question is whether we need to make any of these origin attributes on window/document/workerglobalscope unforgeable.
Reporter | ||
Comment 13•9 years ago
|
||
Sounds fine to me. I filed https://www.w3.org/Bugs/Public/show_bug.cgi?id=28801 on adding self.origin to HTML.
Assignee | ||
Comment 14•7 years ago
|
||
Assignee | ||
Comment 15•7 years ago
|
||
I rebased this on top of bug 1306170, because I figure we want that one for sure, but aren't sure about this one.
Assignee | ||
Comment 16•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Assignee | ||
Comment 17•7 years ago
|
||
Blink just sent an intent to deprecate: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/CO52Bt15cuc so going to hold off on this for now.
Updated•6 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 18•4 years ago
|
||
This is gone from the spec and unshipped in Chrome and Safari.
Resolving bug as invalid removed the following wpt triage data: /dom/idlharness.window.html?exclude=Node subtest: Document interface: attribute origin subtest: Document interface: xmlDoc must inherit property "origin" with the proper type (3) subtest: Document interface: new Document() must inherit property "origin" with the proper type (3)
Assignee | ||
Comment 20•4 years ago
|
||
James, I'm not sure what comment 19 is saying. Presumably at some point we were tracking the WPT failures from not implementing document.origin, but that should have stopped failing back when https://github.com/web-platform-tests/wpt/pull/21055 got merged in and then https://hg.mozilla.org/mozilla-central/diff/8cdbc2ef524268d720bb6e1dfded1724a72a0b95/testing/web-platform/meta/dom/idlharness.window.js.ini removed the annotations, no?
Comment 21•4 years ago
|
||
These are the annotations in the shared metadata repo that's used in wpt.fyi and by the sync bot, not the annotations in the the ini files, although I copied the ini annotations into the external system at some point.
There's a consistency problem where we don't remove annotations when tests stop failing, so we might have a bug associated with a test that actually now passes. The above bot is part of trying to fix that issue by at least making sure we don't have bugs that are marked as invalid or duplicate associated with tests.
(note: we're actually currently running the bot against a fork of the metadata repo, pending some changes in the backend, so you can't actually see this change there; instead it's in my fork at https://github.com/jgraham/wpt-metadata/commit/84fcc5e11e69e7ff769855a4f15d6e1bef6d87c5 )
Does that help?
Assignee | ||
Comment 22•4 years ago
|
||
Yep, thank you!
Description
•