зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1154125 - Ensure the context has up-to-date device pixel DPI scaling before using it in calling nsViewManager::SetWindowDimensions. r=mstange
--HG-- extra : rebase_source : c757bbeae9b86e139b32c224c6df01318cc7a33f
This commit is contained in:
Родитель
c694d1761b
Коммит
5848b8fce9
|
@ -1919,6 +1919,14 @@ nsDocumentViewer::SetBoundsWithFlags(const nsIntRect& aBounds, uint32_t aFlags)
|
|||
aBounds.width, aBounds.height,
|
||||
false);
|
||||
} else if (mPresContext && mViewManager) {
|
||||
// Ensure presContext's deviceContext is up to date, as we sometimes get
|
||||
// here before a resolution-change notification has been fully handled
|
||||
// during display configuration changes, especially when there are lots
|
||||
// of windows/widgets competing to handle the notifications.
|
||||
// (See bug 1154125.)
|
||||
if (mPresContext->DeviceContext()->CheckDPIChange()) {
|
||||
mPresContext->UIResolutionChanged();
|
||||
}
|
||||
int32_t p2a = mPresContext->AppUnitsPerDevPixel();
|
||||
mViewManager->SetWindowDimensions(NSIntPixelsToAppUnits(mBounds.width, p2a),
|
||||
NSIntPixelsToAppUnits(mBounds.height, p2a),
|
||||
|
|
Загрузка…
Ссылка в новой задаче