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

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

Issue 1921553008: Fix scroll origin, overflow rects, and coordinate flipping for flexbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Add docs to Source/core/layout/README.md Created 4 years, 7 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 ScrollAnimatorBase& scrollAnimator() const; 121 ScrollAnimatorBase& scrollAnimator() const;
122 122
123 // 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.
124 ScrollAnimatorBase* existingScrollAnimator() const { return m_scrollAnimator ; } 124 ScrollAnimatorBase* existingScrollAnimator() const { return m_scrollAnimator ; }
125 125
126 ProgrammaticScrollAnimator& programmaticScrollAnimator() const; 126 ProgrammaticScrollAnimator& programmaticScrollAnimator() const;
127 ProgrammaticScrollAnimator* existingProgrammaticScrollAnimator() const { ret urn m_programmaticScrollAnimator; } 127 ProgrammaticScrollAnimator* existingProgrammaticScrollAnimator() const { ret urn m_programmaticScrollAnimator; }
128 128
129 virtual CompositorAnimationTimeline* compositorAnimationTimeline() const { r eturn nullptr; } 129 virtual CompositorAnimationTimeline* compositorAnimationTimeline() const { r eturn nullptr; }
130 130
131 // See Source/core/layout/README.md for an explanation of scroll origin.
131 const IntPoint& scrollOrigin() const { return m_scrollOrigin; } 132 const IntPoint& scrollOrigin() const { return m_scrollOrigin; }
132 bool scrollOriginChanged() const { return m_scrollOriginChanged; } 133 bool scrollOriginChanged() const { return m_scrollOriginChanged; }
133 134
134 135
135 // This is used to determine whether the incoming fractional scroll offset s hould 136 // This is used to determine whether the incoming fractional scroll offset s hould
136 // be truncated to integer. Current rule is that if preferCompositingToLCDTe xtEnabled() 137 // be truncated to integer. Current rule is that if preferCompositingToLCDTe xtEnabled()
137 // is disabled (which is true on low-dpi device by default) we should do the truncation. 138 // is disabled (which is true on low-dpi device by default) we should do the truncation.
138 // The justification is that non-composited elements using fractional scroll offsets 139 // The justification is that non-composited elements using fractional scroll offsets
139 // is causing too much nasty bugs but does not add too benefit on low-dpi de vices. 140 // is causing too much nasty bugs but does not add too benefit on low-dpi de vices.
140 virtual bool shouldUseIntegerScrollOffset() const { return !RuntimeEnabledFe atures::fractionalScrollOffsetsEnabled(); } 141 virtual bool shouldUseIntegerScrollOffset() const { return !RuntimeEnabledFe atures::fractionalScrollOffsetsEnabled(); }
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 // vertical-lr / ltr NO NO 337 // vertical-lr / ltr NO NO
337 // vertical-lr / rtl NO YES 338 // vertical-lr / rtl NO YES
338 // vertical-rl / ltr YES NO 339 // vertical-rl / ltr YES NO
339 // vertical-rl / rtl YES YES 340 // vertical-rl / rtl YES YES
340 IntPoint m_scrollOrigin; 341 IntPoint m_scrollOrigin;
341 }; 342 };
342 343
343 } // namespace blink 344 } // namespace blink
344 345
345 #endif // ScrollableArea_h 346 #endif // ScrollableArea_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698