added support for front-to-back view rendering.
git-svn-id: svn://10.0.0.236/trunk@2325 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -37,6 +37,9 @@
|
||||
#include "nsILinkHandler.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsCSSLayout.h"
|
||||
#include "nsViewsCID.h"
|
||||
#include "nsIView.h"
|
||||
#include "nsIViewManager.h"
|
||||
|
||||
#define BROKEN_IMAGE_URL "resource:/html/broken-image.gif"
|
||||
|
||||
@@ -292,6 +295,45 @@ nsHTMLImageLoader::GetDesiredSize(nsIPresContext* aPresContext,
|
||||
ImageFrame::ImageFrame(nsIContent* aContent, nsIFrame* aParentFrame)
|
||||
: nsLeafFrame(aContent, aParentFrame)
|
||||
{
|
||||
#if 0
|
||||
//lifted from nsRootPart.cpp. if we do this very much, factor it somehow. MMP
|
||||
// Create a view
|
||||
nsIFrame* parent;
|
||||
nsIView* view;
|
||||
|
||||
GetParentWithView(parent);
|
||||
NS_ASSERTION(parent, "GetParentWithView failed");
|
||||
nsIView* parView;
|
||||
|
||||
parent->GetView(parView);
|
||||
NS_ASSERTION(parView, "no parent with view");
|
||||
|
||||
// Create a view
|
||||
static NS_DEFINE_IID(kViewCID, NS_VIEW_CID);
|
||||
static NS_DEFINE_IID(kIViewIID, NS_IVIEW_IID);
|
||||
|
||||
nsresult result = NSRepository::CreateInstance(kViewCID,
|
||||
nsnull,
|
||||
kIViewIID,
|
||||
(void **)&view);
|
||||
if (NS_OK == result) {
|
||||
nsIView* rootView = parView;
|
||||
nsIViewManager* viewManager = rootView->GetViewManager();
|
||||
|
||||
// Initialize the view
|
||||
NS_ASSERTION(nsnull != viewManager, "null view manager");
|
||||
|
||||
view->Init(viewManager, mRect, rootView);
|
||||
viewManager->InsertChild(rootView, view, 0);
|
||||
|
||||
NS_RELEASE(viewManager);
|
||||
|
||||
// Remember our view
|
||||
SetView(view);
|
||||
NS_RELEASE(view);
|
||||
}
|
||||
NS_RELEASE(parView);
|
||||
#endif
|
||||
}
|
||||
|
||||
ImageFrame::~ImageFrame()
|
||||
|
||||
Reference in New Issue
Block a user