| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 ScrollBehavior behavior) { | 177 ScrollBehavior behavior) { |
| 178 ScrollOffset clampedOffset = clampScrollOffset(offset); | 178 ScrollOffset clampedOffset = clampScrollOffset(offset); |
| 179 if (clampedOffset == scrollOffset()) | 179 if (clampedOffset == scrollOffset()) |
| 180 return; | 180 return; |
| 181 | 181 |
| 182 if (behavior == ScrollBehaviorAuto) | 182 if (behavior == ScrollBehaviorAuto) |
| 183 behavior = scrollBehaviorStyle(); | 183 behavior = scrollBehaviorStyle(); |
| 184 | 184 |
| 185 switch (scrollType) { | 185 switch (scrollType) { |
| 186 case CompositorScroll: | 186 case CompositorScroll: |
| 187 case ClampingScroll: |
| 187 scrollOffsetChanged(clampedOffset, scrollType); | 188 scrollOffsetChanged(clampedOffset, scrollType); |
| 188 break; | 189 break; |
| 189 case AnchoringScroll: | 190 case AnchoringScroll: |
| 190 scrollAnimator().adjustAnimationAndSetScrollOffset(clampedOffset, | 191 scrollAnimator().adjustAnimationAndSetScrollOffset(clampedOffset, |
| 191 scrollType); | 192 scrollType); |
| 192 break; | 193 break; |
| 193 case ProgrammaticScroll: | 194 case ProgrammaticScroll: |
| 194 programmaticScrollHelper(clampedOffset, behavior); | 195 programmaticScrollHelper(clampedOffset, behavior); |
| 195 break; | 196 break; |
| 196 case UserScroll: | 197 case UserScroll: |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 return IntSize(std::max(0, size.width() - verticalScrollbarWidth()), | 591 return IntSize(std::max(0, size.width() - verticalScrollbarWidth()), |
| 591 std::max(0, size.height() - horizontalScrollbarHeight())); | 592 std::max(0, size.height() - horizontalScrollbarHeight())); |
| 592 } | 593 } |
| 593 | 594 |
| 594 DEFINE_TRACE(ScrollableArea) { | 595 DEFINE_TRACE(ScrollableArea) { |
| 595 visitor->trace(m_scrollAnimator); | 596 visitor->trace(m_scrollAnimator); |
| 596 visitor->trace(m_programmaticScrollAnimator); | 597 visitor->trace(m_programmaticScrollAnimator); |
| 597 } | 598 } |
| 598 | 599 |
| 599 } // namespace blink | 600 } // namespace blink |
| OLD | NEW |