Bug 222245 - [Paint Timing] Return early from contentful paint check when no contentful pixels/characters at all
Summary: [Paint Timing] Return early from contentful paint check when no contentful pi...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Noam Rosenthal
URL:
Keywords: InRadar
Depends on:
Blocks: 211736
  Show dependency treegraph
 
Reported: 2021-02-21 03:48 PST by Noam Rosenthal
Modified: 2021-02-21 11:08 PST (History)
9 users (show)

See Also:


Attachments
Patch (2.69 KB, patch)
2021-02-21 03:53 PST, Noam Rosenthal
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Noam Rosenthal 2021-02-21 03:48:18 PST
The MotionMark tests captured an edge case that causes expensive contentfulness computations.
See https://browserbench.org/MotionMark1.1/developer.html (Focus/Multiply tests)

This edge case is not plausible in real websites, but happens in this benchmark:
- There are lots of elements, performing rendering-intensive rendering
- There is nothing "contentful" in the page, so "first contenful paint" has to be computed multiple times.
Comment 1 Noam Rosenthal 2021-02-21 03:53:05 PST
Created attachment 421136 [details]
Patch
Comment 2 Simon Fraser (smfr) 2021-02-21 09:23:53 PST
Comment on attachment 421136 [details]
Patch

If the test elements contained one glyph each, what would happen?
Comment 3 Noam Rosenthal 2021-02-21 10:09:42 PST
(In reply to Simon Fraser (smfr) from comment #2)
> Comment on attachment 421136 [details]
> Patch
> 
> If the test elements contained one glyph each, what would happen?

FCP will be marked the moment one of them become visible, and from that point on the check wouldn't run (as it only measures the *first* contentful paint).
Comment 4 EWS 2021-02-21 11:07:38 PST
Committed r273220: <https://commits.webkit.org/r273220>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 421136 [details].
Comment 5 Radar WebKit Bug Importer 2021-02-21 11:08:14 PST
<rdar://problem/74570604>