| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 { | 128 { |
| 129 m_currentPosX = position.x(); | 129 m_currentPosX = position.x(); |
| 130 m_currentPosY = position.y(); | 130 m_currentPosY = position.y(); |
| 131 } | 131 } |
| 132 | 132 |
| 133 FloatPoint ScrollAnimator::currentPosition() const | 133 FloatPoint ScrollAnimator::currentPosition() const |
| 134 { | 134 { |
| 135 return FloatPoint(m_currentPosX, m_currentPosY); | 135 return FloatPoint(m_currentPosX, m_currentPosY); |
| 136 } | 136 } |
| 137 | 137 |
| 138 void ScrollAnimator::notifyPositionChanged(const FloatSize& delta) | 138 void ScrollAnimator::notifyPositionChanged(const FloatSize&) |
| 139 { | 139 { |
| 140 UNUSED_PARAM(delta); | |
| 141 m_scrollableArea->setScrollOffsetFromAnimation(IntPoint(m_currentPosX, m_cur
rentPosY)); | 140 m_scrollableArea->setScrollOffsetFromAnimation(IntPoint(m_currentPosX, m_cur
rentPosY)); |
| 142 } | 141 } |
| 143 | 142 |
| 144 float ScrollAnimator::clampScrollPosition(ScrollbarOrientation orientation, floa
t pos) | 143 float ScrollAnimator::clampScrollPosition(ScrollbarOrientation orientation, floa
t pos) |
| 145 { | 144 { |
| 146 float maxScrollPos = m_scrollableArea->maximumScrollPosition(orientation); | 145 float maxScrollPos = m_scrollableArea->maximumScrollPosition(orientation); |
| 147 float minScrollPos = m_scrollableArea->minimumScrollPosition(orientation); | 146 float minScrollPos = m_scrollableArea->minimumScrollPosition(orientation); |
| 148 return std::max(std::min(pos, maxScrollPos), minScrollPos); | 147 return std::max(std::min(pos, maxScrollPos), minScrollPos); |
| 149 } | 148 } |
| 150 | 149 |
| 151 } // namespace WebCore | 150 } // namespace WebCore |
| OLD | NEW |