Bug 208536

Summary: [Internals] Introduce Internals::updateLayoutAndStyleRecursively
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 208285, 208385    
Attachments:
Description Flags
Patch
none
Patch none

Description zalan 2020-03-03 14:08:41 PST
so that test pages can make sure that the render tree is clean.
Comment 1 Radar WebKit Bug Importer 2020-03-03 14:08:59 PST
<rdar://problem/60012372>
Comment 2 zalan 2020-03-03 14:19:28 PST
Created attachment 392329 [details]
Patch
Comment 3 Simon Fraser (smfr) 2020-03-03 14:21:17 PST
Comment on attachment 392329 [details]
Patch

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

> Source/WebCore/ChangeLog:10
> +        However in certain cases (see Hyatt's optimization on lazy offsetHeight/Width computation) this call can leave the tree partially dirty.

Maybe reference an actual function rather than assuming that we all know what hyatt's optimizations are.

> Source/WebCore/testing/Internals.idl:533
> +    void updateLayoutAndStyleRecursively();

I think "for all frames" would be clearer that "recursively"; it's not clear what's being recursed on.

> LayoutTests/fast/images/animated-gif-no-layout.html:13
> +            internals.updateLayoutAndStyleRecursively();

Why not replace or remove the document.body.offsetWidth above?
Comment 4 zalan 2020-03-03 14:39:06 PST
Created attachment 392334 [details]
Patch
Comment 5 zalan 2020-03-03 14:40:00 PST
(In reply to Simon Fraser (smfr) from comment #3)
> Comment on attachment 392329 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=392329&action=review
> 
> > Source/WebCore/ChangeLog:10
> > +        However in certain cases (see Hyatt's optimization on lazy offsetHeight/Width computation) this call can leave the tree partially dirty.
> 
> Maybe reference an actual function rather than assuming that we all know
> what hyatt's optimizations are.
Fixed.

> 
> > Source/WebCore/testing/Internals.idl:533
> > +    void updateLayoutAndStyleRecursively();
> 
> I think "for all frames" would be clearer that "recursively"; it's not clear
> what's being recursed on.
Much better name indeed.

> 
> > LayoutTests/fast/images/animated-gif-no-layout.html:13
> > +            internals.updateLayoutAndStyleRecursively();
> 
> Why not replace or remove the document.body.offsetWidth above?
Removed.
Comment 6 WebKit Commit Bot 2020-03-03 16:06:22 PST
Comment on attachment 392334 [details]
Patch

Clearing flags on attachment: 392334

Committed r257811: <https://trac.webkit.org/changeset/257811>
Comment 7 WebKit Commit Bot 2020-03-03 16:06:24 PST
All reviewed patches have been landed.  Closing bug.