Backed out changeset 6b686281f9ac (Bug 445765) for causing a 3% Txul (Twinopen) regression on Linux.

This commit is contained in:
L. David Baron 2009-08-23 08:06:58 -07:00
parent 5375b192d3
commit 5036ad40dd

View File

@ -88,7 +88,6 @@
#include "imgIRequest.h"
#include "imgIContainer.h"
#include "nsIImageLoadingContent.h"
#include "nsCOMPtr.h"
#ifdef MOZ_SVG
#include "nsSVGUtils.h"
@ -3152,13 +3151,13 @@ nsLayoutUtils::GetDeviceContextForScreenInfo(nsIDocShell* aDocShell)
win->EnsureSizeUpToDate();
nsRefPtr<nsPresContext> presContext;
docShell->GetPresContext(getter_AddRefs(presContext));
if (presContext) {
nsIDeviceContext* context = presContext->DeviceContext();
if (context) {
return context;
}
nsCOMPtr<nsIBaseWindow> baseWindow = do_QueryInterface(docShell);
NS_ENSURE_TRUE(baseWindow, nsnull);
nsCOMPtr<nsIWidget> mainWidget;
baseWindow->GetMainWidget(getter_AddRefs(mainWidget));
if (mainWidget) {
return mainWidget->GetDeviceContext();
}
nsCOMPtr<nsIDocShellTreeItem> curItem = do_QueryInterface(docShell);