| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 : m_document(document) | 46 : m_document(document) |
| 47 , m_nextCallbackId(0) | 47 , m_nextCallbackId(0) |
| 48 , m_suspendCount(0) | 48 , m_suspendCount(0) |
| 49 { | 49 { |
| 50 } | 50 } |
| 51 | 51 |
| 52 ScriptedAnimationController::~ScriptedAnimationController() | 52 ScriptedAnimationController::~ScriptedAnimationController() |
| 53 { | 53 { |
| 54 } | 54 } |
| 55 | 55 |
| 56 void ScriptedAnimationController::trace(Visitor* visitor) | |
| 57 { | |
| 58 #if ENABLE(OILPAN) | |
| 59 visitor->trace(m_callbacks); | |
| 60 visitor->trace(m_callbacksToInvoke); | |
| 61 visitor->trace(m_document); | |
| 62 visitor->trace(m_eventQueue); | |
| 63 visitor->trace(m_mediaQueryListListeners); | |
| 64 visitor->trace(m_perFrameEvents); | |
| 65 #endif | |
| 66 } | |
| 67 | |
| 68 void ScriptedAnimationController::suspend() | 56 void ScriptedAnimationController::suspend() |
| 69 { | 57 { |
| 70 ++m_suspendCount; | 58 ++m_suspendCount; |
| 71 WTF_LOG(ScriptedAnimationController, "suspend: count = %d", m_suspendCount); | 59 WTF_LOG(ScriptedAnimationController, "suspend: count = %d", m_suspendCount); |
| 72 } | 60 } |
| 73 | 61 |
| 74 void ScriptedAnimationController::resume() | 62 void ScriptedAnimationController::resume() |
| 75 { | 63 { |
| 76 // It would be nice to put an ASSERT(m_suspendCount > 0) here, but in WK1 re
sume() can be called | 64 // It would be nice to put an ASSERT(m_suspendCount > 0) here, but in WK1 re
sume() can be called |
| 77 // even when suspend hasn't (if a tab was created in the background). | 65 // even when suspend hasn't (if a tab was created in the background). |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 return; | 224 return; |
| 237 | 225 |
| 238 if (!m_callbacks.size() && !m_eventQueue.size() && !m_mediaQueryListListener
s.size()) | 226 if (!m_callbacks.size() && !m_eventQueue.size() && !m_mediaQueryListListener
s.size()) |
| 239 return; | 227 return; |
| 240 | 228 |
| 241 if (FrameView* frameView = m_document->view()) | 229 if (FrameView* frameView = m_document->view()) |
| 242 frameView->scheduleAnimation(); | 230 frameView->scheduleAnimation(); |
| 243 } | 231 } |
| 244 | 232 |
| 245 } | 233 } |
| OLD | NEW |