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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 // TODO(bokan): The userScroll method should probably be modified to call this | 248 // TODO(bokan): The userScroll method should probably be modified to call this |
249 // method and ScrollAnimatorBase to have a simpler | 249 // method and ScrollAnimatorBase to have a simpler |
250 // animateToOffset method like the ProgrammaticScrollAnimator. | 250 // animateToOffset method like the ProgrammaticScrollAnimator. |
251 DCHECK_EQ(scroll_behavior, kScrollBehaviorInstant); | 251 DCHECK_EQ(scroll_behavior, kScrollBehaviorInstant); |
252 GetScrollAnimator().ScrollToOffsetWithoutAnimation(ScrollOffset(x, y)); | 252 GetScrollAnimator().ScrollToOffsetWithoutAnimation(ScrollOffset(x, y)); |
253 } | 253 } |
254 | 254 |
255 LayoutRect ScrollableArea::ScrollIntoView(const LayoutRect& rect_in_content, | 255 LayoutRect ScrollableArea::ScrollIntoView(const LayoutRect& rect_in_content, |
256 const ScrollAlignment& align_x, | 256 const ScrollAlignment& align_x, |
257 const ScrollAlignment& align_y, | 257 const ScrollAlignment& align_y, |
258 ScrollType) { | 258 ScrollType, |
| 259 bool is_smooth) { |
259 // TODO(bokan): This should really be implemented here but ScrollAlignment is | 260 // TODO(bokan): This should really be implemented here but ScrollAlignment is |
260 // in Core which is a dependency violation. | 261 // in Core which is a dependency violation. |
261 NOTREACHED(); | 262 NOTREACHED(); |
262 return LayoutRect(); | 263 return LayoutRect(); |
263 } | 264 } |
264 | 265 |
265 void ScrollableArea::ScrollOffsetChanged(const ScrollOffset& offset, | 266 void ScrollableArea::ScrollOffsetChanged(const ScrollOffset& offset, |
266 ScrollType scroll_type) { | 267 ScrollType scroll_type) { |
267 TRACE_EVENT0("blink", "ScrollableArea::scrollOffsetChanged"); | 268 TRACE_EVENT0("blink", "ScrollableArea::scrollOffsetChanged"); |
268 | 269 |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 offset.y() - ScrollOrigin().Y()); | 672 offset.y() - ScrollOrigin().Y()); |
672 SetScrollOffset(new_offset, kCompositorScroll); | 673 SetScrollOffset(new_offset, kCompositorScroll); |
673 } | 674 } |
674 | 675 |
675 DEFINE_TRACE(ScrollableArea) { | 676 DEFINE_TRACE(ScrollableArea) { |
676 visitor->Trace(scroll_animator_); | 677 visitor->Trace(scroll_animator_); |
677 visitor->Trace(programmatic_scroll_animator_); | 678 visitor->Trace(programmatic_scroll_animator_); |
678 } | 679 } |
679 | 680 |
680 } // namespace blink | 681 } // namespace blink |
OLD | NEW |