зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1423709 - Set mDefaultZoomValid is false in the case of auto-scale. r=botond
Depends on D10194 Differential Revision: https://phabricator.services.mozilla.com/D10195 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
9384f9338a
Коммит
d211dab1cc
|
@ -7612,6 +7612,9 @@ nsIDocument::GetViewportInfo(const ScreenIntSize& aDisplaySize)
|
|||
|
||||
return nsViewportInfo(scaleFloat, scaleMinFloat, scaleMaxFloat, size,
|
||||
sizeFlag,
|
||||
mValidScaleFloat
|
||||
? nsViewportInfo::AutoScaleFlag::FixedScale
|
||||
: nsViewportInfo::AutoScaleFlag::AutoScale,
|
||||
effectiveZoomFlag);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,10 @@ class MOZ_STACK_CLASS nsViewportInfo
|
|||
AutoSize,
|
||||
FixedSize,
|
||||
};
|
||||
enum class AutoScaleFlag {
|
||||
AutoScale,
|
||||
FixedScale,
|
||||
};
|
||||
enum class ZoomFlag {
|
||||
AllowZoom,
|
||||
DisallowZoom,
|
||||
|
@ -52,12 +56,13 @@ class MOZ_STACK_CLASS nsViewportInfo
|
|||
const mozilla::CSSToScreenScale& aMaxZoom,
|
||||
const mozilla::CSSSize& aSize,
|
||||
AutoSizeFlag aAutoSizeFlag,
|
||||
AutoScaleFlag aAutoScaleFlag,
|
||||
ZoomFlag aZoomFlag) :
|
||||
mDefaultZoom(aDefaultZoom),
|
||||
mMinZoom(aMinZoom),
|
||||
mMaxZoom(aMaxZoom),
|
||||
mSize(aSize),
|
||||
mDefaultZoomValid(true),
|
||||
mDefaultZoomValid(aAutoScaleFlag != AutoScaleFlag::AutoScale),
|
||||
mAutoSize(aAutoSizeFlag == AutoSizeFlag::AutoSize),
|
||||
mAllowZoom(aZoomFlag == ZoomFlag::AllowZoom)
|
||||
{
|
||||
|
@ -110,6 +115,8 @@ class MOZ_STACK_CLASS nsViewportInfo
|
|||
|
||||
// If the default zoom was specified and was between the min and max
|
||||
// zoom values.
|
||||
// FIXME: Bug 1504362 - Unify this and mDefaultZoom into
|
||||
// Maybe<CSSToScreenScale>.
|
||||
bool mDefaultZoomValid;
|
||||
|
||||
// Whether or not we should automatically size the viewport to the device's
|
||||
|
|
Загрузка…
Ссылка в новой задаче