| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010, 2011 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 { | 323 { |
| 324 m_timer.stop(); | 324 m_timer.stop(); |
| 325 } | 325 } |
| 326 | 326 |
| 327 void setDuration(CFTimeInterval duration) | 327 void setDuration(CFTimeInterval duration) |
| 328 { | 328 { |
| 329 m_duration = duration; | 329 m_duration = duration; |
| 330 } | 330 } |
| 331 | 331 |
| 332 private: | 332 private: |
| 333 void timerFired(Timer<BlinkScrollbarPartAnimationTimer>*) | 333 void timerFired(TimerBase*) |
| 334 { | 334 { |
| 335 double currentTime = WTF::currentTime(); | 335 double currentTime = WTF::currentTime(); |
| 336 double delta = currentTime - m_startTime; | 336 double delta = currentTime - m_startTime; |
| 337 | 337 |
| 338 if (delta >= m_duration) | 338 if (delta >= m_duration) |
| 339 m_timer.stop(); | 339 m_timer.stop(); |
| 340 | 340 |
| 341 double fraction = delta / m_duration; | 341 double fraction = delta / m_duration; |
| 342 fraction = clampTo(fraction, 0.0, 1.0); | 342 fraction = clampTo(fraction, 0.0, 1.0); |
| 343 double progress = m_timingFunction->evaluate(fraction, 0.001); | 343 double progress = m_timingFunction->evaluate(fraction, 0.001); |
| (...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1101 if (Scrollbar* verticalScrollbar = m_scrollableArea->verticalScrollbar()) | 1101 if (Scrollbar* verticalScrollbar = m_scrollableArea->verticalScrollbar()) |
| 1102 rectInViewCoordinates = verticalScrollbar->convertToContainingWidget(scr
ollerThumb); | 1102 rectInViewCoordinates = verticalScrollbar->convertToContainingWidget(scr
ollerThumb); |
| 1103 | 1103 |
| 1104 if (rectInViewCoordinates == m_visibleScrollerThumbRect) | 1104 if (rectInViewCoordinates == m_visibleScrollerThumbRect) |
| 1105 return; | 1105 return; |
| 1106 | 1106 |
| 1107 m_visibleScrollerThumbRect = rectInViewCoordinates; | 1107 m_visibleScrollerThumbRect = rectInViewCoordinates; |
| 1108 } | 1108 } |
| 1109 | 1109 |
| 1110 } // namespace blink | 1110 } // namespace blink |
| OLD | NEW |