At the time when we introduced DOMWindow::securityOrigin, there was a situation where we needed to know the security origin of something but the document wasn't available. Hopefully that reason has disappeared and we can remove DOMWindow::securityOrigin.
Adam On Tue, Dec 7, 2010 at 12:16 PM, Sam Weinig <[email protected]> wrote: > It is for historical reasons that both have an origin. The idea was that we > were going to move the DOMWindow to be owned by the Document, and when that > was done, remove the DOMWindow's origin. I seem to remember there being a > theoretical time when the two could differ, but looking > at DocumentWriter::begin() now, it seems like we always set both to the same > value. I still think the re-factor to make Document own DOMWindow would > make this much clearer. > -Sam > On Tue, Dec 7, 2010 at 11:53 AM, Darin Adler <[email protected]> wrote: >> >> Why does both a DOMWindow and a Document hold a securityOrigin? Is there a >> way we can get rid of one or the other? Are the two equivalent, or is there >> a difference? Is there a time when it’s correct to do >> frame->domWindow()->securityOrigin() and incorrect to do >> frame->document()->securityOrigin(), or vice versa? >> >> -- Darin >> >> _______________________________________________ >> webkit-dev mailing list >> [email protected] >> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev > > > _______________________________________________ > webkit-dev mailing list > [email protected] > http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev > > _______________________________________________ webkit-dev mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

