mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1536755 Part 1: Enforce viewport zoom constraints when the content size changes. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D24424 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
01e23b1896
commit
5a6a418623
@ -401,8 +401,17 @@ void MobileViewportManager::UpdateResolution(
|
||||
// Even in other scenarios, we want to ensure that zoom level is
|
||||
// not _smaller_ than the intrinsic scale, otherwise we might be
|
||||
// trying to show regions where there is no content to show.
|
||||
if (zoom < intrinsicScale) {
|
||||
newZoom = Some(intrinsicScale);
|
||||
CSSToScreenScale clampedZoom = zoom;
|
||||
|
||||
if (clampedZoom < intrinsicScale) {
|
||||
clampedZoom = intrinsicScale;
|
||||
}
|
||||
|
||||
// Also clamp to the restrictions imposed by aViewportInfo.
|
||||
clampedZoom = ClampZoom(clampedZoom, aViewportInfo);
|
||||
|
||||
if (clampedZoom != zoom) {
|
||||
newZoom = Some(clampedZoom);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user