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

Side by Side Diff: sky/engine/core/rendering/RenderLayerScrollableArea.cpp

Issue 840483004: Get rid of the *AndFullPaintInvalidation methods. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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) 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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 if (Scrollbar* verticalScrollbar = this->verticalScrollbar()) { 520 if (Scrollbar* verticalScrollbar = this->verticalScrollbar()) {
521 int clientHeight = box().pixelSnappedClientHeight(); 521 int clientHeight = box().pixelSnappedClientHeight();
522 verticalScrollbar->setProportion(clientHeight, overflowRect().height()); 522 verticalScrollbar->setProportion(clientHeight, overflowRect().height());
523 } 523 }
524 524
525 bool hasHorizontalOverflow = this->hasHorizontalOverflow(); 525 bool hasHorizontalOverflow = this->hasHorizontalOverflow();
526 bool hasVerticalOverflow = this->hasVerticalOverflow(); 526 bool hasVerticalOverflow = this->hasVerticalOverflow();
527 bool autoHorizontalScrollBarChanged = box().hasAutoHorizontalScrollbar() && (hasHorizontalScrollbar() != hasHorizontalOverflow); 527 bool autoHorizontalScrollBarChanged = box().hasAutoHorizontalScrollbar() && (hasHorizontalScrollbar() != hasHorizontalOverflow);
528 bool autoVerticalScrollBarChanged = box().hasAutoVerticalScrollbar() && (has VerticalScrollbar() != hasVerticalOverflow); 528 bool autoVerticalScrollBarChanged = box().hasAutoVerticalScrollbar() && (has VerticalScrollbar() != hasVerticalOverflow);
529 if (autoHorizontalScrollBarChanged || autoVerticalScrollBarChanged) 529 if (autoHorizontalScrollBarChanged || autoVerticalScrollBarChanged)
530 box().setNeedsLayoutAndFullPaintInvalidation(); 530 box().setNeedsLayout();
531 } 531 }
532 532
533 IntSize RenderLayerScrollableArea::clampScrollOffset(const IntSize& scrollOffset ) const 533 IntSize RenderLayerScrollableArea::clampScrollOffset(const IntSize& scrollOffset ) const
534 { 534 {
535 int maxX = scrollWidth() - box().pixelSnappedClientWidth(); 535 int maxX = scrollWidth() - box().pixelSnappedClientWidth();
536 int maxY = scrollHeight() - box().pixelSnappedClientHeight(); 536 int maxY = scrollHeight() - box().pixelSnappedClientHeight();
537 537
538 int x = std::max(std::min(scrollOffset.width(), maxX), 0); 538 int x = std::max(std::min(scrollOffset.width(), maxX), 0);
539 int y = std::max(std::min(scrollOffset.height(), maxY), 0); 539 int y = std::max(std::min(scrollOffset.height(), maxY), 0);
540 return IntSize(x, y); 540 return IntSize(x, y);
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) 755 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild)
756 { 756 {
757 // We only want to track the topmost scroll child for scrollable areas with 757 // We only want to track the topmost scroll child for scrollable areas with
758 // overlay scrollbars. 758 // overlay scrollbars.
759 if (!hasOverlayScrollbars()) 759 if (!hasOverlayScrollbars())
760 return; 760 return;
761 m_nextTopmostScrollChild = scrollChild; 761 m_nextTopmostScrollChild = scrollChild;
762 } 762 }
763 763
764 } // namespace blink 764 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderLayerModelObject.cpp ('k') | sky/engine/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698