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

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

Issue 1774943003: blink: Rename platform/ methods to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-platform: rebase-yayyyyyyyy Created 4 years, 9 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 static int pixelsPerLineStep(HostWindow*); 77 static int pixelsPerLineStep(HostWindow*);
78 static float minFractionToStepWhenPaging(); 78 static float minFractionToStepWhenPaging();
79 static int maxOverlapBetweenPages(); 79 static int maxOverlapBetweenPages();
80 80
81 // Convert a non-finite scroll value (Infinity, -Infinity, NaN) to 0 as 81 // 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. 82 // 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; } 83 static double normalizeNonFiniteScroll(double value) { return std::isfinite( value) ? value : 0.0; }
84 84
85 // The window that hosts the ScrollableArea. The ScrollableArea will communi cate scrolls and repaints to the 85 // The window that hosts the ScrollableArea. The ScrollableArea will communi cate scrolls and repaints to the
86 // host window in the window's coordinate space. 86 // host window in the window's coordinate space.
87 virtual HostWindow* hostWindow() const { return 0; } 87 virtual HostWindow* getHostWindow() const { return 0; }
88 88
89 virtual ScrollResult userScroll(ScrollGranularity, const FloatSize&); 89 virtual ScrollResult userScroll(ScrollGranularity, const FloatSize&);
90 90
91 virtual void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavio r = ScrollBehaviorInstant); 91 virtual void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavio r = ScrollBehaviorInstant);
92 virtual void scrollBy(const DoubleSize&, ScrollType, ScrollBehavior = Scroll BehaviorInstant); 92 virtual void scrollBy(const DoubleSize&, ScrollType, ScrollBehavior = Scroll BehaviorInstant);
93 void setScrollPositionSingleAxis(ScrollbarOrientation, double, ScrollType, S crollBehavior = ScrollBehaviorInstant); 93 void setScrollPositionSingleAxis(ScrollbarOrientation, double, ScrollType, S crollBehavior = ScrollBehaviorInstant);
94 94
95 // Scrolls the area so that the given rect, given in the document's content coordinates, such that it's 95 // Scrolls the area so that the given rect, given in the document's content coordinates, such that it's
96 // visible in the area. Returns the new location of the input rect relative once again to the document. 96 // visible in the area. Returns the new location of the input rect relative once again to the document.
97 // Note, in the case of a Document container, such as FrameView, the output will always be the input rect 97 // Note, in the case of a Document container, such as FrameView, the output will always be the input rect
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 // that programmatic scrolls (i.e. setScrollPosition) are disabled when in 266 // that programmatic scrolls (i.e. setScrollPosition) are disabled when in
267 // updateScrollbars. Expose this here to allow RootFrameViewport to match th e 267 // updateScrollbars. Expose this here to allow RootFrameViewport to match th e
268 // semantics for now but it should be cleaned up at the source. 268 // semantics for now but it should be cleaned up at the source.
269 virtual bool isProgrammaticallyScrollable() { return true; } 269 virtual bool isProgrammaticallyScrollable() { return true; }
270 270
271 // Subtracts space occupied by this ScrollableArea's scrollbars. 271 // Subtracts space occupied by this ScrollableArea's scrollbars.
272 // Does nothing if overlay scrollbars are enabled. 272 // Does nothing if overlay scrollbars are enabled.
273 IntSize excludeScrollbars(const IntSize&) const; 273 IntSize excludeScrollbars(const IntSize&) const;
274 274
275 // Returns the widget associated with this ScrollableArea. 275 // Returns the widget associated with this ScrollableArea.
276 virtual Widget* widget() { return nullptr; } 276 virtual Widget* getWidget() { return nullptr; }
277 277
278 virtual bool isFrameView() const { return false; } 278 virtual bool isFrameView() const { return false; }
279 virtual bool isPaintLayerScrollableArea() const { return false; } 279 virtual bool isPaintLayerScrollableArea() const { return false; }
280 280
281 // Need to promptly let go of owned animator objects. 281 // Need to promptly let go of owned animator objects.
282 EAGERLY_FINALIZE(); 282 EAGERLY_FINALIZE();
283 DECLARE_VIRTUAL_TRACE(); 283 DECLARE_VIRTUAL_TRACE();
284 284
285 virtual void clearScrollAnimators(); 285 virtual void clearScrollAnimators();
286 286
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 // vertical-lr / ltr NO NO 341 // vertical-lr / ltr NO NO
342 // vertical-lr / rtl NO YES 342 // vertical-lr / rtl NO YES
343 // vertical-rl / ltr YES NO 343 // vertical-rl / ltr YES NO
344 // vertical-rl / rtl YES YES 344 // vertical-rl / rtl YES YES
345 IntPoint m_scrollOrigin; 345 IntPoint m_scrollOrigin;
346 }; 346 };
347 347
348 } // namespace blink 348 } // namespace blink
349 349
350 #endif // ScrollableArea_h 350 #endif // ScrollableArea_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698