| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 ProgrammaticScrollHelper(clamped_offset, behavior); | 190 ProgrammaticScrollHelper(clamped_offset, behavior); |
| 191 break; | 191 break; |
| 192 case kUserScroll: | 192 case kUserScroll: |
| 193 UserScrollHelper(clamped_offset, behavior); | 193 UserScrollHelper(clamped_offset, behavior); |
| 194 break; | 194 break; |
| 195 default: | 195 default: |
| 196 NOTREACHED(); | 196 NOTREACHED(); |
| 197 } | 197 } |
| 198 } | 198 } |
| 199 | 199 |
| 200 /*Vector<double> ScrollableArea::getSnapOffsetsH() { |
| 201 return layoutBox()->getSnapOffsetsH(); |
| 202 } |
| 203 |
| 204 Vector<double> ScrollableArea::getSnapOffsetsV() { |
| 205 return layoutBox()->getSnapOffsetsV(); |
| 206 }*/ |
| 207 |
| 200 void ScrollableArea::ScrollBy(const ScrollOffset& delta, | 208 void ScrollableArea::ScrollBy(const ScrollOffset& delta, |
| 201 ScrollType type, | 209 ScrollType type, |
| 202 ScrollBehavior behavior) { | 210 ScrollBehavior behavior) { |
| 203 SetScrollOffset(GetScrollOffset() + delta, type, behavior); | 211 SetScrollOffset(GetScrollOffset() + delta, type, behavior); |
| 204 } | 212 } |
| 205 | 213 |
| 206 void ScrollableArea::SetScrollOffsetSingleAxis(ScrollbarOrientation orientation, | 214 void ScrollableArea::SetScrollOffsetSingleAxis(ScrollbarOrientation orientation, |
| 207 float offset, | 215 float offset, |
| 208 ScrollType scroll_type, | 216 ScrollType scroll_type, |
| 209 ScrollBehavior behavior) { | 217 ScrollBehavior behavior) { |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 offset.y() - ScrollOrigin().Y()); | 679 offset.y() - ScrollOrigin().Y()); |
| 672 SetScrollOffset(new_offset, kCompositorScroll); | 680 SetScrollOffset(new_offset, kCompositorScroll); |
| 673 } | 681 } |
| 674 | 682 |
| 675 DEFINE_TRACE(ScrollableArea) { | 683 DEFINE_TRACE(ScrollableArea) { |
| 676 visitor->Trace(scroll_animator_); | 684 visitor->Trace(scroll_animator_); |
| 677 visitor->Trace(programmatic_scroll_animator_); | 685 visitor->Trace(programmatic_scroll_animator_); |
| 678 } | 686 } |
| 679 | 687 |
| 680 } // namespace blink | 688 } // namespace blink |
| OLD | NEW |