| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 void SVGImageChromeClient::scheduleAnimation() | 61 void SVGImageChromeClient::scheduleAnimation() |
| 62 { | 62 { |
| 63 // Because a single SVGImage can be shared by multiple pages, we can't key | 63 // Because a single SVGImage can be shared by multiple pages, we can't key |
| 64 // our svg image layout on the page's real animation frame. Therefore, we | 64 // our svg image layout on the page's real animation frame. Therefore, we |
| 65 // run this fake animation timer to trigger layout in SVGImages. The name, | 65 // run this fake animation timer to trigger layout in SVGImages. The name, |
| 66 // "animationTimer", is to match the new requestAnimationFrame-based layout | 66 // "animationTimer", is to match the new requestAnimationFrame-based layout |
| 67 // approach. | 67 // approach. |
| 68 if (m_animationTimer.isActive()) | 68 if (m_animationTimer.isActive()) |
| 69 return; | 69 return; |
| 70 m_animationTimer.startOneShot(0); | 70 m_animationTimer.startOneShot(0, FROM_HERE); |
| 71 } | 71 } |
| 72 | 72 |
| 73 void SVGImageChromeClient::animationTimerFired(Timer<SVGImageChromeClient>*) | 73 void SVGImageChromeClient::animationTimerFired(Timer<SVGImageChromeClient>*) |
| 74 { | 74 { |
| 75 // In principle, we should call requestAnimationFrame callbacks here, but | 75 // In principle, we should call requestAnimationFrame callbacks here, but |
| 76 // we know there aren't any because script is forbidden inside SVGImages. | 76 // we know there aren't any because script is forbidden inside SVGImages. |
| 77 if (m_image) { | 77 if (m_image) { |
| 78 m_image->frameView()->page()->animator().serviceScriptedAnimations(0); | 78 m_image->frameView()->page()->animator().serviceScriptedAnimations(0); |
| 79 m_image->frameView()->updateLayoutAndStyleIfNeededRecursive(); | 79 m_image->frameView()->updateLayoutAndStyleIfNeededRecursive(); |
| 80 } | 80 } |
| 81 } | 81 } |
| 82 | 82 |
| 83 } | 83 } |
| OLD | NEW |