Open Bug 1745719 Opened 2 years ago Updated 1 year ago

OneNote is broken (with strict tracking protection settings, in some configurations, after bug 1715501)

Categories

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

Firefox 95
x86_64
Linux
defect

Tracking

()

Tracking Status
firefox-esr91 --- unaffected
firefox95 --- wontfix
firefox96 --- wontfix
firefox97 --- fix-optional

People

(Reporter: iyanmv, Unassigned, NeedInfo)

References

(Blocks 1 open bug, Regression, )

Details

(Keywords: correctness, regression)

Attachments

(4 files, 3 obsolete files)

Attached image OneNote_Firefox.png

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0

Steps to reproduce:

Since Firefox 94, OneNote notebooks are not rendered properly. To reproduce, open a new notebook (or existing one) in OneNote using Firefox 94 or Firefox 95, and observe. This is a regression because in Firefox 93.0 it was working correctly.

Actual results:

Separation between lines is huge, and header with date is also displaced (see screenshot).

Expected results:

Notebooks should be rendered as in Chrome or Firefox <= 93.0

Attached image OneNote_Chrome.png

For comparison, here is the same Notebook opened on Chrome.

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

Thanks for the report!
Please try to find a regression range. You will get a pushlog URL at the end:
$ pip3 install --user mozregression
$ ~/.local/bin/mozregression --good 93 --bad 94 -a https://example.com

OS: Unspecified → Linux
Hardware: Unspecified → x86_64

Interesting! I didn't know this tool, very useful. Unfortunately, I cannot reproduce the issue when I run mozregression, neither on version 94 or 95. So I guess is something specific from the binary provided by Arch Linux. Any ideas to further debug this?

Please open about:support, click on "Copy text to clipboard" and paste it here. Thanks!

Attached file about:support

Does this problem still occur if you disable all of your addons and reload the website with Ctrl+F5?

It it reproducible with mozregression when using your custom settings? For example:
$ MOZ_USE_XINPUT2=1 ~/.local/bin/mozregression --launch 95 --pref fission.autostart:true gfx.webrender.all:true widget.use-xdg-desktop-portal:true privacy.trackingprotection.enabled:true privacy.trackingprotection.socialtracking.enabled:true privacy.partition.network_state.ocsp_cache:true network.cookie.cookieBehavior:5 network.trr.blocklist_cleanup_done:true dom.security.https_only_mode:true -a https://example.com

QA Whiteboard: [qa-regression-triage]

(In reply to Darkspirit from comment #7)

Does this problem still occur if you disable all of your addons and reload the website with Ctrl+F5?

Yes.

It it reproducible with mozregression when using your custom settings? For example:
$ MOZ_USE_XINPUT2=1 ~/.local/bin/mozregression --launch 95 --pref fission.autostart:true gfx.webrender.all:true widget.use-xdg-desktop-portal:true privacy.trackingprotection.enabled:true privacy.trackingprotection.socialtracking.enabled:true privacy.partition.network_state.ocsp_cache:true network.cookie.cookieBehavior:5 network.trr.blocklist_cleanup_done:true dom.security.https_only_mode:true -a https://example.com

Yes! Now it also looks bad (like in the screenshot that I attached). I will see if I can find the commit that introduced the issues.

Thanks for the help!

Here it is:

31:56.40 INFO: Last good revision: 7518e48eae5786a363fca3ae42955003a2cd5138
31:56.40 INFO: First bad revision: fff777ea5637c5f0aac0795b20e37fe86b2ac163
31:56.40 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=7518e48eae5786a363fca3ae42955003a2cd5138&tochange=fff777ea5637c5f0aac0795b20e37fe86b2ac163

Attached file mozregression full output (obsolete) —
Attached file mozregression full output (obsolete) —
Attached file mozregression full output (obsolete) —
Attachment #9255204 - Attachment is obsolete: true
Attachment #9255205 - Attachment is obsolete: true
Attachment #9255206 - Attachment is obsolete: true

Sorry about attaching so many times. I was getting an error when submitting, but it was actually doing it right. Anyways, hope now is good. Please, let me know if I can do anything else from my part to help debug this.

It's:

Bug 1715537 - Log a warning to the web console when a font request is blocked due to font-visibility restrictions. r=emilio
Bug 1715507 - Support different levels of font-visibility per context, depending on tracking/fingerprinting protection settings. r=emilio
Bug 1715501 - patch 2 - Pass the presContext to platform font lookup methods so they can query it for font visibility. r=emilio
Bug 1715501 - patch 1 - Track codepoints with no available fonts and replacement-char family separately for each font-visibility level. r=emilio

Emilio, any idea here?
Thanks.

Flags: needinfo?(emilio)

Changed component per regression range.

Component: Widget: Gtk → Layout: Text and Fonts

I haven't been able to repro this in a OneNote instance I have access to, fwiw, even with tracking protection... Two things:

  • Does the very latest Nightly with those settings still reproduce the issue? (Bug 1745715 is sorta-related and may have fixed this).
  • What font is the page using for you? In the instance I have access to from university, the content has font-family: Symbol, sans-serif; (and the font we find is the sans-serif font). Is that the case for you as well? (you can check with Shift+right click -> Inspect -> Fonts panel)
Flags: needinfo?(emilio) → needinfo?(iyanmv)

ni? jonathan in case he has extra ideas

Flags: needinfo?(jfkthame)

Oh, another obvious thing to check is whether there's a message in the console for you like: Request for font <...> blocked at visibility level <...>

Status: UNCONFIRMED → NEW
Ever confirmed: true
Regressed by: 1715501
Summary: OneNote is broken → OneNote is broken (with strict tracking protection settings, in some configurations, after bug 1715501)
Has Regression Range: --- → yes

(In reply to Iyán from comment #14)

(Emilio Cobos Álvarez (:emilio) from comment #17)

  • Does the very latest Nightly with those settings still reproduce the issue? (Bug 1745715 is sorta-related and may have fixed this).

This launches latest Nightly build:
MOZ_USE_XINPUT2=1 ./bin/mozregression --launch 20211214094205 --pref fission.autostart:true gfx.webrender.all:true widget.use-xdg-desktop-portal:true privacy.trackingprotection.enabled:true privacy.trackingprotection.socialtracking.enabled:true privacy.partition.network_state.ocsp_cache:true network.cookie.cookieBehavior:5 network.trr.blocklist_cleanup_done:true dom.security.https_only_mode:true -a https://outlook.office.com/

If it has been fixed, please try to find a fix range:
MOZ_USE_XINPUT2=1 ./bin/mozregression --find-fix --bad 95 --good 20211214094205 --pref fission.autostart:true gfx.webrender.all:true widget.use-xdg-desktop-portal:true privacy.trackingprotection.enabled:true privacy.trackingprotection.socialtracking.enabled:true privacy.partition.network_state.ocsp_cache:true network.cookie.cookieBehavior:5 network.trr.blocklist_cleanup_done:true dom.security.https_only_mode:true -a https://outlook.office.com/

(In reply to Darkspirit from comment #20)
(Emilio Cobos Álvarez (:emilio) from comment #17)

  • Does the very latest Nightly with those settings still reproduce the issue? (Bug 1745715 is sorta-related and may have fixed this).

This launches latest Nightly build:
MOZ_USE_XINPUT2=1 ./bin/mozregression --launch 20211214094205 --pref fission.autostart:true gfx.webrender.all:true widget.use-xdg-desktop-portal:true privacy.trackingprotection.enabled:true privacy.trackingprotection.socialtracking.enabled:true privacy.partition.network_state.ocsp_cache:true network.cookie.cookieBehavior:5 network.trr.blocklist_cleanup_done:true dom.security.https_only_mode:true -a https://outlook.office.com/

Yes, I still see the issue in that nightly.

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

  • What font is the page using for you? In the instance I have access to from university, the content has font-family: Symbol, sans-serif; (and the font we find is the sans-serif font). Is that the case for you as well? (you can check with Shift+right click -> Inspect -> Fonts panel)

No, in this instance they have:

.UIFont, .AppHeaderPanel, .WACFrame, .WACFrameWord, .ewa-root-ltr, .ewa-root-rtl, .cui-menu, .WACDialogButtonNormal, .WACBusinessBarButton, .WACDialogPanel, .AppRegionComposer {
font-family: "Segoe UI", "Segoe UI Web", Arial, Verdana, sans-serif;
font-size: 9pt;
}

And in the font panel I see DejaVu Sans as fonts used.

Notice that other elements without text are displaced as well (e.g. the gray bar separating the title and the date). Can this be caused only by font issues?

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

Oh, another obvious thing to check is whether there's a message in the console for you like: Request for font <...> blocked at visibility level <...>

There are many warnings and errors, most of them "Cross-Origin Request Blocked". In particular, regarding fonts I see these three:

downloadable font: download failed (font-family: "HeaderPlaceholderIcons" style:normal weight:400 stretch:100 src index:0): bad URI or cross-site access not allowed source: https://c1-onenote-15.cdn.office.net/o/s/hE5C1E39EBD126206_App_Scripts/fonts/sharedheaderplaceholder-icons.woff

downloadable font: download failed (font-family: "Calibri_MSFontService" style:normal weight:400 stretch:100 src index:0): bad URI or cross-site access not allowed source: https://fs.microsoft.com/fs/4.17/rawguids/44327025345

downloadable font: download failed (font-family: "TH SarabunPSK_MSFontService" style:normal weight:400 stretch:100 src index:0): bad URI or cross-site access not allowed source: https://fs.microsoft.com/fs/4.17/rawguids/40796829544

Flags: needinfo?(iyanmv)

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

ni? jonathan in case he has extra ideas

Not really.... and I don't think I have access to OneNote to investigate directly.

As a wild guess: for some reason we're picking up a font with huge line metrics (as seen in some math symbol fonts, for example) and using this to set line-box height. But I don't see why that would be happening. Maybe there's something in a fontconfig configuration that maps "Symbol" to a LaTeX font or some such?

FWIW, Arch Linux is not one of the distros where we currently have a list of "standard" fonts, so the font-visibility restriction shouldn't have any effect there; all fonts should simply be categorized as "unknown" visibility. So it's unclear why the trackingprotection setting would be affecting this at all.... that sounds like it's probably a bug, but hard to investigate until we figure out how to trigger the problem.

edit: mid-aired with comment 21; after seeing that, I guess it's not related to "Symbol", at least. But I wonder if there's a font package installed that is inserting a LaTeX-style math font ahead of standard font-family names?

Iyán, do you have any math/science/tech-related packages installed that might provide fonts for math equations? We've seen spacing issues related to such fonts in the past -- e.g. some versions of Latin Modern, Cambria Math, and maybe others.

Flags: needinfo?(jfkthame)
Flags: needinfo?(iyanmv)
Blocks: tp-breakage

(In reply to Jonathan Kew (:jfkthame) from comment #22)

Iyán, do you have any math/science/tech-related packages installed that might provide fonts for math equations? We've seen spacing issues related to such fonts in the past -- e.g. some versions of Latin Modern, Cambria Math, and maybe others.

Yes, I do have many. Basically, all latex packages provided by Arch and even some more that I installed manually.

Flags: needinfo?(iyanmv)

Also, Mathematica, Matlab... but for sure I didn't install/uninstall anything when I first noticed the issue (when upgrading from Firefox 93 to Firefox 94). At first I thought it was a OneNote issue and didn't report it here.

Set release status flags based on info from the regressing bug 1715501

Linked issue seems relevant too. Reporter, does setting:

  • layout.css.font-visibility.trackingprotection=2
  • layout.css.font-visibility.standard=2

Fix it for you?

Flags: needinfo?(iyanmv)

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

Linked issue seems relevant too. Reporter, does setting:

  • layout.css.font-visibility.trackingprotection=2
  • layout.css.font-visibility.standard=2

Fix it for you?

No, same issue. But interesting link! He is also using Arch Linux and he reported that after deleting some math fonts problem went away. I will try to see if I can figure it out deleting one by one.

Flags: needinfo?(iyanmv)

Okay, I solved it in a different way. Instead of uninstalling any fonts, I followed these steps from the wiki to make latex fonts available to fontconfig:
https://wiki.archlinux.org/title/TeX_Live#Making_fonts_available_to_Fontconfig

In particular, I created this symbolic link:

ln -s /usr/share/fontconfig/conf.avail/09-texlive-fonts.conf /etc/fonts/conf.d/09-texlive-fonts.conf

And updated fontconfig:
$ fc-cache && mkfontscale && mkfontdir

Any ideas why this fixes the issue? Should I report this on Arch? At least I will make a little comment on the Firefox wiki, but I should first understand first why is failing in the first place now and not before version 94.

Thanks for all the help.

Maybe jonathan knows about comment 28? I can try to install Arch and repro this when I have some font.

Flags: needinfo?(jfkthame)
Webcompat Priority: --- → ?

This appears to be an old Linux-only bug? If so, this isn't a webcompat issue, but a regular Firefox bug. Unsetting the flag as such.

Webcompat Priority: ? → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: