[ios] Only add HeaderInset for overscroll calculation if SmoothScrolling
If Smooth Scrolling is on, then the scrollview's origin is the same as the header's origin. Thus, |self.initialHeaderInset| is added to track the actual offset dragged by the user from the top of the page. When Smooth Scrolling is off, the scrollview's origin is the bottom left of the header, so adding that inset is unnecessary. Before refactoring fullscreen for MultiWindow, the ContentView's contentInset was set, but it is no longer needed and |self.initialHeaderInset| is the same value. Thus, not adding anything to contentOffsetFromTheTop is sufficient when Smooth Scrolling is off. Bug: 1128444 Change-Id: I5ada9f5cca5f8450572e0df6e689bd0f4cef47ba Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2446782Reviewed-by:Rohit Rao <rohitrao@chromium.org> Reviewed-by:
Robbie Gibson <rkgibson@google.com> Commit-Queue: Chris Lu <thegreenfrog@chromium.org> Cr-Commit-Position: refs/heads/master@{#818988}
Showing
Please register or sign in to comment