missing {} around a block

git-svn-id: svn://10.0.0.236/trunk@70240 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mjudge%netscape.com 2000-05-17 02:02:20 +00:00
parent 1ee175d89e
commit 2cbc1dcd1a
2 changed files with 14 additions and 10 deletions

View File

@ -3116,12 +3116,14 @@ nsDocument::CreateXIF(nsString & aBuffer, nsIDOMSelection* aSelection)
if (NS_SUCCEEDED(aSelection->GetFocusNode(getter_AddRefs(focus))))
{
if (focus.get() == anchor.get())
rootElement = do_QueryInterface(focus);//set root to top of selection
if (!rootElement)//maybe its a text node since both are the same. both parents are the same. pick one
{
nsCOMPtr<nsIDOMNode> parent;
anchor->GetParentNode(getter_AddRefs(parent));
rootElement = do_QueryInterface(parent);//set root to top of selection
rootElement = do_QueryInterface(focus);//set root to top of selection
if (!rootElement)//maybe its a text node since both are the same. both parents are the same. pick one
{
nsCOMPtr<nsIDOMNode> parent;
anchor->GetParentNode(getter_AddRefs(parent));
rootElement = do_QueryInterface(parent);//set root to top of selection
}
}
}
}

View File

@ -3116,12 +3116,14 @@ nsDocument::CreateXIF(nsString & aBuffer, nsIDOMSelection* aSelection)
if (NS_SUCCEEDED(aSelection->GetFocusNode(getter_AddRefs(focus))))
{
if (focus.get() == anchor.get())
rootElement = do_QueryInterface(focus);//set root to top of selection
if (!rootElement)//maybe its a text node since both are the same. both parents are the same. pick one
{
nsCOMPtr<nsIDOMNode> parent;
anchor->GetParentNode(getter_AddRefs(parent));
rootElement = do_QueryInterface(parent);//set root to top of selection
rootElement = do_QueryInterface(focus);//set root to top of selection
if (!rootElement)//maybe its a text node since both are the same. both parents are the same. pick one
{
nsCOMPtr<nsIDOMNode> parent;
anchor->GetParentNode(getter_AddRefs(parent));
rootElement = do_QueryInterface(parent);//set root to top of selection
}
}
}
}