> On Mar 1, 2020, at 2:07 PM, Noam Rosenthal <n...@webkit.org> wrote:
> 
> 
> The first visually non-empty milestone almost always happens way before this 
> point. The above is just a fallback to make sure we eventually hit this 
> milestone. For example, if a document is totally blank even after loading the 
> document and all subresources, we want to paint it instead of waiting forever.
> 
> The visually non-empty heuristic is elsewhere.
> 
> Note that WebKit would consider the paint triggered by the above fallback 
> code to be both a first paint and “first visually non-empty paint” or “first 
> meaningful paint”, which somewhat corresponds to Chrome’s notion of “first 
> contentful paint”.
> 
> First paint can only happen earlier under even more unusual circumstances, I 
> believe there is a timeout after which we will paint even if all we can paint 
> is blank white or background color.
> 
>> 
>> But let's take the specifics to Slack/bugzilla?
> 
> I think it would be good for you to talk to people who understand WebKit’s 
> layout/paint milestones in detail before taking things to bugzilla. Ask on 
> Slack, and I’ll point you to the right people.
> Oops, just saw this, an initial (not for review) patch is already in bugzilla 
> :)
> But I'll continue the discussion - I have better idea of what to ask now.
> Who would be the right people to ask?

Alan, Simon, and Ryosuke should all know about this.

A few of us sat down and reviewed this spec. We think that, as written, the 
definition of “first contentful paint” is underspecified and in some cases 
buggy. For example, it says a “non-white canvas” should count as contentful. 
But canvases don’t start as white, they start as fully transparent black (all 
zeros). And checking the color of every pixel in a canvas is expensive. The 
intent here is probably that a canvas that has ever been painted into is 
contentful (or one that has been painted into more recently than the last time 
it was cleared).

In any case, it definitely does not match the WebKit notion of first visually 
non-empty layout / first meaningful paint, in some cases in ways that we regret.

Spec issues to follow.

We also think exposing “first paint” is harmful and we’d rather not implement 
it. We don’t agree that painting non-contentful content quickly is a good idea, 
either for browsers or for websites. And this API will inevitably be used to 
compare browsers, regardless of disclaimers that it shouldn’t be.

It’s probably unwise to implement this until the spec is fixed. And once it is, 
we should change our “first visually non-empty layout” notion to match it 
before exposing the corresponding paint timing milestone.

I think Ryosuke took notes on the spec issues we need to file.

Regards,
Maciej
_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to