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

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: added WILL_BE_USING_PRE_FINALIZER 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 class CompositorAnimationTimeline; 45 class CompositorAnimationTimeline;
46 class ScrollableArea; 46 class ScrollableArea;
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() { }
56
57 // Computes a scroll destination for the given parameters. The returned 55 // Computes a scroll destination for the given parameters. The returned
58 // ScrollResultOneDimensional will have didScroll set to false if already at 56 // ScrollResultOneDimensional will have didScroll set to false if already at
59 // the destination. Otherwise, starts scrolling towards the destination and 57 // the destination. Otherwise, starts scrolling towards the destination and
60 // didScroll is true. Scrolling may be immediate or animated. The base 58 // didScroll is true. Scrolling may be immediate or animated. The base
61 // class implementation always scrolls immediately, never animates. 59 // class implementation always scrolls immediately, never animates.
62 virtual ScrollResultOneDimensional userScroll(ScrollbarOrientation, ScrollGr anularity, float step, float delta); 60 virtual ScrollResultOneDimensional userScroll(ScrollbarOrientation, ScrollGr anularity, float step, float delta);
63 61
64 virtual void scrollToOffsetWithoutAnimation(const FloatPoint&); 62 virtual void scrollToOffsetWithoutAnimation(const FloatPoint&);
65 63
66 #if OS(MACOSX) 64 #if OS(MACOSX)
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 float clampScrollPosition(ScrollbarOrientation, float) const; 119 float clampScrollPosition(ScrollbarOrientation, float) const;
122 120
123 RawPtrWillBeMember<ScrollableArea> m_scrollableArea; 121 RawPtrWillBeMember<ScrollableArea> m_scrollableArea;
124 float m_currentPosX; // We avoid using a FloatPoint in order to reduce 122 float m_currentPosX; // We avoid using a FloatPoint in order to reduce
125 float m_currentPosY; // subclass code complexity. 123 float m_currentPosY; // subclass code complexity.
126 }; 124 };
127 125
128 } // namespace blink 126 } // namespace blink
129 127
130 #endif // ScrollAnimatorBase_h 128 #endif // ScrollAnimatorBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698