| 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 = max(oneMillisecond, interval * oneMillisecond)
; | 93 double intervalMilliseconds = max(oneMillisecond, interval * oneMillisecond)
; |
| 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); | 97 startOneShot(intervalMilliseconds, FROM_HERE); |
| 98 else | 98 else |
| 99 startRepeating(intervalMilliseconds); | 99 startRepeating(intervalMilliseconds, FROM_HERE); |
| 100 } | 100 } |
| 101 | 101 |
| 102 DOMTimer::~DOMTimer() | 102 DOMTimer::~DOMTimer() |
| 103 { | 103 { |
| 104 } | 104 } |
| 105 | 105 |
| 106 int DOMTimer::timeoutID() const | 106 int DOMTimer::timeoutID() const |
| 107 { | 107 { |
| 108 return m_timeoutID; | 108 return m_timeoutID; |
| 109 } | 109 } |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 if (fireTime - alignedTimeRoundedDown < minimumInterval) | 191 if (fireTime - alignedTimeRoundedDown < minimumInterval) |
| 192 return alignedTimeRoundedDown; | 192 return alignedTimeRoundedDown; |
| 193 | 193 |
| 194 return alignedTimeRoundedUp; | 194 return alignedTimeRoundedUp; |
| 195 } | 195 } |
| 196 | 196 |
| 197 return fireTime; | 197 return fireTime; |
| 198 } | 198 } |
| 199 | 199 |
| 200 } // namespace WebCore | 200 } // namespace WebCore |
| OLD | NEW |