| 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 // TODO(bokan): The userScroll method should probably be modified to call this | 243 // TODO(bokan): The userScroll method should probably be modified to call this |
| 244 // method and ScrollAnimatorBase to have a simpler | 244 // method and ScrollAnimatorBase to have a simpler |
| 245 // animateToOffset method like the ProgrammaticScrollAnimator. | 245 // animateToOffset method like the ProgrammaticScrollAnimator. |
| 246 ASSERT(scrollBehavior == ScrollBehaviorInstant); | 246 ASSERT(scrollBehavior == ScrollBehaviorInstant); |
| 247 scrollAnimator().scrollToOffsetWithoutAnimation(ScrollOffset(x, y)); | 247 scrollAnimator().scrollToOffsetWithoutAnimation(ScrollOffset(x, y)); |
| 248 } | 248 } |
| 249 | 249 |
| 250 LayoutRect ScrollableArea::scrollIntoView(const LayoutRect& rectInContent, | 250 LayoutRect ScrollableArea::scrollIntoView(const LayoutRect& rectInContent, |
| 251 const ScrollAlignment& alignX, | 251 const ScrollAlignment& alignX, |
| 252 const ScrollAlignment& alignY, | 252 const ScrollAlignment& alignY, |
| 253 ScrollType) { | 253 ScrollType, |
| 254 bool isSmooth) { |
| 254 // TODO(bokan): This should really be implemented here but ScrollAlignment is | 255 // TODO(bokan): This should really be implemented here but ScrollAlignment is |
| 255 // in Core which is a dependency violation. | 256 // in Core which is a dependency violation. |
| 256 ASSERT_NOT_REACHED(); | 257 ASSERT_NOT_REACHED(); |
| 257 return LayoutRect(); | 258 return LayoutRect(); |
| 258 } | 259 } |
| 259 | 260 |
| 260 void ScrollableArea::scrollOffsetChanged(const ScrollOffset& offset, | 261 void ScrollableArea::scrollOffsetChanged(const ScrollOffset& offset, |
| 261 ScrollType scrollType) { | 262 ScrollType scrollType) { |
| 262 TRACE_EVENT0("blink", "ScrollableArea::scrollOffsetChanged"); | 263 TRACE_EVENT0("blink", "ScrollableArea::scrollOffsetChanged"); |
| 263 | 264 |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 offset.y() - scrollOrigin().y()); | 670 offset.y() - scrollOrigin().y()); |
| 670 setScrollOffset(newOffset, CompositorScroll); | 671 setScrollOffset(newOffset, CompositorScroll); |
| 671 } | 672 } |
| 672 | 673 |
| 673 DEFINE_TRACE(ScrollableArea) { | 674 DEFINE_TRACE(ScrollableArea) { |
| 674 visitor->trace(m_scrollAnimator); | 675 visitor->trace(m_scrollAnimator); |
| 675 visitor->trace(m_programmaticScrollAnimator); | 676 visitor->trace(m_programmaticScrollAnimator); |
| 676 } | 677 } |
| 677 | 678 |
| 678 } // namespace blink | 679 } // namespace blink |
| OLD | NEW |