| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010, Google Inc. All rights reserved. | 2 * Copyright (c) 2010, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "ScrollAnimator.h" | 32 #include "ScrollAnimator.h" |
| 33 | 33 |
| 34 #include "ScrollbarClient.h" | 34 #include "ScrollbarClient.h" |
| 35 #include <algorithm> | 35 #include <algorithm> |
| 36 | 36 |
| 37 namespace WebCore { | 37 namespace WebCore { |
| 38 | 38 |
| 39 #if !OS(WINDOWS) | 39 #if !ENABLE(SMOOTH_SCROLLING) |
| 40 ScrollAnimator* ScrollAnimator::create(ScrollbarClient* client) | 40 ScrollAnimator* ScrollAnimator::create(ScrollbarClient* client) |
| 41 { | 41 { |
| 42 return new ScrollAnimator(client); | 42 return new ScrollAnimator(client); |
| 43 } | 43 } |
| 44 #endif | 44 #endif |
| 45 | 45 |
| 46 ScrollAnimator::ScrollAnimator(ScrollbarClient* client) | 46 ScrollAnimator::ScrollAnimator(ScrollbarClient* client) |
| 47 : m_client(client) | 47 : m_client(client) |
| 48 , m_currentPosX(0) | 48 , m_currentPosX(0) |
| 49 , m_currentPosY(0) | 49 , m_currentPosY(0) |
| (...skipping 17 matching lines...) Expand all Loading... |
| 67 | 67 |
| 68 void ScrollAnimator::setScrollPositionAndStopAnimation(ScrollbarOrientation orie
ntation, float pos) | 68 void ScrollAnimator::setScrollPositionAndStopAnimation(ScrollbarOrientation orie
ntation, float pos) |
| 69 { | 69 { |
| 70 if (orientation == HorizontalScrollbar) | 70 if (orientation == HorizontalScrollbar) |
| 71 m_currentPosX = pos; | 71 m_currentPosX = pos; |
| 72 else | 72 else |
| 73 m_currentPosY = pos; | 73 m_currentPosY = pos; |
| 74 } | 74 } |
| 75 | 75 |
| 76 } // namespace WebCore | 76 } // namespace WebCore |
| OLD | NEW |