| 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 // TODO(bokan): The userScroll method should probably be modified to call this | 242 // TODO(bokan): The userScroll method should probably be modified to call this |
| 243 // method and ScrollAnimatorBase to have a simpler | 243 // method and ScrollAnimatorBase to have a simpler |
| 244 // animateToOffset method like the ProgrammaticScrollAnimator. | 244 // animateToOffset method like the ProgrammaticScrollAnimator. |
| 245 ASSERT(scrollBehavior == ScrollBehaviorInstant); | 245 ASSERT(scrollBehavior == ScrollBehaviorInstant); |
| 246 scrollAnimator().scrollToOffsetWithoutAnimation(ScrollOffset(x, y)); | 246 scrollAnimator().scrollToOffsetWithoutAnimation(ScrollOffset(x, y)); |
| 247 } | 247 } |
| 248 | 248 |
| 249 LayoutRect ScrollableArea::scrollIntoView(const LayoutRect& rectInContent, | 249 LayoutRect ScrollableArea::scrollIntoView(const LayoutRect& rectInContent, |
| 250 const ScrollAlignment& alignX, | 250 const ScrollAlignment& alignX, |
| 251 const ScrollAlignment& alignY, | 251 const ScrollAlignment& alignY, |
| 252 ScrollType) { | 252 ScrollType, |
| 253 ScrollBehavior) { |
| 253 // TODO(bokan): This should really be implemented here but ScrollAlignment is | 254 // TODO(bokan): This should really be implemented here but ScrollAlignment is |
| 254 // in Core which is a dependency violation. | 255 // in Core which is a dependency violation. |
| 255 ASSERT_NOT_REACHED(); | 256 ASSERT_NOT_REACHED(); |
| 256 return LayoutRect(); | 257 return LayoutRect(); |
| 257 } | 258 } |
| 258 | 259 |
| 259 void ScrollableArea::scrollOffsetChanged(const ScrollOffset& offset, | 260 void ScrollableArea::scrollOffsetChanged(const ScrollOffset& offset, |
| 260 ScrollType scrollType) { | 261 ScrollType scrollType) { |
| 261 TRACE_EVENT0("blink", "ScrollableArea::scrollOffsetChanged"); | 262 TRACE_EVENT0("blink", "ScrollableArea::scrollOffsetChanged"); |
| 262 | 263 |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 return IntSize(std::max(0, size.width() - verticalScrollbarWidth()), | 662 return IntSize(std::max(0, size.width() - verticalScrollbarWidth()), |
| 662 std::max(0, size.height() - horizontalScrollbarHeight())); | 663 std::max(0, size.height() - horizontalScrollbarHeight())); |
| 663 } | 664 } |
| 664 | 665 |
| 665 DEFINE_TRACE(ScrollableArea) { | 666 DEFINE_TRACE(ScrollableArea) { |
| 666 visitor->trace(m_scrollAnimator); | 667 visitor->trace(m_scrollAnimator); |
| 667 visitor->trace(m_programmaticScrollAnimator); | 668 visitor->trace(m_programmaticScrollAnimator); |
| 668 } | 669 } |
| 669 | 670 |
| 670 } // namespace blink | 671 } // namespace blink |
| OLD | NEW |