| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 } | 138 } |
| 139 | 139 |
| 140 void AnimationControllerPrivate::fireEventsAndUpdateStyle() | 140 void AnimationControllerPrivate::fireEventsAndUpdateStyle() |
| 141 { | 141 { |
| 142 // Protect the frame from getting destroyed in the event handler | 142 // Protect the frame from getting destroyed in the event handler |
| 143 RefPtr<Frame> protector = m_frame; | 143 RefPtr<Frame> protector = m_frame; |
| 144 | 144 |
| 145 bool updateStyle = !m_eventsToDispatch.isEmpty() || !m_nodeChangesToDispatch
.isEmpty(); | 145 bool updateStyle = !m_eventsToDispatch.isEmpty() || !m_nodeChangesToDispatch
.isEmpty(); |
| 146 | 146 |
| 147 // fire all the events | 147 // fire all the events |
| 148 Vector<EventToDispatch>::const_iterator eventsToDispatchEnd = m_eventsToDisp
atch.end(); | 148 Vector<EventToDispatch> eventsToDispatch = m_eventsToDispatch; |
| 149 for (Vector<EventToDispatch>::const_iterator it = m_eventsToDispatch.begin()
; it != eventsToDispatchEnd; ++it) { | 149 m_eventsToDispatch.clear(); |
| 150 Vector<EventToDispatch>::const_iterator eventsToDispatchEnd = eventsToDispat
ch.end(); |
| 151 for (Vector<EventToDispatch>::const_iterator it = eventsToDispatch.begin();
it != eventsToDispatchEnd; ++it) { |
| 150 if (it->eventType == eventNames().webkitTransitionEndEvent) | 152 if (it->eventType == eventNames().webkitTransitionEndEvent) |
| 151 it->element->dispatchEvent(WebKitTransitionEvent::create(it->eventTy
pe, it->name, it->elapsedTime)); | 153 it->element->dispatchEvent(WebKitTransitionEvent::create(it->eventTy
pe, it->name, it->elapsedTime)); |
| 152 else | 154 else |
| 153 it->element->dispatchEvent(WebKitAnimationEvent::create(it->eventTyp
e, it->name, it->elapsedTime)); | 155 it->element->dispatchEvent(WebKitAnimationEvent::create(it->eventTyp
e, it->name, it->elapsedTime)); |
| 154 } | 156 } |
| 155 | 157 |
| 156 m_eventsToDispatch.clear(); | |
| 157 | |
| 158 // call setChanged on all the elements | 158 // call setChanged on all the elements |
| 159 Vector<RefPtr<Node> >::const_iterator nodeChangesToDispatchEnd = m_nodeChang
esToDispatch.end(); | 159 Vector<RefPtr<Node> >::const_iterator nodeChangesToDispatchEnd = m_nodeChang
esToDispatch.end(); |
| 160 for (Vector<RefPtr<Node> >::const_iterator it = m_nodeChangesToDispatch.begi
n(); it != nodeChangesToDispatchEnd; ++it) | 160 for (Vector<RefPtr<Node> >::const_iterator it = m_nodeChangesToDispatch.begi
n(); it != nodeChangesToDispatchEnd; ++it) |
| 161 (*it)->setNeedsStyleRecalc(SyntheticStyleChange); | 161 (*it)->setNeedsStyleRecalc(SyntheticStyleChange); |
| 162 | 162 |
| 163 m_nodeChangesToDispatch.clear(); | 163 m_nodeChangesToDispatch.clear(); |
| 164 | 164 |
| 165 if (updateStyle && m_frame) | 165 if (updateStyle && m_frame) |
| 166 m_frame->document()->updateStyleIfNeeded(); | 166 m_frame->document()->updateStyleIfNeeded(); |
| 167 } | 167 } |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 { | 606 { |
| 607 #if USE(ACCELERATED_COMPOSITING) | 607 #if USE(ACCELERATED_COMPOSITING) |
| 608 return AnimationBase::animationOfPropertyIsAccelerated(property); | 608 return AnimationBase::animationOfPropertyIsAccelerated(property); |
| 609 #else | 609 #else |
| 610 UNUSED_PARAM(property); | 610 UNUSED_PARAM(property); |
| 611 return false; | 611 return false; |
| 612 #endif | 612 #endif |
| 613 } | 613 } |
| 614 | 614 |
| 615 } // namespace WebCore | 615 } // namespace WebCore |
| OLD | NEW |