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 23 matching lines...) Expand all Loading... |
34 #include "FloatPoint.h" | 34 #include "FloatPoint.h" |
35 #include "PlatformWheelEvent.h" | 35 #include "PlatformWheelEvent.h" |
36 #include "ScrollableArea.h" | 36 #include "ScrollableArea.h" |
37 #include <algorithm> | 37 #include <algorithm> |
38 #include <wtf/PassOwnPtr.h> | 38 #include <wtf/PassOwnPtr.h> |
39 | 39 |
40 using namespace std; | 40 using namespace std; |
41 | 41 |
42 namespace WebCore { | 42 namespace WebCore { |
43 | 43 |
44 #if !ENABLE(SMOOTH_SCROLLING) | 44 #if !ENABLE(SMOOTH_SCROLLING) && !(PLATFORM(CHROMIUM) && OS(DARWIN)) |
45 PassOwnPtr<ScrollAnimator> ScrollAnimator::create(ScrollableArea* scrollableArea
) | 45 PassOwnPtr<ScrollAnimator> ScrollAnimator::create(ScrollableArea* scrollableArea
) |
46 { | 46 { |
47 return adoptPtr(new ScrollAnimator(scrollableArea)); | 47 return adoptPtr(new ScrollAnimator(scrollableArea)); |
48 } | 48 } |
49 #endif | 49 #endif |
50 | 50 |
51 ScrollAnimator::ScrollAnimator(ScrollableArea* scrollableArea) | 51 ScrollAnimator::ScrollAnimator(ScrollableArea* scrollableArea) |
52 : m_scrollableArea(scrollableArea) | 52 : m_scrollableArea(scrollableArea) |
53 , m_currentPosX(0) | 53 , m_currentPosX(0) |
54 , m_currentPosY(0) | 54 , m_currentPosY(0) |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 { | 124 { |
125 return FloatPoint(m_currentPosX, m_currentPosY); | 125 return FloatPoint(m_currentPosX, m_currentPosY); |
126 } | 126 } |
127 | 127 |
128 void ScrollAnimator::notityPositionChanged() | 128 void ScrollAnimator::notityPositionChanged() |
129 { | 129 { |
130 m_scrollableArea->setScrollOffsetFromAnimation(IntPoint(m_currentPosX, m_cur
rentPosY)); | 130 m_scrollableArea->setScrollOffsetFromAnimation(IntPoint(m_currentPosX, m_cur
rentPosY)); |
131 } | 131 } |
132 | 132 |
133 } // namespace WebCore | 133 } // namespace WebCore |
OLD | NEW |