mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 02:25:34 +00:00
Backed out changeset 6b686281f9ac (Bug 445765) for causing a 3% Txul (Twinopen) regression on Linux.
This commit is contained in:
parent
5375b192d3
commit
5036ad40dd
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user