gecko-dev/dom/smil
Jan Henning 8a6b5c9c8a Bug 1328868 - Part 2 - Apply the system font scale as an additional text zoom factor to all pages that are not font inflated. r=tnikkel
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
2017-02-25 13:22:52 +01:00
..
crashtests Bug 1339341- Downgrade several stylo errors to warnings. r=heycam 2017-02-14 18:26:10 +11:00
test Bug 1345253 - Use element.firstChild.remove() instead of element.removeChild(element.firstChild), r=jaws. 2017-03-08 10:17:52 +01:00
moz.build Bug 1062106 part 3 - Remove SMIL MappedAttribute mechanism. r=birtles 2017-03-21 15:45:58 +09:00
nsISMILAttr.h
nsISMILType.h
nsSMILAnimationController.cpp Bug 1062106 part 1 - Remove special handling of attributeType='XML'. r=birtles,longsonr+218550 2017-03-21 15:42:17 +09:00
nsSMILAnimationController.h
nsSMILAnimationFunction.cpp
nsSMILAnimationFunction.h Bug 1297306 - part5:create enum constructors for EnumTable. r=baku 2016-09-07 10:20:17 +08:00
nsSMILCompositor.cpp Bug 1062106 part 1 - Remove special handling of attributeType='XML'. r=birtles,longsonr+218550 2017-03-21 15:42:17 +09:00
nsSMILCompositor.h
nsSMILCompositorTable.h
nsSMILCSSProperty.cpp Bug 1293739 - Part 1: Rename nsCSSProperty to nsCSSPropertyID. r=dholbert 2016-08-16 18:37:48 -07:00
nsSMILCSSProperty.h Bug 1293739 - Part 1: Rename nsCSSProperty to nsCSSPropertyID. r=dholbert 2016-08-16 18:37:48 -07:00
nsSMILCSSValueType.cpp Bug 1328868 - Part 2 - Apply the system font scale as an additional text zoom factor to all pages that are not font inflated. r=tnikkel 2017-02-25 13:22:52 +01:00
nsSMILCSSValueType.h Bug 1293739 - Part 1: Rename nsCSSProperty to nsCSSPropertyID. r=dholbert 2016-08-16 18:37:48 -07:00
nsSMILFloatType.cpp
nsSMILFloatType.h
nsSMILInstanceTime.cpp Bug 1339591 - Rearrange construction order of RAII objects in SMIL code; r=mccr8 2017-02-16 15:36:04 +09:00
nsSMILInstanceTime.h
nsSMILInterval.cpp
nsSMILInterval.h
nsSMILKeySpline.cpp
nsSMILKeySpline.h
nsSMILMilestone.h
nsSMILNullType.cpp
nsSMILNullType.h
nsSMILParserUtils.cpp Bug 1305422 - part 8 - make nsSMILParserUtils::CheckForNegativeNumber more idiomatic; r=dholbert 2016-09-29 22:33:57 -04:00
nsSMILParserUtils.h
nsSMILRepeatCount.cpp
nsSMILRepeatCount.h
nsSMILSetAnimationFunction.cpp
nsSMILSetAnimationFunction.h
nsSMILTargetIdentifier.h Bug 1062106 part 1 - Remove special handling of attributeType='XML'. r=birtles,longsonr+218550 2017-03-21 15:42:17 +09:00
nsSMILTimeContainer.cpp Bug 1062106 part 3 - Remove SMIL MappedAttribute mechanism. r=birtles 2017-03-21 15:45:58 +09:00
nsSMILTimeContainer.h Bug 1321357 part 2 - Make nsSMILTimeContainer::mHoldingEntries debug-only; r=dholbert 2016-12-02 11:22:40 +09:00
nsSMILTimedElement.cpp Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm. 2016-08-08 12:18:10 +10:00
nsSMILTimedElement.h Bug 1297306 - part5:create enum constructors for EnumTable. r=baku 2016-09-07 10:20:17 +08:00
nsSMILTimeValue.cpp
nsSMILTimeValue.h
nsSMILTimeValueSpec.cpp
nsSMILTimeValueSpec.h
nsSMILTimeValueSpecParams.h
nsSMILTypes.h
nsSMILValue.cpp
nsSMILValue.h
SMILBoolType.cpp
SMILBoolType.h
SMILEnumType.cpp
SMILEnumType.h
SMILIntegerType.cpp
SMILIntegerType.h
SMILStringType.cpp
SMILStringType.h
TimeEvent.cpp Bug 1313943 - Legacy event initializers should all do nothing during dispatch; r=bkelly 2016-11-01 17:19:59 +02:00
TimeEvent.h