| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 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 * 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 , m_action(action) | 87 , m_action(action) |
| 88 { | 88 { |
| 89 ASSERT(timeoutID > 0); | 89 ASSERT(timeoutID > 0); |
| 90 if (shouldForwardUserGesture(interval, m_nestingLevel)) | 90 if (shouldForwardUserGesture(interval, m_nestingLevel)) |
| 91 m_userGestureToken = UserGestureIndicator::currentToken(); | 91 m_userGestureToken = UserGestureIndicator::currentToken(); |
| 92 | 92 |
| 93 double intervalMilliseconds = std::max(oneMillisecond, interval * oneMillise
cond); | 93 double intervalMilliseconds = std::max(oneMillisecond, interval * oneMillise
cond); |
| 94 if (intervalMilliseconds < minimumInterval && m_nestingLevel >= maxTimerNest
ingLevel) | 94 if (intervalMilliseconds < minimumInterval && m_nestingLevel >= maxTimerNest
ingLevel) |
| 95 intervalMilliseconds = minimumInterval; | 95 intervalMilliseconds = minimumInterval; |
| 96 if (singleShot) | 96 if (singleShot) |
| 97 startOneShot(intervalMilliseconds, FROM_HERE); | 97 startOneShot(intervalMilliseconds, BLINK_FROM_HERE); |
| 98 else | 98 else |
| 99 startRepeating(intervalMilliseconds, FROM_HERE); | 99 startRepeating(intervalMilliseconds, BLINK_FROM_HERE); |
| 100 } | 100 } |
| 101 | 101 |
| 102 DOMTimer::~DOMTimer() | 102 DOMTimer::~DOMTimer() |
| 103 { | 103 { |
| 104 } | 104 } |
| 105 | 105 |
| 106 void DOMTimer::disposeTimer() | 106 void DOMTimer::disposeTimer() |
| 107 { | 107 { |
| 108 m_action = nullptr; | 108 m_action = nullptr; |
| 109 m_userGestureToken = nullptr; | 109 m_userGestureToken = nullptr; |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 return fireTime; | 200 return fireTime; |
| 201 } | 201 } |
| 202 | 202 |
| 203 DEFINE_TRACE(DOMTimer) | 203 DEFINE_TRACE(DOMTimer) |
| 204 { | 204 { |
| 205 visitor->trace(m_action); | 205 visitor->trace(m_action); |
| 206 SuspendableTimer::trace(visitor); | 206 SuspendableTimer::trace(visitor); |
| 207 } | 207 } |
| 208 | 208 |
| 209 } // namespace blink | 209 } // namespace blink |
| OLD | NEW |