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 <da...@apple.com> 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 > webkit-dev@lists.webkit.org > http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev >
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev