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

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

Issue 280633002: Rename RenderObject::setNeedsLayout to setNeedsLayoutAndFullRepaint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 7 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 | Annotate | Revision Log
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 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 if (Scrollbar* verticalScrollbar = this->verticalScrollbar()) { 802 if (Scrollbar* verticalScrollbar = this->verticalScrollbar()) {
803 int clientHeight = box().pixelSnappedClientHeight(); 803 int clientHeight = box().pixelSnappedClientHeight();
804 verticalScrollbar->setProportion(clientHeight, overflowRect().height()); 804 verticalScrollbar->setProportion(clientHeight, overflowRect().height());
805 } 805 }
806 806
807 bool hasHorizontalOverflow = this->hasHorizontalOverflow(); 807 bool hasHorizontalOverflow = this->hasHorizontalOverflow();
808 bool hasVerticalOverflow = this->hasVerticalOverflow(); 808 bool hasVerticalOverflow = this->hasVerticalOverflow();
809 bool autoHorizontalScrollBarChanged = box().hasAutoHorizontalScrollbar() && (hasHorizontalScrollbar() != hasHorizontalOverflow); 809 bool autoHorizontalScrollBarChanged = box().hasAutoHorizontalScrollbar() && (hasHorizontalScrollbar() != hasHorizontalOverflow);
810 bool autoVerticalScrollBarChanged = box().hasAutoVerticalScrollbar() && (has VerticalScrollbar() != hasVerticalOverflow); 810 bool autoVerticalScrollBarChanged = box().hasAutoVerticalScrollbar() && (has VerticalScrollbar() != hasVerticalOverflow);
811 if (autoHorizontalScrollBarChanged || autoVerticalScrollBarChanged) 811 if (autoHorizontalScrollBarChanged || autoVerticalScrollBarChanged)
812 box().setNeedsLayout(); 812 box().setNeedsLayoutAndFullRepaint();
813 } 813 }
814 814
815 IntSize RenderLayerScrollableArea::clampScrollOffset(const IntSize& scrollOffset ) const 815 IntSize RenderLayerScrollableArea::clampScrollOffset(const IntSize& scrollOffset ) const
816 { 816 {
817 int maxX = scrollWidth() - box().pixelSnappedClientWidth(); 817 int maxX = scrollWidth() - box().pixelSnappedClientWidth();
818 int maxY = scrollHeight() - box().pixelSnappedClientHeight(); 818 int maxY = scrollHeight() - box().pixelSnappedClientHeight();
819 819
820 int x = std::max(std::min(scrollOffset.width(), maxX), 0); 820 int x = std::max(std::min(scrollOffset.width(), maxX), 0);
821 int y = std::max(std::min(scrollOffset.height(), maxY), 0); 821 int y = std::max(std::min(scrollOffset.height(), maxY), 0);
822 return IntSize(x, y); 822 return IntSize(x, y);
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 DisableCompositingQueryAsserts disabler; 1509 DisableCompositingQueryAsserts disabler;
1510 return box().hasCompositedLayerMapping() && box().compositedLayerMapping()-> scrollingLayer(); 1510 return box().hasCompositedLayerMapping() && box().compositedLayerMapping()-> scrollingLayer();
1511 } 1511 }
1512 1512
1513 bool RenderLayerScrollableArea::needsCompositedScrolling() const 1513 bool RenderLayerScrollableArea::needsCompositedScrolling() const
1514 { 1514 {
1515 return scrollsOverflow() && box().view()->compositor()->acceleratedCompositi ngForOverflowScrollEnabled(); 1515 return scrollsOverflow() && box().view()->compositor()->acceleratedCompositi ngForOverflowScrollEnabled();
1516 } 1516 }
1517 1517
1518 } // Namespace WebCore 1518 } // Namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayerModelObject.cpp ('k') | Source/core/rendering/RenderListBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698