Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 834 if (Scrollbar* verticalScrollbar = this->verticalScrollbar()) { | 834 if (Scrollbar* verticalScrollbar = this->verticalScrollbar()) { |
| 835 int clientHeight = box().pixelSnappedClientHeight(); | 835 int clientHeight = box().pixelSnappedClientHeight(); |
| 836 verticalScrollbar->setProportion(clientHeight, overflowRect().height()); | 836 verticalScrollbar->setProportion(clientHeight, overflowRect().height()); |
| 837 } | 837 } |
| 838 | 838 |
| 839 bool hasHorizontalOverflow = this->hasHorizontalOverflow(); | 839 bool hasHorizontalOverflow = this->hasHorizontalOverflow(); |
| 840 bool hasVerticalOverflow = this->hasVerticalOverflow(); | 840 bool hasVerticalOverflow = this->hasVerticalOverflow(); |
| 841 bool autoHorizontalScrollBarChanged = box().hasAutoHorizontalScrollbar() && (hasHorizontalScrollbar() != hasHorizontalOverflow); | 841 bool autoHorizontalScrollBarChanged = box().hasAutoHorizontalScrollbar() && (hasHorizontalScrollbar() != hasHorizontalOverflow); |
| 842 bool autoVerticalScrollBarChanged = box().hasAutoVerticalScrollbar() && (has VerticalScrollbar() != hasVerticalOverflow); | 842 bool autoVerticalScrollBarChanged = box().hasAutoVerticalScrollbar() && (has VerticalScrollbar() != hasVerticalOverflow); |
| 843 if (autoHorizontalScrollBarChanged || autoVerticalScrollBarChanged) | 843 if (autoHorizontalScrollBarChanged || autoVerticalScrollBarChanged) |
| 844 box().setNeedsLayoutAndFullPaintInvalidation(); | 844 box().setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::U nknown); |
|
esprehn
2015/03/23 20:19:44
OverflowChanged or better ScrollbarsChanged
| |
| 845 } | 845 } |
| 846 | 846 |
| 847 DoubleSize DeprecatedPaintLayerScrollableArea::clampScrollOffset(const DoubleSiz e& scrollOffset) const | 847 DoubleSize DeprecatedPaintLayerScrollableArea::clampScrollOffset(const DoubleSiz e& scrollOffset) const |
| 848 { | 848 { |
| 849 int maxX = scrollWidth() - box().pixelSnappedClientWidth(); | 849 int maxX = scrollWidth() - box().pixelSnappedClientWidth(); |
| 850 int maxY = scrollHeight() - box().pixelSnappedClientHeight(); | 850 int maxY = scrollHeight() - box().pixelSnappedClientHeight(); |
| 851 | 851 |
| 852 double x = std::max(std::min(scrollOffset.width(), static_cast<double>(maxX) ), 0.0); | 852 double x = std::max(std::min(scrollOffset.width(), static_cast<double>(maxX) ), 0.0); |
| 853 double y = std::max(std::min(scrollOffset.height(), static_cast<double>(maxY )), 0.0); | 853 double y = std::max(std::min(scrollOffset.height(), static_cast<double>(maxY )), 0.0); |
| 854 return DoubleSize(x, y); | 854 return DoubleSize(x, y); |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1386 void DeprecatedPaintLayerScrollableArea::setTopmostScrollChild(DeprecatedPaintLa yer* scrollChild) | 1386 void DeprecatedPaintLayerScrollableArea::setTopmostScrollChild(DeprecatedPaintLa yer* scrollChild) |
| 1387 { | 1387 { |
| 1388 // We only want to track the topmost scroll child for scrollable areas with | 1388 // We only want to track the topmost scroll child for scrollable areas with |
| 1389 // overlay scrollbars. | 1389 // overlay scrollbars. |
| 1390 if (!hasOverlayScrollbars()) | 1390 if (!hasOverlayScrollbars()) |
| 1391 return; | 1391 return; |
| 1392 m_nextTopmostScrollChild = scrollChild; | 1392 m_nextTopmostScrollChild = scrollChild; |
| 1393 } | 1393 } |
| 1394 | 1394 |
| 1395 } // namespace blink | 1395 } // namespace blink |
| OLD | NEW |