| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 namespace { | 47 namespace { |
| 48 | 48 |
| 49 void updateAnimationTiming(Document& document) | 49 void updateAnimationTiming(Document& document) |
| 50 { | 50 { |
| 51 document.timeline().serviceAnimations(); | 51 document.timeline().serviceAnimations(); |
| 52 document.transitionTimeline().serviceAnimations(); | 52 document.transitionTimeline().serviceAnimations(); |
| 53 } | 53 } |
| 54 | 54 |
| 55 } // namespace | 55 } // namespace |
| 56 | 56 |
| 57 void DocumentAnimations::dispatchAnimationEvents(Document& document) | |
| 58 { | |
| 59 document.timeline().dispatchEvents(); | |
| 60 document.transitionTimeline().dispatchEvents(); | |
| 61 } | |
| 62 | |
| 63 void DocumentAnimations::dispatchAnimationEventsAsync(Document& document) | |
| 64 { | |
| 65 document.timeline().dispatchEventsAsync(); | |
| 66 document.transitionTimeline().dispatchEventsAsync(); | |
| 67 } | |
| 68 | |
| 69 void DocumentAnimations::updateAnimationTimingForAnimationFrame(Document& docume
nt, double monotonicAnimationStartTime) | 57 void DocumentAnimations::updateAnimationTimingForAnimationFrame(Document& docume
nt, double monotonicAnimationStartTime) |
| 70 { | 58 { |
| 71 document.animationClock().updateTime(monotonicAnimationStartTime); | 59 document.animationClock().updateTime(monotonicAnimationStartTime); |
| 72 updateAnimationTiming(document); | 60 updateAnimationTiming(document); |
| 73 } | 61 } |
| 74 | 62 |
| 75 void DocumentAnimations::updateAnimationTimingForGetComputedStyle(Node& node, CS
SPropertyID property) | 63 void DocumentAnimations::updateAnimationTimingForGetComputedStyle(Node& node, CS
SPropertyID property) |
| 76 { | 64 { |
| 77 if (!node.isElementNode()) | 65 if (!node.isElementNode()) |
| 78 return; | 66 return; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 92 ASSERT(document.lifecycle().state() == DocumentLifecycle::CompositingClean); | 80 ASSERT(document.lifecycle().state() == DocumentLifecycle::CompositingClean); |
| 93 if (document.cssPendingAnimations().startPendingAnimations()) { | 81 if (document.cssPendingAnimations().startPendingAnimations()) { |
| 94 ASSERT(document.view()); | 82 ASSERT(document.view()); |
| 95 document.view()->scheduleAnimation(); | 83 document.view()->scheduleAnimation(); |
| 96 } | 84 } |
| 97 | 85 |
| 98 document.animationClock().unfreeze(); | 86 document.animationClock().unfreeze(); |
| 99 } | 87 } |
| 100 | 88 |
| 101 } // namespace WebCore | 89 } // namespace WebCore |
| OLD | NEW |