Bug 162726

Summary: [Modern Media Controls] scheduler for layout nodes
Product: WebKit Reporter: Antoine Quint <graouts>
Component: New BugsAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, graouts, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Antoine Quint 2016-09-29 07:04:28 PDT
[Modern Media Controls] scheduler for layout nodes
Comment 1 Antoine Quint 2016-09-29 07:08:09 PDT
Created attachment 290202 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2016-09-29 07:09:20 PDT
<rdar://problem/28543043>
Comment 3 Antoine Quint 2016-09-29 07:11:58 PDT
Created attachment 290203 [details]
Patch
Comment 4 Dean Jackson 2016-09-29 09:56:25 PDT
Comment on attachment 290203 [details]
Patch

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

> Source/WebCore/ChangeLog:13
> +        For the work on the modern media controls we will be using a tree of LayoutNode objects that will
> +        commit to the DOM in coordinated `requestAnimationFrame()` calls to ensure all layouts are done
> +        in an efficient and coordinated manner. As a preamble, we introduce a `scheduler` singleton which
> +        provides a single public method `scheduleLayout(callback)` to queue callbacks to be fired in the
> +        next `requestAnimationFrame()` callback.

Why are you using those weird quotes?

> LayoutTests/media/modern-media-controls/scheduler/not-reentrant.html:35
> +
> +    println(`scheduler.scheduleLayout(layout)`);

Add a comment here saying that this is the important part of the test - scheduling layout from within layout.

> LayoutTests/media/modern-media-controls/scheduler/not-reentrant.html:44
> +    output.innerHTML += `<div>${line}</div>`;

Yuck. Guess it's fine for this small test.
Comment 5 Antoine Quint 2016-09-29 10:28:26 PDT
(In reply to comment #4)
> Comment on attachment 290203 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=290203&action=review
> 
> > Source/WebCore/ChangeLog:13
> > +        For the work on the modern media controls we will be using a tree of LayoutNode objects that will
> > +        commit to the DOM in coordinated `requestAnimationFrame()` calls to ensure all layouts are done
> > +        in an efficient and coordinated manner. As a preamble, we introduce a `scheduler` singleton which
> > +        provides a single public method `scheduleLayout(callback)` to queue callbacks to be fired in the
> > +        next `requestAnimationFrame()` callback.
> 
> Why are you using those weird quotes?

Old habits from Markdown. This is how you codify code in Markdown, or at least the GitHub-flavored version.

> > LayoutTests/media/modern-media-controls/scheduler/not-reentrant.html:35
> > +
> > +    println(`scheduler.scheduleLayout(layout)`);
> 
> Add a comment here saying that this is the important part of the test -
> scheduling layout from within layout.

Good point, will do.

> > LayoutTests/media/modern-media-controls/scheduler/not-reentrant.html:44
> > +    output.innerHTML += `<div>${line}</div>`;
> 
> Yuck. Guess it's fine for this small test.

I was looking for some existing test setup to do this type of stuff. Is there something better I should be (re)using?
Comment 6 Antoine Quint 2016-09-29 12:05:09 PDT
Created attachment 290229 [details]
Patch
Comment 7 WebKit Commit Bot 2016-09-29 13:04:48 PDT
Comment on attachment 290229 [details]
Patch

Clearing flags on attachment: 290229

Committed r206606: <http://trac.webkit.org/changeset/206606>
Comment 8 WebKit Commit Bot 2016-09-29 13:04:51 PDT
All reviewed patches have been landed.  Closing bug.