Numerous CSS tests are incorrectly marked as failing in Edge due to Ahem anti-aliasing on Windows
In April 2024 changes were implemented to remove anti-aliasing from the Ahem font to avoid incorrectly marking tests as failures due to small pixel differences that were caused because of it. This issue was discussed in https://github.com/web-platform-tests/wpt/issues/45750 . This issue affects Chromium based browsers that run their tests on Windows. In the WPT infrastructure, Chrome canary runs in Linux while Edge dev runs on Windows, which is why we don't see Chrome failing these tests.
In March 2025, a new feature was implemented in Chromium (NoFontAntialiasing) to disable anti-aliasing for all fonts in Windows in testing environments (CL:6313879). After this was implemented, the Ahem AA feature was removed from the WPT runner configuration in https://github.com/web-platform-tests/wpt/pull/51566 , but it was not replaced by the new anti-aliasing feature. This caused Chrome in Windows to start failing all these tests again. Take the example posted in https://github.com/web-platform-tests/wpt/issues/45750 that had been fixed, but is now failing again:
css/css-overflow/scrollbar-gutter-dynamic-001.html.
To address this regression, we have two options:
- Reinstate the Ahem font restriction: We would have to revert the changes that were made in Chromium and this repo. With this, WPT tests with regular fonts would maintain the type of rendering a user would see, but tests that render the ahem font would be fixed. This was preferred at the time because the Ahem font is specifically designed for tests, so altering it's rendering wouldn't modify user's experiences at all.
- Make the WPT runner use the new
NoFontAntialiasingfeature: This would disable antialiasing for all fonts, which reflects how chromium's test infrastructure is currently running.
Currently, Safari (link) and Firefox (link) disable anti-aliasing only for the Ahem font.
@tcaptan-cr @KyleJu can you please help resolve this regression?
cc: @ogerchikov @KurtCattiSchmidt
See also: #51268, #20058, maybe #5498.
Thanks for the links, I can see that the intention was to just turn off AA for all fonts; it seems like they just forgot to enable the new flag in the chrome runner.
Merged the PR that enabled the new flag, and verified that the change is live. Around 2160~ tests were fixed for Edge.