Boris Zbarsky <firstname.lastname@example.org> has asked Johnny Stenback
<email@example.com> for superreview:
an unwanted new window [link with TARGET and onClick=window.open]
Attachment 172585: Patch
------- Additional Comments from Boris Zbarsky <firstname.lastname@example.org>
This basically backs out the "fix" for bug 135811. Now I can't figure out how
finding targets outside our window for subframes _ever_ worked after the fix
for that bug.... jst, any idea?
In any case, what happens is that the subframe asks its parent to look, the
parent doesn't find the target amongst its kids, but has the same tree owner as
aRequestor (the kid), so doesn't ask the treeowner either. So the named target
is never found. Before the patch for bug 103638, we had basically the same
code here, which is why I don't understand how it worked... :( I'd really like
to, if someone can explain it to me.
In any case, this patch also adds code to our treeowners to ensure the
invariant that the treeowner is the requestor only for calls to the root
docshell of type. This should make sure bug 135811 does not reappear.
I didn't change nsDocShellTreeOwner.cpp because I'm still trying to figure out
how that one works, exactly. It'll probably be the subject of bug 278916.