зеркало из https://github.com/mozilla/gecko-dev.git
8a6b5c9c8a
We want to use a similar model as Chrome on Android does for scaling our display of web content, that is use font inflation for desktop pages and plain text zooming for everything else. Since we don't want to simply clobber any text zoom that might have been set by the user/front-end code, we allow setting and storing the system font scale separately on the PresContext. We then calculate the effective text zoom value as the product of the system font scale and the current text zoom value. Any function that is using the PresContext's TextZoom value for layouting/rendering is switched over to this new EffectiveTextZoom value, whereas functions that are interested in the text zoom as actually set by the user/front-end (e.g. the nsDocumentViewer, or the code responsible for copying text and full zoom settings into the new PresContext on page navigation) continue using the plain TextZoom value. As long as font inflation is enabled in principle (e.g. font.size.inflation.minTwips != 0), every page starts out as eligible for font inflation until the relevant meta viewport tags marking the page as "mobile friendly" have been detected. Since the PresShell caches the font inflation state and only recalculates it when necessary, we make use of that and set the PresContext's system font scale as necessary whenever the font inflation state has been refreshed. MozReview-Commit-ID: 2InyE04wKAW --HG-- extra : rebase_source : 3f6d7128f37c1dc18f67a6655f86d9a3003fe90b extra : source : 6100458b97289f9aea5ac8fda57ded045e6860b7 |
||
---|---|---|
.. | ||
crashtests | ||
test | ||
SMILBoolType.cpp | ||
SMILBoolType.h | ||
SMILEnumType.cpp | ||
SMILEnumType.h | ||
SMILIntegerType.cpp | ||
SMILIntegerType.h | ||
SMILStringType.cpp | ||
SMILStringType.h | ||
TimeEvent.cpp | ||
TimeEvent.h | ||
moz.build | ||
nsISMILAttr.h | ||
nsISMILType.h | ||
nsSMILAnimationController.cpp | ||
nsSMILAnimationController.h | ||
nsSMILAnimationFunction.cpp | ||
nsSMILAnimationFunction.h | ||
nsSMILCSSProperty.cpp | ||
nsSMILCSSProperty.h | ||
nsSMILCSSValueType.cpp | ||
nsSMILCSSValueType.h | ||
nsSMILCompositor.cpp | ||
nsSMILCompositor.h | ||
nsSMILCompositorTable.h | ||
nsSMILFloatType.cpp | ||
nsSMILFloatType.h | ||
nsSMILInstanceTime.cpp | ||
nsSMILInstanceTime.h | ||
nsSMILInterval.cpp | ||
nsSMILInterval.h | ||
nsSMILKeySpline.cpp | ||
nsSMILKeySpline.h | ||
nsSMILMilestone.h | ||
nsSMILNullType.cpp | ||
nsSMILNullType.h | ||
nsSMILParserUtils.cpp | ||
nsSMILParserUtils.h | ||
nsSMILRepeatCount.cpp | ||
nsSMILRepeatCount.h | ||
nsSMILSetAnimationFunction.cpp | ||
nsSMILSetAnimationFunction.h | ||
nsSMILTargetIdentifier.h | ||
nsSMILTimeContainer.cpp | ||
nsSMILTimeContainer.h | ||
nsSMILTimeValue.cpp | ||
nsSMILTimeValue.h | ||
nsSMILTimeValueSpec.cpp | ||
nsSMILTimeValueSpec.h | ||
nsSMILTimeValueSpecParams.h | ||
nsSMILTimedElement.cpp | ||
nsSMILTimedElement.h | ||
nsSMILTypes.h | ||
nsSMILValue.cpp | ||
nsSMILValue.h |