| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 namespace { | 47 namespace { |
| 48 | 48 |
| 49 void updateAnimationTiming(Document& document, TimingUpdateReason reason) | 49 void updateAnimationTiming(Document& document, TimingUpdateReason reason) |
| 50 { | 50 { |
| 51 document.timeline().serviceAnimations(reason); | 51 document.timeline().serviceAnimations(reason); |
| 52 } | 52 } |
| 53 | 53 |
| 54 } // namespace | 54 } // namespace |
| 55 | 55 |
| 56 void DocumentAnimations::updateAnimationTimingForAnimationFrame(Document& docume
nt, double monotonicAnimationStartTime) | 56 void DocumentAnimations::updateAnimationTimingForAnimationFrame(Document& docume
nt, blink::WebFrameTime frameTime) |
| 57 { | 57 { |
| 58 document.animationClock().updateTime(monotonicAnimationStartTime); | 58 document.animationClock().updateTime(frameTime); |
| 59 updateAnimationTiming(document, TimingUpdateForAnimationFrame); | 59 updateAnimationTiming(document, TimingUpdateForAnimationFrame); |
| 60 } | 60 } |
| 61 | 61 |
| 62 void DocumentAnimations::updateOutdatedAnimationPlayersIfNeeded(Document& docume
nt) | 62 void DocumentAnimations::updateOutdatedAnimationPlayersIfNeeded(Document& docume
nt) |
| 63 { | 63 { |
| 64 if (needsOutdatedAnimationPlayerUpdate(document)) | 64 if (needsOutdatedAnimationPlayerUpdate(document)) |
| 65 updateAnimationTiming(document, TimingUpdateOnDemand); | 65 updateAnimationTiming(document, TimingUpdateOnDemand); |
| 66 } | 66 } |
| 67 | 67 |
| 68 void DocumentAnimations::updateAnimationTimingForGetComputedStyle(Node& node, CS
SPropertyID property) | 68 void DocumentAnimations::updateAnimationTimingForGetComputedStyle(Node& node, CS
SPropertyID property) |
| (...skipping 18 matching lines...) Expand all Loading... |
| 87 void DocumentAnimations::startPendingAnimations(Document& document) | 87 void DocumentAnimations::startPendingAnimations(Document& document) |
| 88 { | 88 { |
| 89 ASSERT(document.lifecycle().state() == DocumentLifecycle::CompositingClean); | 89 ASSERT(document.lifecycle().state() == DocumentLifecycle::CompositingClean); |
| 90 if (document.compositorPendingAnimations().startPendingAnimations()) { | 90 if (document.compositorPendingAnimations().startPendingAnimations()) { |
| 91 ASSERT(document.view()); | 91 ASSERT(document.view()); |
| 92 document.view()->scheduleAnimation(); | 92 document.view()->scheduleAnimation(); |
| 93 } | 93 } |
| 94 } | 94 } |
| 95 | 95 |
| 96 } // namespace WebCore | 96 } // namespace WebCore |
| OLD | NEW |