-
- Downloads
Bug 1787790: Normalize system fonts with RFP on. r=emilio
System fonts can leak any user customization of system fonts, or user's locale (e.g., en-US and ja Windows have different system fonts). Also, Linux distributions/desktop environments set default fonts in different ways. Customization can be detected either with font metrics, the font allowed list is not enabled or the font is included in it, or with getComputedStyle, that leaks the name of the font that Firefox tries to apply. This patch try to prevent these leaks by using a generic "sans-serif" for all system fonts, except on macOS, where it uses "-apple-system", and on Android, where these fonts always use Roboto. Differential Revision: https://phabricator.services.mozilla.com/D163576
Showing
- gfx/thebes/gfxPlatformFontList.cpp 16 additions, 2 deletionsgfx/thebes/gfxPlatformFontList.cpp
- layout/base/nsLayoutUtils.cpp 51 additions, 1 deletionlayout/base/nsLayoutUtils.cpp
- layout/reftests/font-matching/reftest.list 3 additions, 0 deletionslayout/reftests/font-matching/reftest.list
- layout/reftests/font-matching/system-font-rfp-ref.html 44 additions, 0 deletionslayout/reftests/font-matching/system-font-rfp-ref.html
- layout/reftests/font-matching/system-font-rfp.html 8 additions, 0 deletionslayout/reftests/font-matching/system-font-rfp.html
Loading
Please sign in to comment