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: Source/core/platform/ScrollableArea.h

Issue 14863002: Only update composited-scrolling state once after layout. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: updating expectations. Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/page/FrameView.cpp ('k') | Source/core/rendering/RenderLayer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 void setScrollOffsetFromInternals(const IntPoint&); 164 void setScrollOffsetFromInternals(const IntPoint&);
165 165
166 IntPoint clampScrollPosition(const IntPoint&) const; 166 IntPoint clampScrollPosition(const IntPoint&) const;
167 167
168 // Let subclasses provide a way of asking for and servicing scroll 168 // Let subclasses provide a way of asking for and servicing scroll
169 // animations. 169 // animations.
170 virtual bool scheduleAnimation() { return false; } 170 virtual bool scheduleAnimation() { return false; }
171 void serviceScrollAnimations(); 171 void serviceScrollAnimations();
172 172
173 virtual bool usesCompositedScrolling() const { return false; } 173 virtual bool usesCompositedScrolling() const { return false; }
174 virtual void updateNeedsCompositedScrolling() { }
174 175
175 virtual void reportMemoryUsage(MemoryObjectInfo*) const; 176 virtual void reportMemoryUsage(MemoryObjectInfo*) const;
176 177
177 // Convenience functions 178 // Convenience functions
178 int scrollPosition(ScrollbarOrientation orientation) { return orientation == HorizontalScrollbar ? scrollPosition().x() : scrollPosition().y(); } 179 int scrollPosition(ScrollbarOrientation orientation) { return orientation == HorizontalScrollbar ? scrollPosition().x() : scrollPosition().y(); }
179 int minimumScrollPosition(ScrollbarOrientation orientation) { return orienta tion == HorizontalScrollbar ? minimumScrollPosition().x() : minimumScrollPositio n().y(); } 180 int minimumScrollPosition(ScrollbarOrientation orientation) { return orienta tion == HorizontalScrollbar ? minimumScrollPosition().x() : minimumScrollPositio n().y(); }
180 int maximumScrollPosition(ScrollbarOrientation orientation) { return orienta tion == HorizontalScrollbar ? maximumScrollPosition().x() : maximumScrollPositio n().y(); } 181 int maximumScrollPosition(ScrollbarOrientation orientation) { return orienta tion == HorizontalScrollbar ? maximumScrollPosition().x() : maximumScrollPositio n().y(); }
181 int clampScrollPosition(ScrollbarOrientation orientation, int pos) { return std::max(std::min(pos, maximumScrollPosition(orientation)), minimumScrollPositi on(orientation)); } 182 int clampScrollPosition(ScrollbarOrientation orientation, int pos) { return std::max(std::min(pos, maximumScrollPosition(orientation)), minimumScrollPositi on(orientation)); }
182 183
183 protected: 184 protected:
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 // vertical-lr / ltr NO NO 236 // vertical-lr / ltr NO NO
236 // vertical-lr / rtl NO YES 237 // vertical-lr / rtl NO YES
237 // vertical-rl / ltr YES NO 238 // vertical-rl / ltr YES NO
238 // vertical-rl / rtl YES YES 239 // vertical-rl / rtl YES YES
239 IntPoint m_scrollOrigin; 240 IntPoint m_scrollOrigin;
240 }; 241 };
241 242
242 } // namespace WebCore 243 } // namespace WebCore
243 244
244 #endif // ScrollableArea_h 245 #endif // ScrollableArea_h
OLDNEW
« no previous file with comments | « Source/core/page/FrameView.cpp ('k') | Source/core/rendering/RenderLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698