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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 currentValue = 1 - progress; | 421 currentValue = 1 - progress; |
422 else | 422 else |
423 currentValue = progress; | 423 currentValue = progress; |
424 | 424 |
425 switch (_featureToAnimate) { | 425 switch (_featureToAnimate) { |
426 case ThumbAlpha: | 426 case ThumbAlpha: |
427 [_scrollbarPainter.get() setKnobAlpha:currentValue]; | 427 [_scrollbarPainter.get() setKnobAlpha:currentValue]; |
428 break; | 428 break; |
429 case TrackAlpha: | 429 case TrackAlpha: |
430 [_scrollbarPainter.get() setTrackAlpha:currentValue]; | 430 [_scrollbarPainter.get() setTrackAlpha:currentValue]; |
431 _scrollbar->setNeedsPaintInvalidation(static_cast<ScrollbarPart>(~ThumbP
art)); | 431 _scrollbar->setTrackNeedsRepaint(true); |
432 break; | 432 break; |
433 case UIStateTransition: | 433 case UIStateTransition: |
434 [_scrollbarPainter.get() setUiStateTransitionProgress:currentValue]; | 434 [_scrollbarPainter.get() setUiStateTransitionProgress:currentValue]; |
435 _scrollbar->setNeedsPaintInvalidation(); | 435 _scrollbar->setThumbNeedsRepaint(true); |
| 436 _scrollbar->setTrackNeedsRepaint(true); |
436 break; | 437 break; |
437 case ExpansionTransition: | 438 case ExpansionTransition: |
438 [_scrollbarPainter.get() setExpansionTransitionProgress:currentValue]; | 439 [_scrollbarPainter.get() setExpansionTransitionProgress:currentValue]; |
439 _scrollbar->setNeedsPaintInvalidation(ThumbPart); | 440 _scrollbar->setThumbNeedsRepaint(true); |
440 break; | 441 break; |
441 } | 442 } |
| 443 |
| 444 _scrollbar->setNeedsPaintInvalidation(); |
442 } | 445 } |
443 | 446 |
444 - (void)invalidate | 447 - (void)invalidate |
445 { | 448 { |
446 BEGIN_BLOCK_OBJC_EXCEPTIONS; | 449 BEGIN_BLOCK_OBJC_EXCEPTIONS; |
447 [self stopAnimation]; | 450 [self stopAnimation]; |
448 END_BLOCK_OBJC_EXCEPTIONS; | 451 END_BLOCK_OBJC_EXCEPTIONS; |
449 _scrollbar = 0; | 452 _scrollbar = 0; |
450 } | 453 } |
451 | 454 |
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1193 return; | 1196 return; |
1194 | 1197 |
1195 m_visibleScrollerThumbRect = rectInViewCoordinates; | 1198 m_visibleScrollerThumbRect = rectInViewCoordinates; |
1196 } | 1199 } |
1197 | 1200 |
1198 bool ScrollAnimatorMac::canUseCoordinatedScrollbar() { | 1201 bool ScrollAnimatorMac::canUseCoordinatedScrollbar() { |
1199 return ScrollbarThemeMacCommon::isOverlayAPIAvailable(); | 1202 return ScrollbarThemeMacCommon::isOverlayAPIAvailable(); |
1200 } | 1203 } |
1201 | 1204 |
1202 } // namespace blink | 1205 } // namespace blink |
OLD | NEW |