OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2011 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 } | 187 } |
188 | 188 |
189 m_callbacksToInvoke.clear(); | 189 m_callbacksToInvoke.clear(); |
190 } | 190 } |
191 | 191 |
192 void ScriptedAnimationController::callMediaQueryListListeners() | 192 void ScriptedAnimationController::callMediaQueryListListeners() |
193 { | 193 { |
194 MediaQueryListListeners listeners; | 194 MediaQueryListListeners listeners; |
195 listeners.swap(m_mediaQueryListListeners); | 195 listeners.swap(m_mediaQueryListListeners); |
196 | 196 |
197 for (MediaQueryListListeners::const_iterator it = listeners.begin(), end = l
isteners.end(); | 197 for (const auto& listener : listeners) { |
198 it != end; ++it) { | 198 listener->notifyMediaQueryChanged(); |
199 (*it)->notifyMediaQueryChanged(); | |
200 } | 199 } |
201 } | 200 } |
202 | 201 |
203 void ScriptedAnimationController::serviceScriptedAnimations(double monotonicTime
Now) | 202 void ScriptedAnimationController::serviceScriptedAnimations(double monotonicTime
Now) |
204 { | 203 { |
205 if (!m_callbacks.size() && !m_eventQueue.size() && !m_mediaQueryListListener
s.size()) | 204 if (!m_callbacks.size() && !m_eventQueue.size() && !m_mediaQueryListListener
s.size()) |
206 return; | 205 return; |
207 | 206 |
208 if (m_suspendCount) | 207 if (m_suspendCount) |
209 return; | 208 return; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 return; | 247 return; |
249 | 248 |
250 if (!m_callbacks.size() && !m_eventQueue.size() && !m_mediaQueryListListener
s.size()) | 249 if (!m_callbacks.size() && !m_eventQueue.size() && !m_mediaQueryListListener
s.size()) |
251 return; | 250 return; |
252 | 251 |
253 if (FrameView* frameView = m_document->view()) | 252 if (FrameView* frameView = m_document->view()) |
254 frameView->scheduleAnimation(); | 253 frameView->scheduleAnimation(); |
255 } | 254 } |
256 | 255 |
257 } | 256 } |
OLD | NEW |