Bug 88507
| Summary: | [Refactoring] requestAnimationFrame() can be Supplement | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Hajime Morrita <morrita> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | abarth, haraken, jamesr |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Hajime Morrita
requestAnimationFrame() is basically implemented in ScriptedAnimationController, which is a perfect candidate of Supplement<ScriptExceptionContext>.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
James Robinson
Could you explain what this means?
Adam Barth
I think what Morrita means is that we can use the Supplement pattern to remove all the ENABLE(REQUEST_ANIMATION_FRAME) ifdefs and m_scriptedAnimationController mentions from Document.cpp.
The idea is that ScriptedAnimationController would subclass Supplement<ScriptExceptionContext> and folks that wanted to talk with the controller would ask for ScriptedAnimationController::from(document).
Hajime Morrita
Oops. I'm sorry for the short of explanation.
What Adam says is right.