Chromium Code Reviews| Index: Source/core/animation/DocumentAnimations.h |
| diff --git a/Source/core/animation/DocumentAnimations.h b/Source/core/animation/DocumentAnimations.h |
| index b952c532ec16b927ce4eb7b7a61a17b57eb18134..9772eef3c1a4edbef8061b2a0d7188bf5cd40404 100644 |
| --- a/Source/core/animation/DocumentAnimations.h |
| +++ b/Source/core/animation/DocumentAnimations.h |
| @@ -41,12 +41,28 @@ class Node; |
| class DocumentAnimations { |
| public: |
| - static void serviceOnAnimationFrame(Document&, double monotonicAnimationStartTime); |
| + static void serviceOnFrameStart(Document&, double monotonicAnimationStartTime); |
|
abarth-chromium
2014/02/20 17:52:00
Can we rename this function to indicate what it do
dstockwell
2014/02/24 06:03:25
Done. I split and renamed the functions of Documen
|
| static void serviceBeforeGetComputedStyle(Node&, CSSPropertyID); |
| - static void serviceAfterStyleRecalc(Document&); |
| + |
| + class ServiceOnFrameEndScope { |
|
abarth-chromium
2014/02/20 17:52:00
This is a wacky pattern for calling a function. W
dstockwell
2014/02/20 18:22:01
Isn't this the same pattern as DocumentLifecycle::
|
| + WTF_MAKE_NONCOPYABLE(ServiceOnFrameEndScope); |
| + public: |
| + ServiceOnFrameEndScope(Document& document) |
| + : m_document(document) |
| + { |
| + } |
| + ~ServiceOnFrameEndScope() |
| + { |
| + DocumentAnimations::serviceOnFrameEnd(m_document); |
| + } |
| + |
| + private: |
| + Document& m_document; |
| + }; |
| private: |
| DocumentAnimations() { } |
| + static void serviceOnFrameEnd(Document&); |
| }; |
| } // namespace |