Repository navigation
Compare strict and ordinary pages after the page font has loaded - #536
Conversation
The page font uses font-display swap, so a page measured before it loads lays out in the fallback font. The strict page contract snapshotted each page straight after the load event, and on a busy runner one of the two pages was sometimes still in the fallback font: the adaptive page's section measured 451.656px instead of 456.812px, on either side of the comparison. Forcing a fallback font locally reproduces exactly that 451.656px height. Both pages now wait for document.fonts.ready and the relayout that follows before they are compared.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
StrictStyleTests.StrictPageRendersLikeTheOrdinaryPageUnderAStrictPolicy(interactive-adaptive-page)failed twice on main on Windows Chromium. The adaptive page's section measured 456.812px on one page and 451.656px on the other, and the two runs had the values on opposite sides of the comparison. So this is a race, not a difference the strict policy causes.The page font (Archivo) uses
font-display: swap. The contract snapshotted both pages straight after the load event, so on a busy runner one page could still be laid out in the fallback font. Forcing a fallback font locally gives exactly the 451.656px section height from CI. Both pages now wait fordocument.fonts.readyand the relayout after it before they are compared.Checked with the strict style tests in Chromium and WebKit, and the strict page contract run five times under CPU load.
Summary by CodeRabbit