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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2212543002: Disable scroll anchoring if the user engages in a drag motion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove irrelevant comment Created 4 years, 4 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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 826
827 if (shouldPerformScrollAnchoring()) 827 if (shouldPerformScrollAnchoring())
828 m_scrollAnchor.save(); 828 m_scrollAnchor.save();
829 } 829 }
830 830
831 bool FrameView::shouldPerformScrollAnchoring() const 831 bool FrameView::shouldPerformScrollAnchoring() const
832 { 832 {
833 return RuntimeEnabledFeatures::scrollAnchoringEnabled() 833 return RuntimeEnabledFeatures::scrollAnchoringEnabled()
834 && m_frame->settings() && !m_frame->settings()->rootLayerScrolls() 834 && m_frame->settings() && !m_frame->settings()->rootLayerScrolls()
835 && m_scrollAnchor.hasScroller() 835 && m_scrollAnchor.hasScroller()
836 && layoutBox()->style()->overflowAnchor() != AnchorNone; 836 && layoutBox()->style()->overflowAnchor() != AnchorNone
837 && !userMayHaveDragged();
837 } 838 }
838 839
839 static inline void layoutFromRootObject(LayoutObject& root) 840 static inline void layoutFromRootObject(LayoutObject& root)
840 { 841 {
841 LayoutState layoutState(root); 842 LayoutState layoutState(root);
842 root.layout(); 843 root.layout();
843 } 844 }
844 845
845 void FrameView::prepareLayoutAnalyzer() 846 void FrameView::prepareLayoutAnalyzer()
846 { 847 {
(...skipping 3436 matching lines...) Expand 10 before | Expand all | Expand 10 after
4283 } 4284 }
4284 4285
4285 bool FrameView::canThrottleRendering() const 4286 bool FrameView::canThrottleRendering() const
4286 { 4287 {
4287 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) 4288 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled())
4288 return false; 4289 return false;
4289 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); 4290 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling);
4290 } 4291 }
4291 4292
4292 } // namespace blink 4293 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698