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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2841763002: Rename ScrollType helper and combine some redundant checks. (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 68b5d040d936faed827d6e8abf8733ed7627ef41..e41edc420a9a91faa21a6bc6fb62b7d55dd24940 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -4110,8 +4110,6 @@ void FrameView::UpdateScrollOffset(const ScrollOffset& offset,
if (!ScrollbarsSuppressed())
pending_scroll_delta_ += scroll_delta;
- if (ScrollTypeClearsFragmentAnchor(scroll_type))
- ClearFragmentAnchor();
UpdateLayersAndCompositingAfterScrollIfNeeded();
Document* document = frame_->GetDocument();
@@ -4145,8 +4143,10 @@ void FrameView::UpdateScrollOffset(const ScrollOffset& offset,
document_loader->GetInitialScrollState().was_scrolled_by_user = true;
}
- if (scroll_type != kAnchoringScroll && scroll_type != kClampingScroll)
+ if (IsExplicitScrollType(scroll_type)) {
+ ClearFragmentAnchor();
ClearScrollAnchor();
+ }
}
void FrameView::DidChangeScrollOffset() {
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698