Commit 265b0ff1 authored by jst%mozilla.jstenback.com's avatar jst%mozilla.jstenback.com
Browse files

Fixing bug 103638 (and bug 273699). Targets with same name in different...

Fixing bug 103638 (and bug 273699). Targets with same name in different windows open in the wrong window. Patch by bzbarsky@mit.edu and myself, r=danm.moz@gmail.com, bzbarsky@mit.edu, sr=dveditz@cruzio.com, a=asa@mozilla.org
parent d2fd4767
Loading
Loading
Loading
Loading
+332 −213

File changed.

Preview size limit exceeded, changes collapsed.

+0 −3
Original line number Diff line number Diff line
@@ -368,9 +368,6 @@ protected:

    PRPackedBool               mIsBeingDestroyed;

    // Validate window targets to prevent frameset spoofing
    PRPackedBool               mValidateOrigin;

    PRPackedBool               mIsExecutingOnLoadHandler;

    // Indicates that a DocShell in this "docshell tree" is printing
+6 −2
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ interface nsIDocShellTreeOwner;
 * node or a leaf. 
 */

[scriptable, uuid(1b3416f3-0ec6-49e6-8bdf-77bfdbc4a102)]
[scriptable, uuid(7d935d63-6d2a-4600-afb5-9a4f7d68b825)]
interface nsIDocShellTreeItem : nsISupports
{
	/*
@@ -130,8 +130,12 @@ interface nsIDocShellTreeItem : nsISupports
		a shell by the specified name.  Inversely the child uses it to ensure it
		does not ask its parent to do the search if its parent is the one that
		asked it to search.  Children also use this to test against the treeOwner;
	aOriginalRequestor - The original treeitem that made the request, if any.
		This is used to ensure that we don't run into cross-site issues.
	*/
	nsIDocShellTreeItem findItemWithName(in wstring name, in nsISupports aRequestor);
	nsIDocShellTreeItem findItemWithName(in wstring name,
	                                     in nsISupports aRequestor,
	                                     in nsIDocShellTreeItem aOriginalRequestor);

	/*
	The owner of the DocShell Tree.  This interface will be called upon when
+8 −3
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@
// XXXbz this interface should probably inherit from nsIDocShellTreeItem, and
// some methods should move from there to here...

[scriptable, uuid(C094F810-A8AB-11d3-AFC6-00A024FFC08C)]
[scriptable, uuid(37f1ab73-f224-44b1-82f0-d2834ab1cec0)]
interface nsIDocShellTreeNode : nsISupports
{
	/*
@@ -87,11 +87,16 @@ interface nsIDocShellTreeNode : nsISupports
	aRequestor - This is the docshellTreeItem that is requesting the find.  This
		parameter is used when recursion is being used to avoid searching the same
		tree again when a child has asked a parent to search for children.
	aOriginalRequestor - The original treeitem that made the request, if any.
    	This is used to ensure that we don't run into cross-site issues.

	Note the search is depth first when recursing.
	// XXXbz this should return an nsIDocShellTreeNode, I think.
	*/
	nsIDocShellTreeItem findChildWithName(in wstring aName, in boolean aRecurse,
		in boolean aSameType, in nsIDocShellTreeItem aRequestor);
	nsIDocShellTreeItem findChildWithName(in wstring aName,
	                                      in boolean aRecurse,
	                                      in boolean aSameType,
	                                      in nsIDocShellTreeItem aRequestor,
	                                      in nsIDocShellTreeItem aOriginalRequestor);
};
+6 −2
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@

interface nsIDocShellTreeItem;

[scriptable, uuid(80F30E10-A7CF-11d3-AFC5-00A024FFC08C)]
[scriptable, uuid(9e508466-5ebb-4618-abfa-9ad47bed0b2e)]
interface nsIDocShellTreeOwner : nsISupports
{
	/*
@@ -58,9 +58,13 @@ interface nsIDocShellTreeOwner : nsISupports
	a shell by the specified name.  Inversely the child uses it to ensure it
	does not ask its parent to do the search if its parent is the one that
	asked it to search.
	aOriginalRequestor - The original treeitem that made the request, if any.
	This is used to ensure that we don't run into cross-site issues.

	*/
	nsIDocShellTreeItem findItemWithName(in wstring name, 
		in nsIDocShellTreeItem aRequestor);
		in nsIDocShellTreeItem aRequestor,
		in nsIDocShellTreeItem aOriginalRequestor);

	/*
	Called when a content shell is added to the the docShell Tree.
Loading