Repository navigation
test: Compare math script baselines, not box tops - #26035
Merged
MartinZikmund merged 1 commit intoNov 5, 2026
Merged
Conversation
ramezgerges
approved these changes
Nov 4, 2026
Contributor
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
The script assertions compared caret-box tops across scales, which depends on the math font's line box: with Noto Sans Math (picked on WASM when an earlier test already downloaded it) the base's top sits above a raised superscript's top. Compare baselines instead, which is what the layout actually shifts. Refs #26016 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Xiaoy312
force-pushed
the
dev/xygu/20261103/richeditbox-math-wasm-flake
branch
from
November 4, 2026 18:52
e70850a to
987eed2
Compare
Contributor
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
Contributor
|
The build 243720 found UI Test snapshots differences: Details
|
MartinZikmund
deleted the
dev/xygu/20261103/richeditbox-math-wasm-flake
branch
November 5, 2026 09:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Issue: related to #26016 (stabilizes the test; the WASM math-font nondeterminism and the fallback-service batching race described there are still open)
PR Type:
🏗️ Build or CI related changes (test stabilization)
What changed? 🚀
Given_RichEditBox.When_Advanced_Math_Layout_Is_Bounded_And_Maps_Scriptsfails WebAssembly Skia Runtime Tests shard 3 in about 1 in 4 master builds since 2026-10-30, onpreSup.Y < baseRect.Y.The script assertions compared the tops of the caret rects of a base and its scripts. That depends on the math font's line box. On WASM,
RichEditBoxuses Noto Sans Math when an earlier test has already downloaded it, and Open Sans otherwise (see #26016 for why that happens). With Noto Sans Math, the base letter's box is tall enough that its top sits above the top of the raised, smaller superscript, so the assertion fails even though the layout is correct.This PR compares baselines (
MathParsedText.GetBaselineForIndex) instead. That is what the layout actually shifts:ScriptBoxandMultiScriptsBoxmove superscripts up and subscripts down by amounts that are never zero, including with the fallback metrics for fonts without a MATH table (0.55em up, 0.25em down).Changes:
When_Advanced_Math_Layout_Is_Bounded_And_Maps_Scripts: the fourmmultiscriptsassertions compare baselines.When_Structured_Math_Layout_Maps_Core_Markers: themsubsuppair had the same top comparison across scales, so it compares baselines too.No product code changes.
Validation (runtime, local):
Given_CurrencyFormatter.When_FormatDoubleWithSpecialCurrencyCodefirst, Arabic font download delayed 1.5 s (this configuration failed with the old assertion)The delay in the first row came from local-only instrumentation that is not part of this PR.
PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code