Closed Bug 1787790 Opened 3 years ago Closed 1 year ago

getComputedStyle reports a wrong family for system fonts under certain conditions

Categories

(Core :: Layout: Text and Fonts, defect)

defect

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: pierov, Assigned: pierov)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fingerprinting])

Attachments

(3 files)

Steps to reproduce:

  1. enable font.system.whitelist. Possibly, exclude your default system font (e.g., do not allow Segoe UI on Windows, Cantarell/Ubuntu on Linux, etc)
  2. go to any site, and set a system font with the inspector tools, e.g., font: menu
  3. notice that the font you set on your system is ignored, and a font from the allowed list is shown, instead (e.g., Arial)
  4. check getComputedStyle(...).fontFamily on an element that is expected to have font: menu but is displaying the allowed font. Notice it reports the font that you set in your theme (e.g., Segoe UI, Cantarell, Ubuntu, etc). You would expect to see the font that is actually rendered, instead (e.g., Arial).

This is a problem for two reasons:

  1. it can leak users' information, and make fingerprinting easier
  2. it is not reporting what the website/app would like to know

I can provide a page to make the testing easier, if needed.

Whiteboard: [fingerprinting]
Summary: getComputedStyle reports wrong family with font.system.whitelist and system fonts → getComputedStyle reports a wrong family for system fonts under certain conditions

Originally I included font.system.whitelist in the title, but it could be misleading.

This happens whenever the font reported by the OS/toolkit cannot be rendered for any reason.

For example, we use a custom fontconfig file for Tor Browser on Linux, to make Firefox/FontConfig detect the bundled fonts as the only installed fonts in the system.
The outcome is the same: GTK tells Firefox menus should be rendered with Cantarell/Ubuntu/some other font, which is not available, but getComputedStyle reports it as fontFamily without checking it.

That's how css font families work? https://searchfox.org/mozilla-central/rev/3840d8109501fbebdf22212165ea15a391280dcb/widget/gtk/nsLookAndFeel.cpp#1021 is how we calc system fonts, it's just a family from the system. If that's not accessible somehow, then regular css rules apply.

We might want a "non-native" system font setup just like we have for colors?

(In reply to Emilio Cobos Álvarez (:emilio) from comment #2)

That's how css font families work? https://searchfox.org/mozilla-central/rev/3840d8109501fbebdf22212165ea15a391280dcb/widget/gtk/nsLookAndFeel.cpp#1021 is how we calc system fonts, it's just a family from the system. If that's not accessible somehow, then regular css rules apply.

Yes, for the fallback. But I think the standard is not very clear on what to set as the actual value for font-family and other properties.

We might want a "non-native" system font setup just like we have for colors?

What do you mean, exactly?

Only reporting the name of the actually used font, or adding some patch behind RFP to report also fake measurements and counter users' customization?

(In reply to Pier Angelo Vendrame from comment #3)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #2)
What do you mean, exactly?

Only reporting the name of the actually used font, or adding some patch behind RFP to report also fake measurements and counter users' customization?

The name of the actually used font is not implementable generally (you could have a font that exists but doesn't have many of the characters that the test is using and we'd end up falling back to another font).

The way these fonts work is we just assign a family that depends on the system setup (gtk theme / settings / etc), just like system colors.

We have all this "standin" setup for system colors for Tor (ui.use_standins_for_native_colors). It's not clear to me why the same reasoning wouldn't apply to system fonts (we'd just need to make sure we return a page-visible font).

make sure we return a page-visible font

return and user default proportional font + size so it matches locale/language

  • e.g. see window.getComputedStyle(document.body,null).getPropertyValue("font-family")

might be a little weird with sizes in looks and feels? note: mac already reports generic for -moz-window, and -moz-document: e.g. sans-serif 14px.

mac uses -apple-system and is unlikely to be an entropy source, so I assume we are talking windows and linux only?

(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)

The name of the actually used font is not implementable generally (you could have a font that exists but doesn't have many of the characters that the test is using and we'd end up falling back to another font).

You are right. I wrote "the font", but fontFamily could be several fonts.
Could reporting all the used fonts in the same way the inspector does work?

The way these fonts work is we just assign a family that depends on the system setup (gtk theme / settings / etc), just like system colors.

We have all this "standin" setup for system colors for Tor (ui.use_standins_for_native_colors). It's not clear to me why the same reasoning wouldn't apply to system fonts (we'd just need to make sure we return a page-visible font).

The idea would work for me, if I understood it correctly. I do not know anything about the implementation details 🙂️.

(In reply to Simon Mainey from comment #5)

make sure we return a page-visible font

return and user default proportional font + size so it matches locale/language

  • e.g. see window.getComputedStyle(document.body,null).getPropertyValue("font-family")

might be a little weird with sizes in looks and feels? note: mac already reports generic for -moz-window, and -moz-document: e.g. sans-serif 14px.

mac uses -apple-system and is unlikely to be an entropy source, so I assume we are talking windows and linux only?

That is another option, too, and probably similar to what Chromium does on Linux: in my system it reports Arial. However, I have not checked its source code.
(Chrome on Windows en-US reports Segoe UI, on Windows in Japanese it reports Yo Gothic UI, so it probably queries the theme).

(In reply to Pier Angelo Vendrame from comment #6)

Could reporting all the used fonts in the same way the inspector does work?

No, since that depends on layout and we wouldn't want to force layout when querying the font family.

Reading through the discussion: it sounds like the reported issue here is actually things working-as-intended, except that perhaps we'd like to apply some additional limitations if privacy.resistFingerprinting is set, to reduce fingerprinting surface. (Let me know if I'm misunderstanding that.)

Assuming I've got that correct -- it seems like the fingerprinting request here is related to what layout.css.font-visibility.resistFingerprinting is about, I think... (See Bug 1653987). That already sets some limitations that should help here. Though maybe it doesn't directly address the use-case where a user has explicitly chosen some specific font (from our list of allowed fonts) as their own personal default for the various generic font-family names. If I'm understanding correctly, it sounds like the suggestion here would be to return some sort of dummy or generic font name from getComputedStyle (when a web developer queries the font-family of an element that's using a generic font-family), to prevent the user-selected default font from being detectable there (analogous to ui.use_standins_for_native_colors).

I'm not sure that would add any robust protection here... Any web developer who actually about finding out this font (who has JS access to window.getComputedStyle) could also trivially use JS to determine your font metrics in that case, by generating a dummy div and putting arbitrary text inside it, and measuring the size of the dummy div (or seeing where how many characters are required to trigger a linewrap, etc). This can give them a pretty good idea of what font you're actually using, just using basic web-exposed layout/geometry APIs. They may not even need to take the additional step of identifying the exact font -- this layout/geometry info might actually be even better from a fingerprinting perspective, since it may differentiate between different versions of the font, different low-level font libraries, etc.

(This isn't true for colors, since colors don't impact layout and aren't usually directly measurable/observable; hence, use_standins_for_native_colors is a more robust protection for system-colors than an analogous setting would be for fonts.)

So if I'm understanding correctly, I'm not sure there's really a robust protection we could offer here (beyond what bug 1653987 already offers). Essentially: if we let a web page render text using a user-selected font, and the that web page has JS access, then there are lots of ways for the web page to figure out what the font is or get identifying data about it, using standard layout APIs that we can't really nerf.

Am I missing anything? Any other ideas about things we could realistically offer here?

Severity: -- → S3

That is all correct. We can't nerf dozens of measurement methods. There are two issues. Let me sum up

note: if the user is not resisting fingerprinting in any way, then we shouldn't do anything about that IMO, and AFAICT what is reported and used is correct

The first issue is that when the font is not allowed (due to font vis level, or font whitelist), then the theme changes are still reported as per the OS - so this leaks entropy. All users, hopefully, are actually using or falling back to the same font, and thus measurement entropy is removed (excluding equivalency from say sub-pixels/DPI/scaling and other factors).

The second is that not all users are using/falling back to the same font: e.g. windows JA is different from windows en-US, or the user modified the theme to use a different font on the allow list. So in that regard, we're not as tightly controlled as we would like to be

And this is not just the font-family, but also size and other properties


The only way for this particular issue to be solved is (when resisting: e.g. RFP or font whitelist) to set/enforce an allowed universal font-family + properties (to take care of measurements which you cannot hide) and thus getComputedStyles should automatically report correctly as well (or fix it if it isn't). In other words, bypass theme altogether

So what to use, that will always be allowed, and universal (across each major platform at a minimum, with sizes and weights etc, across regional OSes - e.g. CJK vs western). And I think the answer is to use the default proportional font (which will match the web language = equivalency) and thus is consistent per platform. How easy that is to engineer, or what side effects it might have (this is RFP/TB after all, so we can always try it), I don't know. That's why you guys get paid the big bucks. But this is the only way to solve it IMO

option 1: make getComputedStyles report correctly (there will still be a long tail and some buckets of users by default)
option 2: check 1 works but also enforce e.g. default proportional (which is going to be monospace, serif, sans-serif)

(In reply to Daniel Holbert [:dholbert] from comment #8)

Reading through the discussion: it sounds like the reported issue here is actually things working-as-intended, except that perhaps we'd like to apply some additional limitations if privacy.resistFingerprinting is set, to reduce fingerprinting surface. (Let me know if I'm misunderstanding that.)

Yes, that is my main concern.

Assuming I've got that correct -- it seems like the fingerprinting request here is related to what layout.css.font-visibility.resistFingerprinting is about, I think... (See Bug 1653987). That already sets some limitations that should help here. Though maybe it doesn't directly address the use-case where a user has explicitly chosen some specific font (from our list of allowed fonts) as their own personal default for the various generic font-family names.

Please notice that the choice might not be that explicit, and it might be outside the allowed fonts.
The default fonts on Windows depend on the locale (e.g., 10 uses Segoe UI for English, and Yo Gothic UI for Japanese; the latter is not in gfx/thebes/StandardFonts-win10.inc).
On Linux the situation is even more delicate: the desktop environment and/or the distribution set these fonts (and Firefox has font lists only for Ubuntu and Fedora).

Also, the concern is especially about system fonts (font: caption | icon | menu | message-box | small-caption | status-bar;), not generic families.

If I'm understanding correctly, it sounds like the suggestion here would be to return some sort of dummy or generic font name from getComputedStyle (when a web developer queries the font-family of an element that's using a generic font-family), to prevent the user-selected default font from being detectable there (analogous to ui.use_standins_for_native_colors).

I'm not sure that would add any robust protection here... Any web developer who actually about finding out this font (who has JS access to window.getComputedStyle) could also trivially use JS to determine your font metrics in that case, by generating a dummy div and putting arbitrary text inside it, and measuring the size of the dummy div (or seeing where how many characters are required to trigger a linewrap, etc). This can give them a pretty good idea of what font you're actually using, just using basic web-exposed layout/geometry APIs. They may not even need to take the additional step of identifying the exact font -- this layout/geometry info might actually be even better from a fingerprinting perspective, since it may differentiate between different versions of the font, different low-level font libraries, etc.

getComputedStyle might report either an allowed or a disallowed font.
In case of the allowed font, metrics can be used too, and we can only enforce the same font for everybody/ignore the theme. But if the font is disallowed, another one is used as a fallback, and the font properties (family, size, etc...) are the additional information.

(In reply to Simon Mainey from comment #9)

The only way for this particular issue to be solved is (when resisting: e.g. RFP or font whitelist) to set/enforce an allowed universal font-family + properties (to take care of measurements which you cannot hide) and thus getComputedStyles should automatically report correctly as well (or fix it if it isn't). In other words, bypass theme altogether

After thinking a while, I agree that this could be the best solution.
My only concern regarding size is a11y (e.g., if a users set big UI fonts without zooming the whole UI for accessibility reasons).

I don't know much about the font subsystem and how it deals with user preference but...

(In reply to Daniel Holbert [:dholbert] from comment #8)

if we let a web page render text using a user-selected font

Do we have to let it? If RFP is on, can we just override that preference?

This patch seems to do what we want.
I have changed nsXPLookAndFeel::GetFontValue rather than NativeGetFont because NativeGetFont has several implementations (one is GTK, one is Windows and one is Android).
I chose 12px as it is the default size that is used on Windows, but I can add more ifdefs, if needed.
For macOS, I used -apple-system to improve the UX, since the OS could be obtained in other ways.

Would this approach work for you?
In case, I could send a patch for 107 through phabricator for a proper review.

Thanks in advance!

Assignee: nobody → pierov

I haven't followed the details of the discussion here closely, so I may be missing important aspects, but offhand I wonder whether it'd make sense to simply return system-ui for these fonts, rather than sans-serif or -apple-system?

(In reply to Jonathan Kew [:jfkthame] from comment #13)

I haven't followed the details of the discussion here closely, so I may be missing important aspects, but offhand I wonder whether it'd make sense to simply return system-ui for these fonts, rather than sans-serif or -apple-system?

Actually, my investigation started from the introduction of system-ui.
Bug 1722009 maps system-ui to the same family as font: menu;, so I think it would not work, but I have not tried, yet.

Ah, right -- probably it'd just infinitely-recurse trying to resolve it! That's unfortunate... :-\

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".

Attachment #9306198 - Attachment description: Bug 1787790: Normalize system fonts with RFP on. r=jfkthame → Bug 1787790 - Normalize system fonts with RFP on. r?jfkthame
Attachment #9306198 - Attachment description: Bug 1787790 - Normalize system fonts with RFP on. r?jfkthame → Bug 1787790: Normalize system fonts with RFP on. r?jfkthame,emilio
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/da2ce8506b46 Normalize system fonts with RFP on. r=emilio

Backed out for causing build bustages related to nsLayoutUtils.cpp.

[task 2024-05-13T09:27:02.372Z] 09:27:02     INFO -  mkdir -p '.deps/'
[task 2024-05-13T09:27:02.373Z] 09:27:02     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/third_party/libwebrtc/api/field_trials_registry_gn'
[task 2024-05-13T09:27:02.382Z] 09:27:02     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/third_party/libwebrtc/api/field_trials_registry_gn'
[task 2024-05-13T09:27:02.382Z] 09:27:02     INFO -  third_party/libwebrtc/api/field_trials_registry_gn/Unified_cpp_d_trials_registry_gn0.o
[task 2024-05-13T09:27:02.383Z] 09:27:02     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/third_party/libwebrtc/api/field_trials_registry_gn'
[task 2024-05-13T09:27:02.415Z] 09:27:02     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/third_party/libwebrtc/api/audio_codecs/ilbc/audio_decoder_ilbc_gn'
[task 2024-05-13T09:27:02.419Z] 09:27:02     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang++ -isysroot /builds/worker/fetches/MacOSX14.4.sdk -mmacosx-version-min=10.15 -stdlib=libc++ --target=x86_64-apple-darwin -o Unified_cpp_udio_decoder_ilbc_gn0.o -c  -I/builds/worker/workspace/obj-build/dist/stl_wrappers -fvisibility=hidden -fvisibility-inlines-hidden -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG -DTRIMMED=1 -DABSL_ALLOCATOR_NOTHROW=1 -DRTC_DAV1D_IN_INTERNAL_DECODER_FACTORY -DRTC_ENABLE_VP9 -DWEBRTC_ENABLE_PROTOBUF=0 -DWEBRTC_LIBRARY_IMPL -DWEBRTC_MOZILLA_BUILD -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_STRICT_FIELD_TRIALS=0 -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DNVALGRIND -DWEBRTC_MAC -DWEBRTC_POSIX -D_LIBCPP_HAS_NO_ALIGNED_ALLOCATION -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DWEBRTC_ENABLE_AVX2 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/builds/worker/checkouts/gecko/third_party/libwebrtc/api/audio_codecs/ilbc/audio_decoder_ilbc_gn -I/builds/worker/workspace/obj-build/third_party/libwebrtc/api/audio_codecs/ilbc/audio_decoder_ilbc_gn -I/builds/worker/workspace/obj-build/ipc/ipdl/_ipdlheaders -I/builds/worker/workspace/obj-build/third_party/libwebrtc/gen -I/builds/worker/checkouts/gecko/ipc/chromium/src -I/builds/worker/checkouts/gecko/third_party/libwebrtc -I/builds/worker/checkouts/gecko/third_party/libwebrtc/third_party/abseil-cpp -I/builds/worker/checkouts/gecko/tools/profiler/public -I/builds/worker/workspace/obj-build/dist/include -DMOZILLA_CLIENT -include /builds/worker/workspace/obj-build/mozilla-config.h -fno-sized-deallocation -fno-aligned-new -fcrash-diagnostics-dir=/builds/worker/artifacts -fno-exceptions -fPIC -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -gdwarf-4 -Xclang -load -Xclang /builds/worker/workspace/obj-build/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O3 -fno-omit-frame-pointer -funwind-tables -Wall -Wbitfield-enum-conversion -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtautological-constant-in-range-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wunused-but-set-parameter -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wenum-compare-conditional -Wenum-float-conversion -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-deprecated-this-capture -Wcomma -Wimplicit-fallthrough -Wduplicate-method-arg -Wduplicate-method-match -Wmissing-method-return-type -Wobjc-signed-char-bool -Wsemicolon-before-method-body -Wsuper-class-method-mismatch -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wformat -Wformat-security -Wno-psabi -Wthread-safety -Werror=unguarded-availability-new -Wno-error=builtin-macro-redefined -Wno-unknown-warning-option -fno-strict-aliasing -ffp-contract=off  -MD -MP -MF .deps/Unified_cpp_udio_decoder_ilbc_gn0.o.pp   Unified_cpp_udio_decoder_ilbc_gn0.cpp
[task 2024-05-13T09:27:02.419Z] 09:27:02     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/third_party/libwebrtc/api/audio_codecs/ilbc/audio_decoder_ilbc_gn'
[task 2024-05-13T09:27:02.420Z] 09:27:02     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/third_party/libwebrtc/api/audio_codecs/ilbc/audio_decoder_ilbc_gn'
[task 2024-05-13T09:27:02.420Z] 09:27:02     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/third_party/libwebrtc/api/audio_codecs/ilbc/audio_decoder_ilbc_gn'
[task 2024-05-13T09:27:02.420Z] 09:27:02     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/layout/base'
[task 2024-05-13T09:27:02.424Z] 09:27:02     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang++ -isysroot /builds/worker/fetches/MacOSX14.4.sdk -mmacosx-version-min=10.15 -stdlib=libc++ --target=x86_64-apple-darwin -o Unified_cpp_layout_base2.o -c  -I/builds/worker/workspace/obj-build/dist/stl_wrappers -fvisibility=hidden -fvisibility-inlines-hidden -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1 -DTRIMMED=1 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/builds/worker/checkouts/gecko/layout/base -I/builds/worker/workspace/obj-build/layout/base -I/builds/worker/workspace/obj-build/ipc/ipdl/_ipdlheaders -I/builds/worker/checkouts/gecko/ipc/chromium/src -I/builds/worker/checkouts/gecko/layout/forms -I/builds/worker/checkouts/gecko/layout/generic -I/builds/worker/checkouts/gecko/layout/mathml -I/builds/worker/checkouts/gecko/layout/painting -I/builds/worker/checkouts/gecko/layout/printing -I/builds/worker/checkouts/gecko/layout/style -I/builds/worker/checkouts/gecko/layout/tables -I/builds/worker/checkouts/gecko/layout/xul -I/builds/worker/checkouts/gecko/layout/xul/tree -I/builds/worker/checkouts/gecko/docshell/base -I/builds/worker/checkouts/gecko/dom/base -I/builds/worker/checkouts/gecko/dom/html -I/builds/worker/checkouts/gecko/dom/svg -I/builds/worker/checkouts/gecko/dom/xul -I/builds/worker/checkouts/gecko/view -I/builds/worker/workspace/obj-build/dist/include -I/builds/worker/workspace/obj-build/dist/include/nspr -I/builds/worker/workspace/obj-build/dist/include/nss -DMOZILLA_CLIENT -include /builds/worker/workspace/obj-build/mozilla-config.h -fno-sized-deallocation -fno-aligned-new -fcrash-diagnostics-dir=/builds/worker/artifacts -fno-exceptions -fPIC -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -gdwarf-4 -Xclang -load -Xclang /builds/worker/workspace/obj-build/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O3 -fno-omit-frame-pointer -funwind-tables -Werror -Wall -Wbitfield-enum-conversion -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtautological-constant-in-range-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wunused-but-set-parameter -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wenum-compare-conditional -Wenum-float-conversion -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-deprecated-this-capture -Wcomma -Wimplicit-fallthrough -Wduplicate-method-arg -Wduplicate-method-match -Wmissing-method-return-type -Wobjc-signed-char-bool -Wsemicolon-before-method-body -Wsuper-class-method-mismatch -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wformat -Wformat-security -Wno-psabi -Wthread-safety -Werror=unguarded-availability-new -Wno-error=builtin-macro-redefined -Wno-unknown-warning-option -fno-strict-aliasing -ffp-contract=off  -MD -MP -MF .deps/Unified_cpp_layout_base2.o.pp   Unified_cpp_layout_base2.cpp
[task 2024-05-13T09:27:02.424Z] 09:27:02     INFO -  In file included from Unified_cpp_layout_base2.cpp:20:
[task 2024-05-13T09:27:02.424Z] 09:27:02    ERROR -  /builds/worker/checkouts/gecko/layout/base/nsLayoutUtils.cpp:9728:5: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
[task 2024-05-13T09:27:02.424Z] 09:27:02     INFO -   9728 |     case LookAndFeel::FontID::MessageBox:
[task 2024-05-13T09:27:02.424Z] 09:27:02     INFO -        |     ^
[task 2024-05-13T09:27:02.425Z] 09:27:02     INFO -  /builds/worker/checkouts/gecko/layout/base/nsLayoutUtils.cpp:9728:5: note: insert 'U_FALLTHROUGH;' to silence this warning
[task 2024-05-13T09:27:02.425Z] 09:27:02     INFO -   9728 |     case LookAndFeel::FontID::MessageBox:
[task 2024-05-13T09:27:02.425Z] 09:27:02     INFO -        |     ^
[task 2024-05-13T09:27:02.425Z] 09:27:02     INFO -        |     U_FALLTHROUGH;
[task 2024-05-13T09:27:02.425Z] 09:27:02     INFO -  /builds/worker/checkouts/gecko/layout/base/nsLayoutUtils.cpp:9728:5: note: insert 'break;' to avoid fall-through
[task 2024-05-13T09:27:02.425Z] 09:27:02     INFO -   9728 |     case LookAndFeel::FontID::MessageBox:
[task 2024-05-13T09:27:02.425Z] 09:27:02     INFO -        |     ^
[task 2024-05-13T09:27:02.426Z] 09:27:02     INFO -        |     break;
[task 2024-05-13T09:27:02.426Z] 09:27:02     INFO -  1 error generated.
[task 2024-05-13T09:27:02.426Z] 09:27:02    ERROR -  gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:688: Unified_cpp_layout_base2.o] Error 1
[task 2024-05-13T09:27:02.426Z] 09:27:02     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/layout/base'
[task 2024-05-13T09:27:02.426Z] 09:27:02     INFO -  gmake[4]: Target 'target-objects' not remade because of errors.
[task 2024-05-13T09:27:02.426Z] 09:27:02    ERROR -  gmake[3]: *** [/builds/worker/checkouts/gecko/config/recurse.mk:72: layout/base/target-objects] Error 2
[task 2024-05-13T09:27:02.427Z] 09:27:02     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/third_party/libwebrtc/api/media_stream_interface_gn'
[task 2024-05-13T09:27:02.427Z] 09:27:02     INFO -  mkdir -p '.deps/'
Flags: needinfo?(pierov)

Sent a new revision with [[fallthrough]]; (and also re-added the DOCTYPE and <meta charset="utf-8"> since I was at it.

Flags: needinfo?(pierov)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3b0e258b8a65 Normalize system fonts with RFP on. r=emilio
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
Attached image verified.png

verified fixed (at least on windows) - note test is not updated online

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: