Skip to content

[backport] Fix Firefox font-size precision failures in revealjs tests (#14854) - #14862

Merged
cderv merged 1 commit into
v1.10from
backport/14854
Sep 7, 2026
Merged

cderv merged 1 commit into
v1.10from
backport/14854

Conversation

@cderv

@cderv cderv commented Sep 7, 2026

Copy link
Copy Markdown
Member

Backport of #14854 to v1.10.

Test-only change, no user-facing impact: revealjs-themes.spec.ts was failing deterministically on Firefox in scheduled CI due to subpixel rounding drift (~0.006px) past the toBeCloseTo decimal-precision threshold. Replaces it with a fixed absolute pixel tolerance, matching Playwright's own approach for cross-engine CSS rounding drift.

Firefox resolves the compounding em/rem font-size cascade used by
revealjs's smaller-slide/callout scaling with slightly different
subpixel rounding than Chromium/WebKit, drifting ~0.006px past the
default toBeCloseTo threshold (0.005, from numDigits=2). That default
is decimal-digit based, not pixel based, so it's scale-blind and too
tight for cross-engine cascade rounding drift.

Playwright's own test suite hits the same class of bug (CSS<->DIP
rounding drift across engines) and solves it with a fixed absolute
pixel tolerance instead of toBeCloseTo(numDigits). Follow that
pattern here via a shared expectCloseTo helper.

(cherry picked from commit 1277ca4)
@posit-snyk-bot

posit-snyk-bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cderv
cderv merged commit 3954aa5 into v1.10 Sep 7, 2026
44 checks passed
@cderv
cderv deleted the backport/14854 branch September 7, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants