Changeset 57390 in webkit
- Timestamp:
- Apr 9, 2010 6:00:18 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r57386 r57390 1 2010-04-09 Chris Marrin <cmarrin@apple.com> 2 3 Reviewed by Simon Fraser. 4 5 Fixed bug where animation time was not updated when dynamically loading a style sheet 6 https://bugs.webkit.org/show_bug.cgi?id=37352 7 8 LayoutTest showing problem. 9 10 * animations/dynamic-stylesheet-loading-expected.txt: Added. 11 * animations/dynamic-stylesheet-loading.html: Added. 12 * animations/resources/dynamic-stylesheet-insertion-inserted.css: Added. 13 * animations/resources/dynamic-stylesheet-insertion-main.css: Added. 14 1 15 2010-04-09 Abhishek Arya <inferno@chromium.org> 2 16 -
trunk/WebCore/ChangeLog
r57387 r57390 1 2010-04-09 Chris Marrin <cmarrin@apple.com> 2 3 Reviewed by Simon Fraser. 4 5 Fixed bug where animation time was not updated when dynamically loading a style sheet 6 https://bugs.webkit.org/show_bug.cgi?id=37352 7 8 A dynamically loaded style sheet kicks off its own styleRecalc cycle. This was not 9 bracketed with a beginAnimationUpdate/endAnimationUpdate which wasn't resetting the 10 animation time. In some time-dependent cases this was causing a negative elapsedTime 11 to be sent to the keyframe animator. This is an invalid case which destroys the 12 animation prematurely. I not only added the brackets, but I also added an assert 13 and protection for when the elapsedTime comes up negative. 14 15 Test: animations/dynamic-stylesheet-loading.html 16 17 * dom/Document.cpp: Added brackets 18 (WebCore::Document::updateStyleSelector): 19 * page/animation/KeyframeAnimation.cpp: Added assert and protection 20 (WebCore::KeyframeAnimation::getKeyframeAnimationInterval): 21 1 22 2010-04-09 Jaime Yap <jaimeyap@google.com> 2 23 -
trunk/WebCore/dom/Document.cpp
r57299 r57390 2484 2484 2485 2485 recalcStyleSelector(); 2486 // This recalcStyle initiates a new recalc cycle. We need to bracket it to 2487 // make sure animations get the correct update time 2488 if (m_frame) 2489 m_frame->animation()->beginAnimationUpdate(); 2486 2490 recalcStyle(Force); 2491 if (m_frame) 2492 m_frame->animation()->endAnimationUpdate(); 2487 2493 2488 2494 #ifdef INSTRUMENT_LAYOUT_SCHEDULING -
trunk/WebCore/page/animation/KeyframeAnimation.cpp
r56543 r57390 69 69 70 70 double t = m_animation->duration() ? (elapsedTime / m_animation->duration()) : 1; 71 72 ASSERT(t >= 0); 73 if (t < 0) 74 t = 0; 75 71 76 int i = static_cast<int>(t); 72 77 t -= i;
Note: See TracChangeset
for help on using the changeset viewer.