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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.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
Index: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
index 39eac7dd2eece7af896d726f85017b5fb2855743..d1dbb2c358809d9d3ad9edc53de629e98dcb24ab 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -471,13 +471,11 @@ void PaintLayerScrollableArea::UpdateScrollOffset(
frame_view->DidChangeScrollOffset();
}
- if (ScrollTypeClearsFragmentAnchor(scroll_type))
+ if (IsExplicitScrollType(scroll_type)) {
frame_view->ClearFragmentAnchor();
-
- // Clear the scroll anchor, unless it is the reason for this scroll.
- if (RuntimeEnabledFeatures::scrollAnchoringEnabled() &&
- scroll_type != kAnchoringScroll && scroll_type != kClampingScroll)
- GetScrollAnchor()->Clear();
+ if (RuntimeEnabledFeatures::scrollAnchoringEnabled())
+ GetScrollAnchor()->Clear();
+ }
}
IntSize PaintLayerScrollableArea::ScrollOffsetInt() const {
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/platform/scroll/ScrollTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698