Bug 1644271 - Don't let the MVM control reflow dimensions unless we're using mobile viewport sizing. r=tnikkel
Allowing the MVM to control the reflow means that the requested reflow size is ignored, and instead the existing CSS/layout viewport is used. This is undesirable for calls to SizeToContent(), where the intent is to do a reflow to figure out the smallest amount of space the content fits in. In general though unless we are using mobile viewport sizing we shouldn't be needing the MVM to drive reflows. Differential Revision: https://phabricator.services.mozilla.com/D79225
This commit is contained in:
@@ -1945,12 +1945,13 @@ nsresult PresShell::ResizeReflow(nscoord aWidth, nscoord aHeight,
|
||||
// the ZCC to update itself.
|
||||
mZoomConstraintsClient->ScreenSizeChanged();
|
||||
}
|
||||
if (mMobileViewportManager) {
|
||||
// If we have a mobile viewport manager, request a reflow from it. It can
|
||||
// recompute the final CSS viewport and trigger a call to
|
||||
if (UsesMobileViewportSizing()) {
|
||||
// If we are using mobile viewport sizing, request a reflow from the MVM.
|
||||
// It can recompute the final CSS viewport and trigger a call to
|
||||
// ResizeReflowIgnoreOverride if it changed. We don't force adjusting
|
||||
// of resolution, because that is only necessary when we are destroying
|
||||
// the MVM.
|
||||
MOZ_ASSERT(mMobileViewportManager);
|
||||
mMobileViewportManager->RequestReflow(false);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user