Bug 196926

Summary: Drawingarea should only capture painting related milestones
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, ap, bfulgham, commit-queue, dbates, ryanhaddad, simon.fraser, thorton, webkit-bot-watchers-bugzilla, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=196948
Attachments:
Description Flags
Patch
none
Patch none

Description zalan 2019-04-15 12:39:17 PDT
<rdar://problem/48003845>
Comment 1 zalan 2019-04-15 12:52:11 PDT
Created attachment 367443 [details]
Patch
Comment 2 Tim Horton 2019-04-15 12:56:21 PDT
Comment on attachment 367443 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=367443&action=review

> Source/WebKit/ChangeLog:3
> +        Drawingarea should only capture painting related milestones

DrawingArea? Drawing Area?
Comment 3 zalan 2019-04-15 13:02:59 PDT
Created attachment 367444 [details]
Patch
Comment 4 WebKit Commit Bot 2019-04-15 14:34:21 PDT
Comment on attachment 367444 [details]
Patch

Clearing flags on attachment: 367444

Committed r244291: <https://trac.webkit.org/changeset/244291>
Comment 5 WebKit Commit Bot 2019-04-15 14:34:24 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Aakash Jain 2019-04-15 17:05:08 PDT
Seems like this commit broke API test: AutoLayoutRenderingProgressRelativeOrdering.

EWS did indicate this API test failure (on obsolete patch of this bug). See https://ews-build.webkit.org/#/builders/3/builds/578
Comment 7 zalan 2019-04-15 17:15:30 PDT
(In reply to Aakash Jain from comment #6)
> Seems like this commit broke API test:
> AutoLayoutRenderingProgressRelativeOrdering.
> 
> EWS did indicate this API test failure (on obsolete patch of this bug). See
> https://ews-build.webkit.org/#/builders/3/builds/578
This might require some test changes. See https://bugs.webkit.org/show_bug.cgi?id=196948#c3
Comment 8 zalan 2019-04-15 19:13:09 PDT
(In reply to zalan from comment #7)
> (In reply to Aakash Jain from comment #6)
> > Seems like this commit broke API test:
> > AutoLayoutRenderingProgressRelativeOrdering.
> > 
> > EWS did indicate this API test failure (on obsolete patch of this bug). See
> > https://ews-build.webkit.org/#/builders/3/builds/578
> This might require some test changes. See
> https://bugs.webkit.org/show_bug.cgi?id=196948#c3

It seems like autosizing clients rely on this order. However I am not convinced that updateIntrinsicContentSizeIfNeeded should be tied to flushLayer() as it looks purely layoutish (and surely auto-sizing only).
Comment 9 Tim Horton 2019-04-15 19:21:31 PDT
(In reply to zalan from comment #8)
> (In reply to zalan from comment #7)
> > (In reply to Aakash Jain from comment #6)
> > > Seems like this commit broke API test:
> > > AutoLayoutRenderingProgressRelativeOrdering.
> > > 
> > > EWS did indicate this API test failure (on obsolete patch of this bug). See
> > > https://ews-build.webkit.org/#/builders/3/builds/578
> > This might require some test changes. See
> > https://bugs.webkit.org/show_bug.cgi?id=196948#c3
> 
> It seems like autosizing clients rely on this order. However I am not
> convinced that updateIntrinsicContentSizeIfNeeded should be tied to
> flushLayer() as it looks purely layoutish (and surely auto-sizing only).

It may appear "layoutish" but in platform toolkit land "layout" and "painting" happen synchronously and take effect simultaneously, so it's likely important that autosizing changes and painted-content changes happen at the same time.
Comment 10 zalan 2019-04-15 19:24:49 PDT
(In reply to Tim Horton from comment #9)
> (In reply to zalan from comment #8)
> > (In reply to zalan from comment #7)
> > > (In reply to Aakash Jain from comment #6)
> > > > Seems like this commit broke API test:
> > > > AutoLayoutRenderingProgressRelativeOrdering.
> > > > 
> > > > EWS did indicate this API test failure (on obsolete patch of this bug). See
> > > > https://ews-build.webkit.org/#/builders/3/builds/578
> > > This might require some test changes. See
> > > https://bugs.webkit.org/show_bug.cgi?id=196948#c3
> > 
> > It seems like autosizing clients rely on this order. However I am not
> > convinced that updateIntrinsicContentSizeIfNeeded should be tied to
> > flushLayer() as it looks purely layoutish (and surely auto-sizing only).
> 
> It may appear "layoutish" but in platform toolkit land "layout" and
> "painting" happen synchronously and take effect simultaneously, so it's
> likely important that autosizing changes and painted-content changes happen
> at the same time.
The callback is in flushLayers() and not in the commit handler, so not sure what "same time" means in that context.
Comment 11 zalan 2019-04-15 19:26:24 PDT
(In reply to zalan from comment #10)
> (In reply to Tim Horton from comment #9)
> > (In reply to zalan from comment #8)
> > > (In reply to zalan from comment #7)
> > > > (In reply to Aakash Jain from comment #6)
> > > > > Seems like this commit broke API test:
> > > > > AutoLayoutRenderingProgressRelativeOrdering.
> > > > > 
> > > > > EWS did indicate this API test failure (on obsolete patch of this bug). See
> > > > > https://ews-build.webkit.org/#/builders/3/builds/578
> > > > This might require some test changes. See
> > > > https://bugs.webkit.org/show_bug.cgi?id=196948#c3
> > > 
> > > It seems like autosizing clients rely on this order. However I am not
> > > convinced that updateIntrinsicContentSizeIfNeeded should be tied to
> > > flushLayer() as it looks purely layoutish (and surely auto-sizing only).
> > 
> > It may appear "layoutish" but in platform toolkit land "layout" and
> > "painting" happen synchronously and take effect simultaneously, so it's
> > likely important that autosizing changes and painted-content changes happen
> > at the same time.
> The callback is in flushLayers() and not in the commit handler, so not sure
> what "same time" means in that context.
Unless "painted-content" changes and the actual painting are unrelated.
Comment 12 Daniel Bates 2019-04-16 11:51:03 PDT
Comment on attachment 367444 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=367444&action=review

> Source/WebKit/WebProcess/WebPage/WebPage.cpp:6229
> +        static auto paintMilestones = OptionSet<WebCore::LayoutMilestone> { DidHitRelevantRepaintedObjectsAreaThreshold, DidFirstFlushForHeaderLayer, DidFirstPaintAfterSuppressedIncrementalRendering, DidRenderSignificantAmountOfText, DidFirstMeaningfulPaint };   

This can be made ever so slightly more optimal by making this a constexpr and not static.