Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1003)

Side by Side Diff: Source/platform/scroll/ScrollableArea.h

Issue 610423004: Preserve fractional scroll offset for JS scrolling API (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/platform/scroll/ScrollView.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 258
259 // NOTE: Only called from the ScrollAnimator. 259 // NOTE: Only called from the ScrollAnimator.
260 friend class ScrollAnimator; 260 friend class ScrollAnimator;
261 void setScrollOffsetFromAnimation(const DoublePoint&); 261 void setScrollOffsetFromAnimation(const DoublePoint&);
262 262
263 // This function should be overriden by subclasses to perform the actual 263 // This function should be overriden by subclasses to perform the actual
264 // scroll of the content. By default the DoublePoint version will just 264 // scroll of the content. By default the DoublePoint version will just
265 // call into the IntPoint version. If fractional scroll is needed, one 265 // call into the IntPoint version. If fractional scroll is needed, one
266 // can override the DoublePoint version to take advantage of the double 266 // can override the DoublePoint version to take advantage of the double
267 // precision scroll offset. 267 // precision scroll offset.
268 // FIXME: Remove the IntPoint version. crbug.com/414283. 268 // FIXME: Remove the IntPoint version. And change the function to
269 // take DoubleSize. crbug.com/414283.
269 virtual void setScrollOffset(const IntPoint&) = 0; 270 virtual void setScrollOffset(const IntPoint&) = 0;
270 virtual void setScrollOffset(const DoublePoint& offset) 271 virtual void setScrollOffset(const DoublePoint& offset)
271 { 272 {
272 setScrollOffset(flooredIntPoint(offset)); 273 setScrollOffset(flooredIntPoint(offset));
273 } 274 }
274 275
275 virtual int lineStep(ScrollbarOrientation) const; 276 virtual int lineStep(ScrollbarOrientation) const;
276 virtual int pageStep(ScrollbarOrientation) const; 277 virtual int pageStep(ScrollbarOrientation) const;
277 virtual int documentStep(ScrollbarOrientation) const; 278 virtual int documentStep(ScrollbarOrientation) const;
278 virtual float pixelStep(ScrollbarOrientation) const; 279 virtual float pixelStep(ScrollbarOrientation) const;
(...skipping 29 matching lines...) Expand all
308 // vertical-lr / ltr NO NO 309 // vertical-lr / ltr NO NO
309 // vertical-lr / rtl NO YES 310 // vertical-lr / rtl NO YES
310 // vertical-rl / ltr YES NO 311 // vertical-rl / ltr YES NO
311 // vertical-rl / rtl YES YES 312 // vertical-rl / rtl YES YES
312 IntPoint m_scrollOrigin; 313 IntPoint m_scrollOrigin;
313 }; 314 };
314 315
315 } // namespace blink 316 } // namespace blink
316 317
317 #endif // ScrollableArea_h 318 #endif // ScrollableArea_h
OLDNEW
« no previous file with comments | « Source/platform/scroll/ScrollView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698