From 2cbc1dcd1a33bedb71de72a63d6ef39dfa0e4b7e Mon Sep 17 00:00:00 2001 From: "mjudge%netscape.com" Date: Wed, 17 May 2000 02:02:20 +0000 Subject: [PATCH] missing {} around a block git-svn-id: svn://10.0.0.236/trunk@70240 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/base/src/nsDocument.cpp | 12 +++++++----- mozilla/layout/base/src/nsDocument.cpp | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/mozilla/content/base/src/nsDocument.cpp b/mozilla/content/base/src/nsDocument.cpp index 742c2982c76..805dfd004b5 100644 --- a/mozilla/content/base/src/nsDocument.cpp +++ b/mozilla/content/base/src/nsDocument.cpp @@ -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 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 parent; + anchor->GetParentNode(getter_AddRefs(parent)); + rootElement = do_QueryInterface(parent);//set root to top of selection + } } } } diff --git a/mozilla/layout/base/src/nsDocument.cpp b/mozilla/layout/base/src/nsDocument.cpp index 742c2982c76..805dfd004b5 100644 --- a/mozilla/layout/base/src/nsDocument.cpp +++ b/mozilla/layout/base/src/nsDocument.cpp @@ -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 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 parent; + anchor->GetParentNode(getter_AddRefs(parent)); + rootElement = do_QueryInterface(parent);//set root to top of selection + } } } }