зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1351329 - Fix Windows implementation of defaultCSSScaleFactor. r=kanru
Unlike contentsScaleFactor, defaultCSSScaleFactor always uses WinUtils::LogToPhysFactor regardless of the DPI awareness. Bug 1194751 broke the implementation (probably unknowingly). MozReview-Commit-ID: KjtnT2ebgHK --HG-- extra : rebase_source : 6fe3d58293482563cc4fc4f16a91fa4a3c4c12da
This commit is contained in:
Родитель
87716f1d4e
Коммит
b1aecb3f20
|
@ -27,15 +27,16 @@ CollectMonitors(HMONITOR aMon, HDC, LPRECT, LPARAM ioParam)
|
|||
MOZ_LOG(sScreenLog, LogLevel::Error, ("GetMonitorInfoW failed"));
|
||||
return TRUE; // continue the enumeration
|
||||
}
|
||||
double scale = WinUtils::LogToPhysFactor(aMon);
|
||||
DesktopToLayoutDeviceScale contentsScaleFactor;
|
||||
if (WinUtils::IsPerMonitorDPIAware()) {
|
||||
contentsScaleFactor.scale = 1.0;
|
||||
} else {
|
||||
contentsScaleFactor.scale = WinUtils::LogToPhysFactor(aMon);
|
||||
contentsScaleFactor.scale = scale;
|
||||
}
|
||||
CSSToLayoutDeviceScale defaultCssScaleFactor(nsIWidget::DefaultScaleOverride());
|
||||
if (defaultCssScaleFactor.scale <= 0.0) {
|
||||
defaultCssScaleFactor.scale = contentsScaleFactor.scale;
|
||||
defaultCssScaleFactor.scale = scale;
|
||||
}
|
||||
LayoutDeviceIntRect rect(info.rcMonitor.left, info.rcMonitor.top,
|
||||
info.rcMonitor.right - info.rcMonitor.left,
|
||||
|
|
Загрузка…
Ссылка в новой задаче