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)