script: Delay screenshots until the first rendering update after fonts.ready#39963
Merged
mrobinson merged 1 commit intoservo:mainfrom Oct 17, 2025
Merged
script: Delay screenshots until the first rendering update after fonts.ready#39963mrobinson merged 1 commit intoservo:mainfrom
fonts.ready#39963mrobinson merged 1 commit intoservo:mainfrom
Conversation
|
🔨 Triggering try run (#18598920778) for Linux (WPT) |
|
Test results for linux-wpt from try job (#18598920778): Flaky unexpected result (25)
Stable unexpected results that are known to be intermittent (33)
Stable unexpected results (1)
|
|
|
…ts.ready` This fixes a regression (likely from servo#39583) that made the result of many font loading tests intermittent. The issues here is that the count of fonts loading is decremented synchronously in the `FontContext`, but the notification to the `ScriptThread` happens asynchronously. In between the time the decrement happens and the `ScriptThread` is notified, a rendering update could happen which could mark a screenshot as ready to take too soon. The solution here is to wait until the `fonts.ready` promise is resolved, which is guaranteed to fire after all fonts have loaded. In addition, a rendering update is queued after this happens. This means that the screenshot will wait until that final rendering update to be ready. This should remove the flakiness of font load tests. Signed-off-by: Martin Robinson <[email protected]>
a7c5881 to
a92724f
Compare
|
🔨 Triggering try run (#18599711248) for Linux (WPT) |
jdm
approved these changes
Oct 17, 2025
Member
Author
|
I will watch these tests after this lands to ensure that the issue is truly fixed. I was able to observe the woff2 tests failing locally and this did indeed fix them. |
|
Test results for linux-wpt from try job (#18599711248): Flaky unexpected result (18)
Stable unexpected results that are known to be intermittent (27)
|
|
✨ Try run (#18599711248) succeeded. |
This was referenced Oct 22, 2025
This was referenced Oct 22, 2025
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.
This fixes a regression (likely from #39583) that made the result of many font loading
tests intermittent. The issues here is that the count of fonts loading
is decremented synchronously in the
FontContext, but the notificationto the
ScriptThreadhappens asynchronously. In between the time thedecrement happens and the
ScriptThreadis notified, a rendering updatecould happen which could mark a screenshot as ready to take too soon.
The solution here is to wait until the
fonts.readypromise isresolved, which is guaranteed to fire after all fonts have loaded. In
addition, a rendering update is queued after this happens. This means
that the screenshot will wait until that final rendering update to be
ready.
This should remove the flakiness of font load tests.
Testing: This should fix many flaky tests.
Fixes: #39953.
Fixes: #39951.
Fixes #38956.
Fixes #39408.
Fixes #39429.
Fixes #39592.
Fixes #39636.
Fixes #39650.
Fixes #39666.
Fixes #39667.
Fixes #39706.
Fixes #39750.
Fixes #39801.
Fixes #39853.
Fixes #39881.
Fixes #39950.