[prev in list] [next in list] [prev in thread] [next in thread]
List: webkit-dev
Subject: Re: [webkit-dev] WebKit position on Paint Timing / (first paint, first contentful paint)
From: Noam Rosenthal <noam () webkit ! org>
Date: 2020-02-27 11:41:24
Message-ID: CAGttnEVtcuMww8ymHLzxsXhOFAUNuhFg3EKQn2-yi-yLPgHJcQ () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
On Thu, Feb 27, 2020 at 12:46 PM Noam Rosenthal <noam@webkit.org> wrote:
>
>
> On Thu, Feb 27, 2020 at 12:17 PM Yoav Weiss <yoav@yoav.ws> wrote:
>
>>
>>
>> On Wed, Feb 26, 2020 at 11:33 PM Ryosuke Niwa <rniwa@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?
>
It seems like the code in FrameView does this:
// Ensure that we always fire visually non-empty milestone eventually.
*if* (finishedParsingMainDocument && frame().loader().isComplete())
*return* *true*;
I suggest splitting this to two milestones - the current one, that triggers
when the main document finished loading, and another one that only triggers
when content has actually been painted (which may never happen). I think
this would be a good split for first-paint/first-contentful-paint in WebKit.
But let's take the specifics to Slack/bugzilla?
[Attachment #5 (text/html)]
<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Thu, Feb 27, 2020 at 12:46 PM Noam Rosenthal <<a \
href="mailto:noam@webkit.org">noam@webkit.org</a>> wrote:<br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 27, 2020 at 12:17 \
PM Yoav Weiss <<a href="mailto:yoav@yoav.ws" target="_blank">yoav@yoav.ws</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div \
dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On \
Wed, Feb 26, 2020 at 11:33 PM Ryosuke Niwa <<a href="mailto:rniwa@webkit.org" \
target="_blank">rniwa@webkit.org</a>> wrote:</div><blockquote class="gmail_quote" \
style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div \
class="gmail_quote"><div><br></div><div>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.</div></div></div></blockquote></div></div></blockquote><div>Body \
background color is still painted before any contentful paint... Is this a \
bug?<br>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? \
</div></div></div></blockquote><div><br>It seems like the code in FrameView does \
this:<br>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-as \
ian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Menlo;color:rgb(93,108,121)"><span \
class="gmail-s1" style="color:rgba(0,0,0,0.85)"><span \
class="gmail-Apple-converted-space"> </span></span>// Ensure that we always \
fire visually non-empty milestone eventually.</p> <p class="gmail-p2" \
style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stre \
tch:normal;font-size:12px;line-height:normal;font-family:Menlo;color:rgba(0,0,0,0.85)"><span \
class="gmail-Apple-converted-space"> </span><span class="gmail-s2" \
style="color:rgb(155,35,147)"><b>if</b></span> (finishedParsingMainDocument \
&& frame().loader().isComplete())</p> <p class="gmail-p3" \
style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stre \
tch:normal;font-size:12px;line-height:normal;font-family:Menlo;color:rgb(155,35,147)"><span \
class="gmail-s1" style="color:rgba(0,0,0,0.85)"><span \
class="gmail-Apple-converted-space"> </span></span><b>return</b><span \
class="gmail-s1" style="color:rgba(0,0,0,0.85)"> </span><b>true</b><span \
class="gmail-s1" style="color:rgba(0,0,0,0.85)">;<br><br>I suggest splitting this to \
two milestones - the current one, that triggers when the main document finished \
loading, and another one that only triggers when content has actually been painted \
(which may never happen). I think this would be a good split for \
first-paint/first-contentful-paint in WebKit.<br><br>But let's take the specifics \
to Slack/bugzilla?</span></p><br></div><blockquote class="gmail_quote" \
style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"> </blockquote></div></div>
_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic