Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm

Issue 1558493002: Reland: Make ScrollbarThemeAura selectively invalidate scrollbar parts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ScrollableAreaTest.InvalidatesCompositedScrollbarsIfPartsNeedRepaint for Oilpan Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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->setTrackNeedsRepaint(true); 431 _scrollbar->setNeedsPaintInvalidation(static_cast<ScrollbarPart>(~ThumbP art));
432 break; 432 break;
433 case UIStateTransition: 433 case UIStateTransition:
434 [_scrollbarPainter.get() setUiStateTransitionProgress:currentValue]; 434 [_scrollbarPainter.get() setUiStateTransitionProgress:currentValue];
435 _scrollbar->setThumbNeedsRepaint(true); 435 _scrollbar->setNeedsPaintInvalidation();
436 _scrollbar->setTrackNeedsRepaint(true);
437 break; 436 break;
438 case ExpansionTransition: 437 case ExpansionTransition:
439 [_scrollbarPainter.get() setExpansionTransitionProgress:currentValue]; 438 [_scrollbarPainter.get() setExpansionTransitionProgress:currentValue];
440 _scrollbar->setThumbNeedsRepaint(true); 439 _scrollbar->setNeedsPaintInvalidation(ThumbPart);
441 break; 440 break;
442 } 441 }
443
444 _scrollbar->setNeedsPaintInvalidation();
445 } 442 }
446 443
447 - (void)invalidate 444 - (void)invalidate
448 { 445 {
449 BEGIN_BLOCK_OBJC_EXCEPTIONS; 446 BEGIN_BLOCK_OBJC_EXCEPTIONS;
450 [self stopAnimation]; 447 [self stopAnimation];
451 END_BLOCK_OBJC_EXCEPTIONS; 448 END_BLOCK_OBJC_EXCEPTIONS;
452 _scrollbar = 0; 449 _scrollbar = 0;
453 } 450 }
454 451
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 return; 1193 return;
1197 1194
1198 m_visibleScrollerThumbRect = rectInViewCoordinates; 1195 m_visibleScrollerThumbRect = rectInViewCoordinates;
1199 } 1196 }
1200 1197
1201 bool ScrollAnimatorMac::canUseCoordinatedScrollbar() { 1198 bool ScrollAnimatorMac::canUseCoordinatedScrollbar() {
1202 return ScrollbarThemeMacCommon::isOverlayAPIAvailable(); 1199 return ScrollbarThemeMacCommon::isOverlayAPIAvailable();
1203 } 1200 }
1204 1201
1205 } // namespace blink 1202 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698