mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 258411 - fixing regression from bug 250342: wrong z-order for frames
r+sr=roc
This commit is contained in:
parent
854203cbdf
commit
f3e06d119c
@ -79,6 +79,7 @@
|
||||
#include "nsIDeviceContextSpecFactory.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsIView.h"
|
||||
#include "nsView.h" // For nsView::GetViewFor
|
||||
|
||||
#include "nsIPageSequenceFrame.h"
|
||||
#include "nsIURL.h"
|
||||
@ -1845,15 +1846,7 @@ DocumentViewerImpl::MakeWindow(nsIWidget* aParentWidget,
|
||||
return rv;
|
||||
|
||||
// if aParentWidget has a view, we'll hook our view manager up to its view tree
|
||||
void* clientData;
|
||||
nsIView* containerView = nsnull;
|
||||
if (NS_SUCCEEDED(aParentWidget->GetClientData(clientData))) {
|
||||
nsISupports* data = (nsISupports*)clientData;
|
||||
|
||||
if (data) {
|
||||
CallQueryInterface(data, &containerView);
|
||||
}
|
||||
}
|
||||
nsIView* containerView = nsView::GetViewFor(aParentWidget);
|
||||
|
||||
if (containerView) {
|
||||
// see if the containerView has already been hooked into a foreign view manager hierarchy
|
||||
|
@ -79,6 +79,7 @@
|
||||
#include "nsIDeviceContextSpecFactory.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsIView.h"
|
||||
#include "nsView.h" // For nsView::GetViewFor
|
||||
|
||||
#include "nsIPageSequenceFrame.h"
|
||||
#include "nsIURL.h"
|
||||
@ -1845,15 +1846,7 @@ DocumentViewerImpl::MakeWindow(nsIWidget* aParentWidget,
|
||||
return rv;
|
||||
|
||||
// if aParentWidget has a view, we'll hook our view manager up to its view tree
|
||||
void* clientData;
|
||||
nsIView* containerView = nsnull;
|
||||
if (NS_SUCCEEDED(aParentWidget->GetClientData(clientData))) {
|
||||
nsISupports* data = (nsISupports*)clientData;
|
||||
|
||||
if (data) {
|
||||
CallQueryInterface(data, &containerView);
|
||||
}
|
||||
}
|
||||
nsIView* containerView = nsView::GetViewFor(aParentWidget);
|
||||
|
||||
if (containerView) {
|
||||
// see if the containerView has already been hooked into a foreign view manager hierarchy
|
||||
|
@ -82,7 +82,38 @@ class ViewWrapper : public nsISupports
|
||||
nsView* mView;
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS1(ViewWrapper, ViewWrapper)
|
||||
NS_IMPL_ADDREF(ViewWrapper)
|
||||
NS_IMPL_RELEASE(ViewWrapper)
|
||||
#ifndef DEBUG
|
||||
NS_IMPL_QUERY_INTERFACE1(ViewWrapper, ViewWrapper)
|
||||
|
||||
#else
|
||||
NS_IMETHODIMP ViewWrapper::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aInstancePtr);
|
||||
|
||||
NS_ASSERTION(!aIID.Equals(NS_GET_IID(nsIView)) &&
|
||||
!aIID.Equals(NS_GET_IID(nsIScrollableView)),
|
||||
"Someone expects a viewwrapper to be a view!");
|
||||
|
||||
*aInstancePtr = nsnull;
|
||||
|
||||
if (aIID.Equals(NS_GET_IID(nsISupports))) {
|
||||
*aInstancePtr = NS_STATIC_CAST(nsISupports*, this);
|
||||
}
|
||||
if (aIID.Equals(NS_GET_IID(ViewWrapper))) {
|
||||
*aInstancePtr = this;
|
||||
}
|
||||
|
||||
if (*aInstancePtr) {
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Given a widget, returns the stored ViewWrapper on it, or NULL if no
|
||||
@ -229,6 +260,9 @@ nsresult nsView::QueryInterface(const nsIID& aIID, void** aInstancePtr)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
NS_ASSERTION(!aIID.Equals(NS_GET_IID(nsISupports)),
|
||||
"Someone expects views to be ISupports-derived!");
|
||||
|
||||
*aInstancePtr = nsnull;
|
||||
|
||||
if (aIID.Equals(NS_GET_IID(nsIView))) {
|
||||
|
Loading…
Reference in New Issue
Block a user