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

Unified Diff: Source/platform/scroll/ScrollableArea.h

Issue 1215973002: Oilpan: improve ScrollableArea handling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review-induced improvements Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/scroll/ScrollAnimatorNone.cpp ('k') | Source/platform/scroll/ScrollableArea.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/scroll/ScrollableArea.h
diff --git a/Source/platform/scroll/ScrollableArea.h b/Source/platform/scroll/ScrollableArea.h
index 0c925c5fd79fd5d9e259b2a3687d0193a332ad7b..e1f8d3d2c7a3dc5c9f5b30fbff99b660edf42335 100644
--- a/Source/platform/scroll/ScrollableArea.h
+++ b/Source/platform/scroll/ScrollableArea.h
@@ -29,6 +29,7 @@
#include "platform/PlatformExport.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/geometry/DoublePoint.h"
+#include "platform/heap/Handle.h"
#include "platform/scroll/ScrollAnimator.h"
#include "platform/scroll/ScrollTypes.h"
#include "platform/scroll/Scrollbar.h"
@@ -57,7 +58,16 @@ enum IncludeScrollbarsInRect {
IncludeScrollbars,
};
+#if ENABLE(OILPAN)
+// Oilpan: Using the transition type WillBeGarbageCollectedMixin is
+// problematic non-Oilpan as the type expands to DummyBase, exporting it
+// also from 'platform' as a result. Bringing about duplicate DummyBases
+// as core also exports same; with component build linking fails as a
+// result. Hence the workaround of not using a transition type.
+class PLATFORM_EXPORT ScrollableArea : public GarbageCollectedMixin {
+#else
class PLATFORM_EXPORT ScrollableArea {
+#endif
WTF_MAKE_NONCOPYABLE(ScrollableArea);
public:
static int pixelsPerLineStep();
@@ -289,6 +299,11 @@ public:
// Subtracts space occupied by this ScrollableArea's scrollbars.
// Does nothing if overlay scrollbars are enabled.
IntSize excludeScrollbars(const IntSize&) const;
+
+ // Need to promptly let go of owned animator objects.
+ EAGERLY_FINALIZE();
+ DEFINE_INLINE_VIRTUAL_TRACE() { }
+
protected:
ScrollableArea();
@@ -300,6 +315,8 @@ protected:
friend class ProgrammaticScrollAnimator;
void scrollPositionChanged(const DoublePoint&, ScrollType);
+ void clearScrollAnimators();
+
private:
void programmaticScrollHelper(const DoublePoint&, ScrollBehavior);
void userScrollHelper(const DoublePoint&, ScrollBehavior);
@@ -327,7 +344,7 @@ private:
IntRect m_verticalBarDamage;
struct ScrollableAreaAnimators {
- RefPtr<ScrollAnimator> scrollAnimator;
+ OwnPtr<ScrollAnimator> scrollAnimator;
OwnPtr<ProgrammaticScrollAnimator> programmaticScrollAnimator;
};
« no previous file with comments | « Source/platform/scroll/ScrollAnimatorNone.cpp ('k') | Source/platform/scroll/ScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698