зеркало из https://github.com/mozilla/gecko-dev.git
Merge backout of changeset 6b686281f9ac (Bug 445765) for causing a 3% Txul (Twinopen) regression on Linux.
This commit is contained in:
Коммит
79441ac322
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче