| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008, 2011 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 | 257 |
| 258 // NOTE: Only called from the ScrollAnimator. | 258 // NOTE: Only called from the ScrollAnimator. |
| 259 friend class ScrollAnimator; | 259 friend class ScrollAnimator; |
| 260 void setScrollOffsetFromAnimation(const DoublePoint&); | 260 void setScrollOffsetFromAnimation(const DoublePoint&); |
| 261 | 261 |
| 262 // This function should be overriden by subclasses to perform the actual | 262 // This function should be overriden by subclasses to perform the actual |
| 263 // scroll of the content. By default the DoublePoint version will just | 263 // scroll of the content. By default the DoublePoint version will just |
| 264 // call into the IntPoint version. If fractional scroll is needed, one | 264 // call into the IntPoint version. If fractional scroll is needed, one |
| 265 // can override the DoublePoint version to take advantage of the double | 265 // can override the DoublePoint version to take advantage of the double |
| 266 // precision scroll offset. | 266 // precision scroll offset. |
| 267 // FIXME: Remove the IntPoint version. crbug.com/414283. | 267 // FIXME: Remove the IntPoint version. And change the function to |
| 268 // take DoubleSize. crbug.com/414283. |
| 268 virtual void setScrollOffset(const IntPoint&) = 0; | 269 virtual void setScrollOffset(const IntPoint&) = 0; |
| 269 virtual void setScrollOffset(const DoublePoint& offset) | 270 virtual void setScrollOffset(const DoublePoint& offset) |
| 270 { | 271 { |
| 271 setScrollOffset(flooredIntPoint(offset)); | 272 setScrollOffset(flooredIntPoint(offset)); |
| 272 } | 273 } |
| 273 | 274 |
| 274 virtual int lineStep(ScrollbarOrientation) const; | 275 virtual int lineStep(ScrollbarOrientation) const; |
| 275 virtual int pageStep(ScrollbarOrientation) const; | 276 virtual int pageStep(ScrollbarOrientation) const; |
| 276 virtual int documentStep(ScrollbarOrientation) const; | 277 virtual int documentStep(ScrollbarOrientation) const; |
| 277 virtual float pixelStep(ScrollbarOrientation) const; | 278 virtual float pixelStep(ScrollbarOrientation) const; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 307 // vertical-lr / ltr NO NO | 308 // vertical-lr / ltr NO NO |
| 308 // vertical-lr / rtl NO YES | 309 // vertical-lr / rtl NO YES |
| 309 // vertical-rl / ltr YES NO | 310 // vertical-rl / ltr YES NO |
| 310 // vertical-rl / rtl YES YES | 311 // vertical-rl / rtl YES YES |
| 311 IntPoint m_scrollOrigin; | 312 IntPoint m_scrollOrigin; |
| 312 }; | 313 }; |
| 313 | 314 |
| 314 } // namespace blink | 315 } // namespace blink |
| 315 | 316 |
| 316 #endif // ScrollableArea_h | 317 #endif // ScrollableArea_h |
| OLD | NEW |