gecko-dev/layout/mathml
Jonathan Kew f1d0b4bbe4 Bug 1725940 - patch 2 - Move nsFontCache from the device context to the prescontext. r=emilio
To look up/instantiate platform fonts based on CSS font properties, we create a gfxFontGroup from an nsFont and other attributes; this is currently cached in an nsFontCache attached to the nsDeviceContext.

However, this assumes that the mapping to platform fonts will be the same for all documents using the given device context. In a world where visibility of platform fonts to the page may be restricted, and may depend on the individual document (e.g. if the user disables tracking protection for a particular site), the mapping represented by nsFontCache may vary, and determining how to resolve a given font request will need access to the requesting document in order to know what visibility it is allowed.

To support this, this patch moves the nsFontCache from nsDeviceContext to nsPresContext. In itself, this should cause no visible change in behavior, but it provides a basis for the patches that will follow in bug 1715501.

It's likely that this will have some effects on individual performance tests, depending on the exact content and sequencing of page loads, because of changed caching behavior. E.g. having a per-presContext cache may sometimes mean that we no longer take advantage of a cached gfxFontGroup that a previously-loaded page created; but on the other hand the caches will tend to be smaller and have faster lookups.

My testing so far suggests that we will see some apparent regressions, alongside some improvements, but that overall there should be little change. I'd like to get this change landed separately, before any of the actual font-visibility behavior changes, so that we can more clearly see and isolate any unexpected effects.

Differential Revision: https://phabricator.services.mozilla.com/D122715
2021-08-16 13:58:03 +00:00
..
crashtests
tests
jar.mn
mathfont.properties
mathfontSTIXGeneral.properties
mathfontUnicode.properties
mathml.css Bug 1690225 - Unify focus-visible rules in ua.css. r=edgar 2021-02-03 10:25:21 +00:00
moz.build
nsIMathMLFrame.h
nsMathMLAtoms.h
nsMathMLChar.cpp Bug 1725940 - patch 2 - Move nsFontCache from the device context to the prescontext. r=emilio 2021-08-16 13:58:03 +00:00
nsMathMLChar.h Bug 1720804 - Part 1: Move majority of the display list code inside mozilla namespace r=mattwoodrow 2021-07-19 11:28:20 +00:00
nsMathMLContainerFrame.cpp Bug 1720804 - Part 1: Move majority of the display list code inside mozilla namespace r=mattwoodrow 2021-07-19 11:28:20 +00:00
nsMathMLContainerFrame.h
nsMathMLFrame.cpp Bug 1720804 - Part 1: Move majority of the display list code inside mozilla namespace r=mattwoodrow 2021-07-19 11:28:20 +00:00
nsMathMLFrame.h Bug 1720804 - Part 1: Move majority of the display list code inside mozilla namespace r=mattwoodrow 2021-07-19 11:28:20 +00:00
nsMathMLOperators.cpp Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin 2021-03-10 10:47:47 +00:00
nsMathMLOperators.h
nsMathMLParts.h
nsMathMLSelectedFrame.cpp Bug 1686603 Part 2 - Add StyleSizeOverrides parameter to ReflowInput's constructor & co. to override data from style system data. r=dholbert 2021-01-26 02:47:40 +00:00
nsMathMLSelectedFrame.h Bug 1686603 Part 2 - Add StyleSizeOverrides parameter to ReflowInput's constructor & co. to override data from style system data. r=dholbert 2021-01-26 02:47:40 +00:00
nsMathMLTokenFrame.cpp
nsMathMLTokenFrame.h
nsMathMLmactionFrame.cpp
nsMathMLmactionFrame.h
nsMathMLmencloseFrame.cpp Bug 1720804 - Part 1: Move majority of the display list code inside mozilla namespace r=mattwoodrow 2021-07-19 11:28:20 +00:00
nsMathMLmencloseFrame.h
nsMathMLmfracFrame.cpp Bug 1720804 - Part 1: Move majority of the display list code inside mozilla namespace r=mattwoodrow 2021-07-19 11:28:20 +00:00
nsMathMLmfracFrame.h
nsMathMLmmultiscriptsFrame.cpp Bug 1673931 - Remove dependency of BindingUtils.h on Document.h. 2020-11-23 16:08:03 +00:00
nsMathMLmmultiscriptsFrame.h
nsMathMLmoFrame.cpp Bug 1660470 - Add missing include directives/forward declarations. r=nika 2020-11-23 16:21:38 +00:00
nsMathMLmoFrame.h
nsMathMLmpaddedFrame.cpp
nsMathMLmpaddedFrame.h
nsMathMLmrootFrame.cpp
nsMathMLmrootFrame.h
nsMathMLmrowFrame.cpp
nsMathMLmrowFrame.h
nsMathMLmspaceFrame.cpp
nsMathMLmspaceFrame.h
nsMathMLmsqrtFrame.cpp
nsMathMLmsqrtFrame.h
nsMathMLmtableFrame.cpp Bug 1540737 - Don't use nsDisplayBorder's IsInvisibleInRect implementation for nsMathMLmtable, since it uses a custom style context. r=miko 2021-05-19 01:11:31 +00:00
nsMathMLmtableFrame.h Bug 1720804 - Part 1: Move majority of the display list code inside mozilla namespace r=mattwoodrow 2021-07-19 11:28:20 +00:00
nsMathMLmunderoverFrame.cpp Bug 1673931 - Remove dependency of BindingUtils.h on Document.h. 2020-11-23 16:08:03 +00:00
nsMathMLmunderoverFrame.h
nsMathMLsemanticsFrame.cpp
nsMathMLsemanticsFrame.h
operatorDictionary.xsl
updateOperatorDictionary.pl