gecko-dev/dom
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
..
animation Bug 1322570 Part 4 - Use GetParentAllowServo() in KeyframeEffectReadOnly::UpdateProperties. r=hiro 2017-03-20 14:13:01 +08:00
asmjscache Bug 1348660 - Part 3: Separate the canceled state out of UsageInfo; r=btseng 2017-03-22 12:13:54 +01:00
audiochannel Backed out 6 changesets (bug 1347758) for eslint failure 2017-03-24 16:58:08 +08:00
base Merge m-i to m-c, a=merge 2017-03-25 18:39:56 -07:00
battery
bindings Bug 1350398 Remove Workers.h include from BindingUtils.h now that ThrowDOMExceptionForNSResult no longer exists. rs=bz 2017-03-24 15:27:11 -04:00
broadcastchannel Bug 1311324 P2 Replace usage of ServiceWorkerMessageEvent with MessageEvent. r=bz 2017-03-09 20:50:13 -05:00
browser-element Bug 1151421 Part 3: Update tests of pageYOffset/scrollY to round off when checking expected results. r=smaug 2017-03-16 12:05:56 -07:00
cache Bug 1348660 - Part 3: Separate the canceled state out of UsageInfo; r=btseng 2017-03-22 12:13:54 +01:00
canvas Bug 1309200 - Use GetSoftwareBackend in dom. r=nical 2017-02-26 20:38:24 +01:00
commandhandler
console Bug 1350433 Expose WorkerPrivate::ServiceWorkerScope() instead of using WorkerName() all over the place. r=asuth 2017-03-24 19:56:48 -04:00
crypto
encoding Backed out changeset cc308a73ad05 (bug 1347314) for eslint failure in test_device.html. r=backout 2017-03-22 18:20:26 +01:00
events Merge inbound to central, a=merge 2017-03-24 17:17:27 -07:00
fetch Bug 1350433 Expose WorkerPrivate::ServiceWorkerScope() instead of using WorkerName() all over the place. r=asuth 2017-03-24 19:56:48 -04:00
file Bug 1344957 - Enabling File.createFromNsIFile and File.createFromFileName only for testing and file-content-process, r=ehsan, r=bobowen 2017-03-21 11:11:06 +01:00
filehandle
filesystem Bug 1344415 - Introduce a security check about which files can be opened by a content process, r=ehsan 2017-03-16 08:53:49 +01:00
flyweb Bug 1274343 - Add parent-to-child pipe streaming to IPCStream - part 2 - PParentToChild, r=smuag 2017-03-14 12:29:43 +01:00
gamepad Bug 1299937 - Part 6: Handle Stop vibrating when the window defoucses; r=qdot 2017-03-07 10:17:57 +08:00
geolocation Backed out changeset 8b1c50cdb50c (bug 1072859) for failing devtools/client/responsive.html/test/browser/browser_permission_doorhanger.js. r=backout a=merge 2017-03-09 00:46:17 +01:00
grid
html Bug 1341102: More reftest updates. r=emilio 2017-03-25 18:35:24 +01:00
imptests
indexedDB Bug 1349158 - Update Key Generator algorithm specified in IDB v2.0. r=janv 2017-03-22 15:21:08 +08:00
interfaces Bug 1337056 - Part 12: Send down permissions when calling createAboutBlankContentViewer, r=baku 2017-03-21 11:08:03 -04:00
ipc Bug 1315850 - Add media.eme.chromium-api.enabled to ContentPrefs.cpp. r=smaug 2017-02-22 16:12:47 +13:00
json Bug 1343933 - Renaming Principal classes - part 2 - NullPrincipal, r=qdot 2017-03-22 11:38:40 +01:00
jsurl Bug 1331662 part 2 - Replace nsJSUtils::EvaluateString calls by ExecutionContext scopes. r=bz 2017-03-22 13:42:27 +00:00
locales Bug 1344642 - Part 1: Cleanup dom.forms.datepicker related code. r=smaug 2017-03-17 11:01:57 +08:00
manifest Bug 1347154 - Set correct csp for icon fetching. r=marcosc 2017-03-17 10:55:59 +00:00
mathml
media Merge inbound to central, a=merge 2017-03-24 17:17:27 -07:00
messagechannel
network Bug 1350398 Remove Workers.h include from BindingUtils.h now that ThrowDOMExceptionForNSResult no longer exists. rs=bz 2017-03-24 15:27:11 -04:00
notification Bug 1303838 - Switch to existing target tab when clicking links. r=smaug 2017-03-23 15:59:01 +08:00
offline Bug 1350398 Remove Workers.h include from BindingUtils.h now that ThrowDOMExceptionForNSResult no longer exists. rs=bz 2017-03-24 15:27:11 -04:00
performance merge mozilla-inbound to mozilla-central a=merge 2017-03-07 15:13:31 +01:00
permission
plugins Backed out 6 changesets (bug 1347758) for eslint failure 2017-03-24 16:58:08 +08:00
power Bug 1344629 - Part 6: Rewrite unnecessary uses of nsLiteralString. r=dbaron 2017-03-14 15:26:27 +13:00
presentation Bug 1337467 - Convert observers to bundle events; r=rbarker r=sebastian 2017-03-07 12:34:04 -05:00
promise
push Bug 1300112 - Avoid duplicate push notifications by sending push messages to only one content process. r=kitcambridge 2017-03-09 11:12:49 +00:00
quota Bug 1348660 - Part 6: Rename QuotaManager::IsOriginWhitelistedForPersistentStorage() to QuotaManager::IsOriginInternal(); r=btseng 2017-03-22 12:14:09 +01:00
res
secureelement
security Bug 1316305 - Explicilty call .close() for websocket in test. r=baku 2017-03-22 13:04:02 +01:00
smil 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
storage
svg 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
system Bug 1344711 - script-generated patch to remove try blocks around get*Pref calls, r=jaws. 2017-03-07 15:29:48 +01:00
tests Bug 1333482 part 4 - [css-ui] Amend all uses of '-moz-appearance:none' in tests to also specify 'appearance:none' (automated change). r=dholbert 2017-03-23 22:11:22 -07:00
time
u2f Bug 1334388 - Disable intermittent dom/u2f/tests/test_multiple_keys.html. r=keeler 2017-03-14 18:41:51 -07:00
url Bug 1324243 - Normalize IPv6 r=manishearth 2017-03-09 00:55:05 +01:00
vr Bug 1306493 - Part 6: disable require gesture when running VR tests; r=kip 2017-03-16 11:46:22 +08:00
webauthn Backed out changeset 713c0a78c2c1 (bug 1260318) for leak issue 2017-03-08 14:01:56 +08:00
webbrowserpersist Bug 1350398 Remove Workers.h include from BindingUtils.h now that ThrowDOMExceptionForNSResult no longer exists. rs=bz 2017-03-24 15:27:11 -04:00
webidl Bug 1341738 - Implement FetchController and FetObserver - part 4 - FetchObserver WebIDL, r=bkelly 2017-03-22 11:06:23 +01:00
workers Bug 1350433 Expose WorkerPrivate::ServiceWorkerScope() instead of using WorkerName() all over the place. r=asuth 2017-03-24 19:56:48 -04:00
worklet Bug 1331662 part 2 - Replace nsJSUtils::EvaluateString calls by ExecutionContext scopes. r=bz 2017-03-22 13:42:27 +00:00
xbl Bug 1331662 part 2 - Replace nsJSUtils::EvaluateString calls by ExecutionContext scopes. r=bz 2017-03-22 13:42:27 +00:00
xhr Bug 1350398 Remove Workers.h include from BindingUtils.h now that ThrowDOMExceptionForNSResult no longer exists. rs=bz 2017-03-24 15:27:11 -04:00
xml Bug 1333990: Part 2c.1 - Interrupt the XML flush loop after inserting document element. r=hsivonen 2017-03-15 14:04:37 -07:00
xslt Backed out changeset ddbfa3adcfad (bug 1338277) for failing own crashtest. r=backout 2017-03-24 13:52:59 +01:00
xul Backed out changeset cc308a73ad05 (bug 1347314) for eslint failure in test_device.html. r=backout 2017-03-22 18:20:26 +01:00
jar.mn
moz.build Bug 1299500 - Get rid of DeviceStorage API - part 10 - DeviceStorage, r=ehsan, r=billm 2017-03-08 20:15:45 +01:00