[webkit-dev] WebKit position on Paint Timing / (first paint, first contentful paint)

Yoav Weiss yoav at yoav.ws
Thu Feb 27 03:22:00 PST 2020


On Thu, Feb 27, 2020 at 11:47 AM Noam Rosenthal <noam at webkit.org> wrote:

>
>
> On Thu, Feb 27, 2020 at 12:17 PM Yoav Weiss <yoav at yoav.ws> wrote:
>
>>
>>
>> On Wed, Feb 26, 2020 at 11:33 PM Ryosuke Niwa <rniwa at webkit.org> wrote:
>>
>>>
>>> I don't think we should do that. For starters, Chrome's painting
>>> strategy while loading a web page is very different from that of Safari /
>>> WebKit. We would freeze the painting of the previous page at the moment a
>>> new navigation is committed, and we wouldn't update the painting until the
>>> destination page has a meaningful content in it. This is a very much
>>> different from Chrome's model where the moment a new navigation is
>>> committed, Chrome will show a blank page then start incrementally painting
>>> the page throughout the navigation.
>>>
>> Body background color is still painted before any contentful paint... Is
> this a bug?
> Also, a web page might not have content at all (e.g. a bunch of divs with
> bgcolors). Would webkit not render that web page at all?
>
>>
>>> Second off, the point of specification is to allow multiple independent
>>> implementations. If we had to reverse-engineer what Chrome is doing and
>>> implement that, it defeats the point of having any standard at all.
>>>
>>
>> With my WebPerfWG hat on, I agree. Would be good to find a model that
>> works well for different implementations (even if not comparable between
>> different implementations), while providing points in time for developers
>> that can: a) provide a user meaningful visual metric and b) enable spotting
>> regressions.
>>
> Note taken. Though this is hypothetical - let's get to the point where the
> spec is lacking, and then we can decide how to go about it.
> What I propose is to go as far as possible with the spec, and when we
> reach an ambiguity tackle it on the spec front.
>
>>
>> Would WebKit folks be interested in helping exploration on that front?
>>
> I would be happy to help coordinate this (e.g. work on the details of pec
> differences and prod Ryosuke and folks for feedback about internals).
>

That sounds great, thank you! :)


>
>
>>
>>> I don't think we don't should that because we don't have an equivalent
>>> of first-paint.
>>>
>>
>> FWIW, I don't think it's a huge problem if WebKit will report FP and FCP
>> as the same timestamp, as they are indeed the same point in time.
>>
> A simple test shows that safari does show the background color
> (body=bgcolor) when a timeout is set to render everything else (e.g. add
> text to the document). According to the spec, the first one should give
> first-paint and the second one would be first-contentful-paint.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20200227/871f95df/attachment-0001.htm>


More information about the webkit-dev mailing list