[Modern Media Controls] scheduler for layout nodes
Created attachment 290202 [details] Patch
<rdar://problem/28543043>
Created attachment 290203 [details] Patch
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.
(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?
Created attachment 290229 [details] Patch
Comment on attachment 290229 [details] Patch Clearing flags on attachment: 290229 Committed r206606: <http://trac.webkit.org/changeset/206606>
All reviewed patches have been landed. Closing bug.