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

Side by Side Diff: Source/core/rendering/RenderLayerScrollableArea.cpp

Issue 157553002: Remove the Pagination struct, clean up viewport scroll policy propagation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master Created 6 years, 10 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/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderView.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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 { 673 {
674 return overflow == OAUTO || overflow == OOVERLAY; 674 return overflow == OAUTO || overflow == OOVERLAY;
675 } 675 }
676 676
677 void RenderLayerScrollableArea::updateAfterStyleChange(const RenderStyle* oldSty le) 677 void RenderLayerScrollableArea::updateAfterStyleChange(const RenderStyle* oldSty le)
678 { 678 {
679 // List box parts handle the scrollbars by themselves so we have nothing to do. 679 // List box parts handle the scrollbars by themselves so we have nothing to do.
680 if (m_box->style()->appearance() == ListboxPart) 680 if (m_box->style()->appearance() == ListboxPart)
681 return; 681 return;
682 682
683 // RenderView shouldn't provide scrollbars on its own.
684 if (m_box->isRenderView())
685 return;
686
683 if (!m_scrollDimensionsDirty) 687 if (!m_scrollDimensionsDirty)
684 updateScrollableAreaSet(hasScrollableHorizontalOverflow() || hasScrollab leVerticalOverflow()); 688 updateScrollableAreaSet(hasScrollableHorizontalOverflow() || hasScrollab leVerticalOverflow());
685 689
686 EOverflow overflowX = m_box->style()->overflowX(); 690 EOverflow overflowX = m_box->style()->overflowX();
687 EOverflow overflowY = m_box->style()->overflowY(); 691 EOverflow overflowY = m_box->style()->overflowY();
688 692
689 // To avoid doing a relayout in updateScrollbarsAfterLayout, we try to keep any automatic scrollbar that was already present. 693 // To avoid doing a relayout in updateScrollbarsAfterLayout, we try to keep any automatic scrollbar that was already present.
690 bool needsHorizontalScrollbar = (hasHorizontalScrollbar() && overflowDefines AutomaticScrollbar(overflowX)) || overflowRequiresScrollbar(overflowX); 694 bool needsHorizontalScrollbar = (hasHorizontalScrollbar() && overflowDefines AutomaticScrollbar(overflowX)) || overflowRequiresScrollbar(overflowX);
691 bool needsVerticalScrollbar = (hasVerticalScrollbar() && overflowDefinesAuto maticScrollbar(overflowY)) || overflowRequiresScrollbar(overflowY); 695 bool needsVerticalScrollbar = (hasVerticalScrollbar() && overflowDefinesAuto maticScrollbar(overflowY)) || overflowRequiresScrollbar(overflowY);
692 setHasHorizontalScrollbar(needsHorizontalScrollbar); 696 setHasHorizontalScrollbar(needsHorizontalScrollbar);
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
1495 void RenderLayerScrollableArea::setForceNeedsCompositedScrolling(ForceNeedsCompo sitedScrollingMode mode) 1499 void RenderLayerScrollableArea::setForceNeedsCompositedScrolling(ForceNeedsCompo sitedScrollingMode mode)
1496 { 1500 {
1497 if (m_forceNeedsCompositedScrolling == mode) 1501 if (m_forceNeedsCompositedScrolling == mode)
1498 return; 1502 return;
1499 1503
1500 m_forceNeedsCompositedScrolling = mode; 1504 m_forceNeedsCompositedScrolling = mode;
1501 layer()->didUpdateNeedsCompositedScrolling(); 1505 layer()->didUpdateNeedsCompositedScrolling();
1502 } 1506 }
1503 1507
1504 } // Namespace WebCore 1508 } // Namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698