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

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

Issue 1113973002: Remove FrameView::m_inProgrammaticScroll and related plumbing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 | « Source/core/frame/FrameView.h ('k') | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index e7578c6dbd3a526feb2e8d4e0b9308246525bf33..e9eafe84adcf322950a55a77e69a620a1742d3db 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -116,7 +116,6 @@ FrameView::FrameView(LocalFrame* frame)
, m_overflowStatusDirty(true)
, m_viewportLayoutObject(0)
, m_wasScrolledByUser(false)
- , m_inProgrammaticScroll(false)
, m_safeToPropagateScrollToParent(true)
, m_isTrackingPaintInvalidations(false)
, m_scrollCorner(nullptr)
@@ -916,9 +915,6 @@ void FrameView::layout()
// Protect the view from being deleted during layout (in recalcStyle)
RefPtrWillBeRawPtr<FrameView> protector(this);
- // Every scroll that happens during layout is programmatic.
- TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, true);
-
if (m_autoSizeInfo)
m_autoSizeInfo->autoSizeIfNeeded();
@@ -1517,7 +1513,6 @@ DoubleSize FrameView::scrollElementToRect(Element* element, const FloatRect& tar
void FrameView::setScrollPosition(const DoublePoint& scrollPoint, ScrollBehavior scrollBehavior)
{
cancelProgrammaticScrollAnimation();
- TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, true);
m_maintainScrollPositionAnchor = nullptr;
DoublePoint newScrollPosition = adjustScrollPositionWithinRange(scrollPoint);
@@ -1541,17 +1536,6 @@ void FrameView::setScrollPosition(const DoublePoint& scrollPoint, ScrollBehavior
}
}
-void FrameView::setScrollPositionNonProgrammatically(const IntPoint& scrollPoint)
-{
- IntPoint newScrollPosition = adjustScrollPositionWithinRange(scrollPoint);
-
- if (newScrollPosition == scrollPosition())
- return;
-
- TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, false);
- notifyScrollPositionChanged(newScrollPosition);
-}
-
void FrameView::setElasticOverscroll(const FloatSize& elasticOverscroll)
{
m_elasticOverscroll = elasticOverscroll;
@@ -1589,8 +1573,6 @@ void FrameView::setLayoutSize(const IntSize& size)
void FrameView::scrollPositionChanged()
{
- setWasScrolledByUser(true);
-
Document* document = m_frame->document();
document->enqueueScrollEventForNode(document);
@@ -2497,8 +2479,6 @@ bool FrameView::wasScrolledByUser() const
void FrameView::setWasScrolledByUser(bool wasScrolledByUser)
{
- if (m_inProgrammaticScroll)
- return;
m_maintainScrollPositionAnchor = nullptr;
m_wasScrolledByUser = wasScrolledByUser;
}
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698