| 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 | 357 |
| 358 - (id)initWithScrollbar:(Scrollbar*)scrollbar | 358 - (id)initWithScrollbar:(Scrollbar*)scrollbar |
| 359 featureToAnimate:(FeatureToAnimate)featureToAnimate | 359 featureToAnimate:(FeatureToAnimate)featureToAnimate |
| 360 animateFrom:(CGFloat)startValue | 360 animateFrom:(CGFloat)startValue |
| 361 animateTo:(CGFloat)endValue | 361 animateTo:(CGFloat)endValue |
| 362 duration:(NSTimeInterval)duration { | 362 duration:(NSTimeInterval)duration { |
| 363 self = [super init]; | 363 self = [super init]; |
| 364 if (!self) | 364 if (!self) |
| 365 return nil; | 365 return nil; |
| 366 | 366 |
| 367 _timer = wrapUnique(new BlinkScrollbarPartAnimationTimer(self, duration)); | 367 _timer = |
| 368 WTF::wrapUnique(new BlinkScrollbarPartAnimationTimer(self, duration)); |
| 368 _scrollbar = scrollbar; | 369 _scrollbar = scrollbar; |
| 369 _featureToAnimate = featureToAnimate; | 370 _featureToAnimate = featureToAnimate; |
| 370 _startValue = startValue; | 371 _startValue = startValue; |
| 371 _endValue = endValue; | 372 _endValue = endValue; |
| 372 | 373 |
| 373 return self; | 374 return self; |
| 374 } | 375 } |
| 375 | 376 |
| 376 - (void)startAnimation { | 377 - (void)startAnimation { |
| 377 ASSERT(_scrollbar); | 378 ASSERT(_scrollbar); |
| (...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1080 rectInViewCoordinates = | 1081 rectInViewCoordinates = |
| 1081 verticalScrollbar->convertToContainingWidget(scrollerThumb); | 1082 verticalScrollbar->convertToContainingWidget(scrollerThumb); |
| 1082 | 1083 |
| 1083 if (rectInViewCoordinates == m_visibleScrollerThumbRect) | 1084 if (rectInViewCoordinates == m_visibleScrollerThumbRect) |
| 1084 return; | 1085 return; |
| 1085 | 1086 |
| 1086 m_visibleScrollerThumbRect = rectInViewCoordinates; | 1087 m_visibleScrollerThumbRect = rectInViewCoordinates; |
| 1087 } | 1088 } |
| 1088 | 1089 |
| 1089 } // namespace blink | 1090 } // namespace blink |
| OLD | NEW |