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

Side by Side Diff: Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp

Issue 1173053003: Remove ScrollableArea::notifyScrollPositionChanged and cleanup scroll animators. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase + remove updateScrollbars from FrameView::setScrollPosition Created 5 years, 6 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
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/platform/mac/ScrollAnimatorMac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 computeScrollDimensions(); 628 computeScrollDimensions();
629 629
630 // Layout may cause us to be at an invalid scroll position. In this case we need 630 // Layout may cause us to be at an invalid scroll position. In this case we need
631 // to pull our scroll offsets back to the max (or push them up to the min). 631 // to pull our scroll offsets back to the max (or push them up to the min).
632 DoubleSize clampedScrollOffset = clampScrollOffset(adjustedScrollOffset()); 632 DoubleSize clampedScrollOffset = clampScrollOffset(adjustedScrollOffset());
633 if (clampedScrollOffset != adjustedScrollOffset()) 633 if (clampedScrollOffset != adjustedScrollOffset())
634 scrollToOffset(clampedScrollOffset); 634 scrollToOffset(clampedScrollOffset);
635 635
636 if (originalScrollOffset != adjustedScrollOffset()) { 636 if (originalScrollOffset != adjustedScrollOffset()) {
637 DoublePoint origin(scrollOrigin()); 637 DoublePoint origin(scrollOrigin());
638 638 scrollPositionChanged(-origin + adjustedScrollOffset(), ProgrammaticScro ll);
639 // Call the base version here since calling this class' version will ear ly because the
640 // offset itself hasn't changed, the scroll origin has.
641 ScrollableArea::setScrollPosition(-origin + adjustedScrollOffset(), Prog rammaticScroll);
642 } 639 }
643 640
644 bool hasHorizontalOverflow = this->hasHorizontalOverflow(); 641 bool hasHorizontalOverflow = this->hasHorizontalOverflow();
645 bool hasVerticalOverflow = this->hasVerticalOverflow(); 642 bool hasVerticalOverflow = this->hasVerticalOverflow();
646 643
647 { 644 {
648 // Hits in compositing/overflow/automatically-opt-into-composited-scroll ing-after-style-change.html. 645 // Hits in compositing/overflow/automatically-opt-into-composited-scroll ing-after-style-change.html.
649 DisableCompositingQueryAsserts disabler; 646 DisableCompositingQueryAsserts disabler;
650 647
651 // overflow:scroll should just enable/disable. 648 // overflow:scroll should just enable/disable.
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
1394 void DeprecatedPaintLayerScrollableArea::setTopmostScrollChild(DeprecatedPaintLa yer* scrollChild) 1391 void DeprecatedPaintLayerScrollableArea::setTopmostScrollChild(DeprecatedPaintLa yer* scrollChild)
1395 { 1392 {
1396 // We only want to track the topmost scroll child for scrollable areas with 1393 // We only want to track the topmost scroll child for scrollable areas with
1397 // overlay scrollbars. 1394 // overlay scrollbars.
1398 if (!hasOverlayScrollbars()) 1395 if (!hasOverlayScrollbars())
1399 return; 1396 return;
1400 m_nextTopmostScrollChild = scrollChild; 1397 m_nextTopmostScrollChild = scrollChild;
1401 } 1398 }
1402 1399
1403 } // namespace blink 1400 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/platform/mac/ScrollAnimatorMac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698