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

Side by Side Diff: third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.h

Issue 1714663002: Attempt to fix the crash in blink Scroll Animator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review feedback Created 4 years, 10 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
OLDNEW
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 class Scrollbar; 47 class Scrollbar;
48 48
49 class PLATFORM_EXPORT ScrollAnimatorBase : public ScrollAnimatorCompositorCoordi nator { 49 class PLATFORM_EXPORT ScrollAnimatorBase : public ScrollAnimatorCompositorCoordi nator {
50 public: 50 public:
51 static PassOwnPtrWillBeRawPtr<ScrollAnimatorBase> create(ScrollableArea*); 51 static PassOwnPtrWillBeRawPtr<ScrollAnimatorBase> create(ScrollableArea*);
52 52
53 virtual ~ScrollAnimatorBase(); 53 virtual ~ScrollAnimatorBase();
54 54
55 virtual void dispose() { } 55 virtual void dispose() { }
56 56
57 virtual void clearScrollAnimator() { return ScrollAnimatorCompositorCoordina tor::dispose(); }
58
57 // Computes a scroll destination for the given parameters. The returned 59 // Computes a scroll destination for the given parameters. The returned
58 // ScrollResultOneDimensional will have didScroll set to false if already at 60 // ScrollResultOneDimensional will have didScroll set to false if already at
59 // the destination. Otherwise, starts scrolling towards the destination and 61 // the destination. Otherwise, starts scrolling towards the destination and
60 // didScroll is true. Scrolling may be immediate or animated. The base 62 // didScroll is true. Scrolling may be immediate or animated. The base
61 // class implementation always scrolls immediately, never animates. 63 // class implementation always scrolls immediately, never animates.
62 virtual ScrollResultOneDimensional userScroll(ScrollbarOrientation, ScrollGr anularity, float step, float delta); 64 virtual ScrollResultOneDimensional userScroll(ScrollbarOrientation, ScrollGr anularity, float step, float delta);
63 65
64 virtual void scrollToOffsetWithoutAnimation(const FloatPoint&); 66 virtual void scrollToOffsetWithoutAnimation(const FloatPoint&);
65 67
66 #if OS(MACOSX) 68 #if OS(MACOSX)
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 float clampScrollPosition(ScrollbarOrientation, float) const; 123 float clampScrollPosition(ScrollbarOrientation, float) const;
122 124
123 RawPtrWillBeMember<ScrollableArea> m_scrollableArea; 125 RawPtrWillBeMember<ScrollableArea> m_scrollableArea;
124 float m_currentPosX; // We avoid using a FloatPoint in order to reduce 126 float m_currentPosX; // We avoid using a FloatPoint in order to reduce
125 float m_currentPosY; // subclass code complexity. 127 float m_currentPosY; // subclass code complexity.
126 }; 128 };
127 129
128 } // namespace blink 130 } // namespace blink
129 131
130 #endif // ScrollAnimatorBase_h 132 #endif // ScrollAnimatorBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698