Skip to content

layout: Fix first-paint detection#58544

Merged
servo-wpt-sync merged 1 commit intoweb-platform-tests:masterfrom
servo:servo_export_42975
Mar 20, 2026
Merged

layout: Fix first-paint detection#58544
servo-wpt-sync merged 1 commit intoweb-platform-tests:masterfrom
servo:servo_export_42975

Conversation

@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

@servo-wpt-sync servo-wpt-sync commented Mar 17, 2026

This PR comprises

  1. Segregate paintable and contentful.
  2. Adds Checking of non-default background for eligibility to mark first-paint.
  3. Adds a bool is_paintable to display_list and use same for marking first-paint.

TODO: This doesn't consider iframes. Will add PR after fixing WPT tests.

Raised an issue for some incomplete definitions: w3c/paint-timing#122

Testing:

  • wpt/tests/paint-timing/first-paint-only/first-paint-bg-color.html
  • Updated WPT tests expectations.
    • wpt/paint-timing/first-image-child.html
    • wpt/paint-timing/first-paint-only/sibling-painting-first-image.html
  • Unit Test: servo/tests/performance_paint_timings.rs. Following Tests Cases are covered:
Background Pref Root Background FP TC
Default Unset test_default_pref_with_unset_background
Non-Default Unset test_non_default_pref_with_unset_background
Default Transparent test_default_pref_with_transparent_background
Non-Default Unset test_non_default_pref_with_transparent_background
Default Set test_default_pref_with_background
Non-Default Set test_non_default_pref_with_background
Non-Default Set (same as pref) test_non_default_pref_with_same_background

Fixes: #42148

Reviewed in servo/servo#42975

Copy link
Copy Markdown
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Servo project.

@servo-wpt-sync servo-wpt-sync merged commit 76e59b8 into web-platform-tests:master Mar 20, 2026
25 checks passed
@servo-wpt-sync servo-wpt-sync deleted the servo_export_42975 branch March 20, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants