OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010, Google Inc. All rights reserved. | 2 * Copyright (c) 2010, Google Inc. All rights reserved. |
3 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. | 3 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 step = pixelStep(orientation); | 152 step = pixelStep(orientation); |
153 break; | 153 break; |
154 } | 154 } |
155 | 155 |
156 if (direction == ScrollUp || direction == ScrollLeft) | 156 if (direction == ScrollUp || direction == ScrollLeft) |
157 delta = -delta; | 157 delta = -delta; |
158 | 158 |
159 return scrollAnimator()->scroll(orientation, granularity, step, delta); | 159 return scrollAnimator()->scroll(orientation, granularity, step, delta); |
160 } | 160 } |
161 | 161 |
| 162 void ScrollableArea::setScrollPosition(const DoublePoint& position, ScrollBehavi
or behavior) |
| 163 { |
| 164 // FIXME(417782): This should be unified with RenderLayerScrollableArea::scr
ollToOffset. |
| 165 ASSERT_NOT_REACHED(); |
| 166 } |
| 167 |
162 void ScrollableArea::scrollToOffsetWithoutAnimation(const FloatPoint& offset, bo
ol cancelProgrammaticAnimations) | 168 void ScrollableArea::scrollToOffsetWithoutAnimation(const FloatPoint& offset, bo
ol cancelProgrammaticAnimations) |
163 { | 169 { |
164 if (cancelProgrammaticAnimations) | 170 if (cancelProgrammaticAnimations) |
165 cancelProgrammaticScrollAnimation(); | 171 cancelProgrammaticScrollAnimation(); |
166 scrollAnimator()->scrollToOffsetWithoutAnimation(offset); | 172 scrollAnimator()->scrollToOffsetWithoutAnimation(offset); |
167 } | 173 } |
168 | 174 |
169 void ScrollableArea::scrollToOffsetWithoutAnimation(ScrollbarOrientation orienta
tion, float offset) | 175 void ScrollableArea::scrollToOffsetWithoutAnimation(ScrollbarOrientation orienta
tion, float offset) |
170 { | 176 { |
171 if (orientation == HorizontalScrollbar) | 177 if (orientation == HorizontalScrollbar) |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 { | 517 { |
512 return scrollSize(orientation); | 518 return scrollSize(orientation); |
513 } | 519 } |
514 | 520 |
515 float ScrollableArea::pixelStep(ScrollbarOrientation) const | 521 float ScrollableArea::pixelStep(ScrollbarOrientation) const |
516 { | 522 { |
517 return 1; | 523 return 1; |
518 } | 524 } |
519 | 525 |
520 } // namespace blink | 526 } // namespace blink |
OLD | NEW |