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

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

Issue 1170223002: Revert of Removed unused ScrollAnimatorMac methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « Source/platform/mac/ScrollAnimatorMac.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 - (NSRect)bounds 123 - (NSRect)bounds
124 { 124 {
125 if (!_animator) 125 if (!_animator)
126 return NSZeroRect; 126 return NSZeroRect;
127 127
128 blink::FloatPoint currentPosition = _animator->currentPosition(); 128 blink::FloatPoint currentPosition = _animator->currentPosition();
129 return NSMakeRect(currentPosition.x(), currentPosition.y(), 0, 0); 129 return NSMakeRect(currentPosition.x(), currentPosition.y(), 0, 0);
130 } 130 }
131 131
132 - (void)_immediateScrollToPoint:(NSPoint)newPosition
133 {
134 if (!_animator)
135 return;
136 _animator->immediateScrollToPointForScrollAnimation(newPosition);
137 }
138
132 - (NSPoint)_pixelAlignProposedScrollPosition:(NSPoint)newOrigin 139 - (NSPoint)_pixelAlignProposedScrollPosition:(NSPoint)newOrigin
133 { 140 {
134 return newOrigin; 141 return newOrigin;
135 } 142 }
136 143
137 - (NSSize)convertSizeToBase:(NSSize)size 144 - (NSSize)convertSizeToBase:(NSSize)size
138 { 145 {
139 return abs(size); 146 return abs(size);
140 } 147 }
141 148
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 return; 762 return;
756 763
757 FloatSize delta = FloatSize(adjustedPosition.x() - m_currentPosX, adjustedPo sition.y() - m_currentPosY); 764 FloatSize delta = FloatSize(adjustedPosition.x() - m_currentPosX, adjustedPo sition.y() - m_currentPosY);
758 765
759 m_currentPosX = adjustedPosition.x(); 766 m_currentPosX = adjustedPosition.x();
760 m_currentPosY = adjustedPosition.y(); 767 m_currentPosY = adjustedPosition.y();
761 notifyContentAreaScrolled(delta); 768 notifyContentAreaScrolled(delta);
762 notifyPositionChanged(); 769 notifyPositionChanged();
763 } 770 }
764 771
772 void ScrollAnimatorMac::immediateScrollToPointForScrollAnimation(const FloatPoin t& newPosition)
773 {
774 ASSERT(m_scrollAnimationHelper);
775 immediateScrollTo(newPosition);
776 }
777
765 void ScrollAnimatorMac::contentAreaWillPaint() const 778 void ScrollAnimatorMac::contentAreaWillPaint() const
766 { 779 {
767 if (!scrollableArea()->scrollbarsCanBeActive()) 780 if (!scrollableArea()->scrollbarsCanBeActive())
768 return; 781 return;
769 if (ScrollbarThemeMacCommon::isOverlayAPIAvailable()) 782 if (ScrollbarThemeMacCommon::isOverlayAPIAvailable())
770 [m_scrollbarPainterController.get() contentAreaWillDraw]; 783 [m_scrollbarPainterController.get() contentAreaWillDraw];
771 } 784 }
772 785
773 void ScrollAnimatorMac::mouseEnteredContentArea() const 786 void ScrollAnimatorMac::mouseEnteredContentArea() const
774 { 787 {
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 return; 1167 return;
1155 1168
1156 m_visibleScrollerThumbRect = rectInViewCoordinates; 1169 m_visibleScrollerThumbRect = rectInViewCoordinates;
1157 } 1170 }
1158 1171
1159 bool ScrollAnimatorMac::canUseCoordinatedScrollbar() { 1172 bool ScrollAnimatorMac::canUseCoordinatedScrollbar() {
1160 return ScrollbarThemeMacCommon::isOverlayAPIAvailable(); 1173 return ScrollbarThemeMacCommon::isOverlayAPIAvailable();
1161 } 1174 }
1162 1175
1163 } // namespace blink 1176 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/mac/ScrollAnimatorMac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698