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

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

Issue 1860903002: Update Source/platform/ to assume Oilpan only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: back out ScrollAnimatorMac() accidental change Created 4 years, 8 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) 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 ScrollBehaviorAuto, 55 ScrollBehaviorAuto,
56 ScrollBehaviorInstant, 56 ScrollBehaviorInstant,
57 ScrollBehaviorSmooth, 57 ScrollBehaviorSmooth,
58 }; 58 };
59 59
60 enum IncludeScrollbarsInRect { 60 enum IncludeScrollbarsInRect {
61 ExcludeScrollbars, 61 ExcludeScrollbars,
62 IncludeScrollbars, 62 IncludeScrollbars,
63 }; 63 };
64 64
65 #if ENABLE(OILPAN)
66 // Oilpan: Using the transition type GarbageCollectedMixin is
67 // problematic non-Oilpan as the type expands to DummyBase, exporting it
68 // also from 'platform' as a result. Bringing about duplicate DummyBases
69 // as core also exports same; with component build linking fails as a
70 // result. Hence the workaround of not using a transition type.
71 class PLATFORM_EXPORT ScrollableArea : public GarbageCollectedMixin { 65 class PLATFORM_EXPORT ScrollableArea : public GarbageCollectedMixin {
72 #else
73 class PLATFORM_EXPORT ScrollableArea {
74 #endif
75 WTF_MAKE_NONCOPYABLE(ScrollableArea); 66 WTF_MAKE_NONCOPYABLE(ScrollableArea);
76 public: 67 public:
77 static int pixelsPerLineStep(HostWindow*); 68 static int pixelsPerLineStep(HostWindow*);
78 static float minFractionToStepWhenPaging(); 69 static float minFractionToStepWhenPaging();
79 static int maxOverlapBetweenPages(); 70 static int maxOverlapBetweenPages();
80 71
81 // Convert a non-finite scroll value (Infinity, -Infinity, NaN) to 0 as 72 // Convert a non-finite scroll value (Infinity, -Infinity, NaN) to 0 as
82 // per http://dev.w3.org/csswg/cssom-view/#normalize-non_finite-values. 73 // per http://dev.w3.org/csswg/cssom-view/#normalize-non_finite-values.
83 static double normalizeNonFiniteScroll(double value) { return std::isfinite( value) ? value : 0.0; } 74 static double normalizeNonFiniteScroll(double value) { return std::isfinite( value) ? value : 0.0; }
84 75
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 114
124 bool hasOverlayScrollbars() const; 115 bool hasOverlayScrollbars() const;
125 void setScrollbarOverlayStyle(ScrollbarOverlayStyle); 116 void setScrollbarOverlayStyle(ScrollbarOverlayStyle);
126 void recalculateScrollbarOverlayStyle(Color); 117 void recalculateScrollbarOverlayStyle(Color);
127 ScrollbarOverlayStyle getScrollbarOverlayStyle() const { return static_cast< ScrollbarOverlayStyle>(m_scrollbarOverlayStyle); } 118 ScrollbarOverlayStyle getScrollbarOverlayStyle() const { return static_cast< ScrollbarOverlayStyle>(m_scrollbarOverlayStyle); }
128 119
129 // This getter will create a ScrollAnimatorBase if it doesn't already exist. 120 // This getter will create a ScrollAnimatorBase if it doesn't already exist.
130 ScrollAnimatorBase& scrollAnimator() const; 121 ScrollAnimatorBase& scrollAnimator() const;
131 122
132 // This getter will return null if the ScrollAnimatorBase hasn't been create d yet. 123 // This getter will return null if the ScrollAnimatorBase hasn't been create d yet.
133 ScrollAnimatorBase* existingScrollAnimator() const { return m_scrollAnimator .get(); } 124 ScrollAnimatorBase* existingScrollAnimator() const { return m_scrollAnimator ; }
134 125
135 ProgrammaticScrollAnimator& programmaticScrollAnimator() const; 126 ProgrammaticScrollAnimator& programmaticScrollAnimator() const;
136 ProgrammaticScrollAnimator* existingProgrammaticScrollAnimator() const { ret urn m_programmaticScrollAnimator.get(); } 127 ProgrammaticScrollAnimator* existingProgrammaticScrollAnimator() const { ret urn m_programmaticScrollAnimator; }
137 128
138 virtual CompositorAnimationTimeline* compositorAnimationTimeline() const { r eturn nullptr; } 129 virtual CompositorAnimationTimeline* compositorAnimationTimeline() const { r eturn nullptr; }
139 130
140 const IntPoint& scrollOrigin() const { return m_scrollOrigin; } 131 const IntPoint& scrollOrigin() const { return m_scrollOrigin; }
141 bool scrollOriginChanged() const { return m_scrollOriginChanged; } 132 bool scrollOriginChanged() const { return m_scrollOriginChanged; }
142 133
143 134
144 // This is used to determine whether the incoming fractional scroll offset s hould 135 // This is used to determine whether the incoming fractional scroll offset s hould
145 // be truncated to integer. Current rule is that if preferCompositingToLCDTe xtEnabled() 136 // be truncated to integer. Current rule is that if preferCompositingToLCDTe xtEnabled()
146 // is disabled (which is true on low-dpi device by default) we should do the truncation. 137 // is disabled (which is true on low-dpi device by default) we should do the truncation.
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 // vertical-lr / ltr NO NO 336 // vertical-lr / ltr NO NO
346 // vertical-lr / rtl NO YES 337 // vertical-lr / rtl NO YES
347 // vertical-rl / ltr YES NO 338 // vertical-rl / ltr YES NO
348 // vertical-rl / rtl YES YES 339 // vertical-rl / rtl YES YES
349 IntPoint m_scrollOrigin; 340 IntPoint m_scrollOrigin;
350 }; 341 };
351 342
352 } // namespace blink 343 } // namespace blink
353 344
354 #endif // ScrollableArea_h 345 #endif // ScrollableArea_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698