From 7c8331ce45ae3be78cc03d93ce67f614c8b62af9 Mon Sep 17 00:00:00 2001 From: "hewitt%netscape.com" Date: Wed, 23 May 2001 22:47:54 +0000 Subject: [PATCH] 78771 - autocomplete popup results are empty in 2nd browser instance and mail compose, r=ben, sr=hyatt git-svn-id: svn://10.0.0.236/trunk@95837 18797224-902f-48f8-a5cc-f745e15eee43 --- .../base/src/outliner/src/nsOutlinerBoxObject.cpp | 12 ++++++++++-- .../layout/xul/base/src/tree/src/nsTreeBoxObject.cpp | 12 ++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/mozilla/layout/xul/base/src/outliner/src/nsOutlinerBoxObject.cpp b/mozilla/layout/xul/base/src/outliner/src/nsOutlinerBoxObject.cpp index 7fb8cddee53..235cd39dd74 100644 --- a/mozilla/layout/xul/base/src/outliner/src/nsOutlinerBoxObject.cpp +++ b/mozilla/layout/xul/base/src/outliner/src/nsOutlinerBoxObject.cpp @@ -158,8 +158,16 @@ NS_IMETHODIMP nsOutlinerBoxObject::GetView(nsIOutlinerView * *aView) NS_IMETHODIMP nsOutlinerBoxObject::SetView(nsIOutlinerView * aView) { nsIOutlinerBoxObject* body = GetOutlinerBody(); - if (body) - return body->SetView(aView); + if (body) { + body->SetView(aView); + + // only return if the body frame was able to store the view, + // else we need to cache the property below + nsCOMPtr view; + body->GetView(getter_AddRefs(view)); + if (view) + return NS_OK; + } nsCOMPtr suppView(do_QueryInterface(aView)); if (suppView) diff --git a/mozilla/layout/xul/base/src/tree/src/nsTreeBoxObject.cpp b/mozilla/layout/xul/base/src/tree/src/nsTreeBoxObject.cpp index 7fb8cddee53..235cd39dd74 100644 --- a/mozilla/layout/xul/base/src/tree/src/nsTreeBoxObject.cpp +++ b/mozilla/layout/xul/base/src/tree/src/nsTreeBoxObject.cpp @@ -158,8 +158,16 @@ NS_IMETHODIMP nsOutlinerBoxObject::GetView(nsIOutlinerView * *aView) NS_IMETHODIMP nsOutlinerBoxObject::SetView(nsIOutlinerView * aView) { nsIOutlinerBoxObject* body = GetOutlinerBody(); - if (body) - return body->SetView(aView); + if (body) { + body->SetView(aView); + + // only return if the body frame was able to store the view, + // else we need to cache the property below + nsCOMPtr view; + body->GetView(getter_AddRefs(view)); + if (view) + return NS_OK; + } nsCOMPtr suppView(do_QueryInterface(aView)); if (suppView)