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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 if (Scrollbar* horizontalScrollbar = this->horizontalScrollbar()) { | 643 if (Scrollbar* horizontalScrollbar = this->horizontalScrollbar()) { |
644 int clientWidth = box().pixelSnappedClientWidth(); | 644 int clientWidth = box().pixelSnappedClientWidth(); |
645 horizontalScrollbar->setProportion(clientWidth, overflowRect().width
()); | 645 horizontalScrollbar->setProportion(clientWidth, overflowRect().width
()); |
646 } | 646 } |
647 if (Scrollbar* verticalScrollbar = this->verticalScrollbar()) { | 647 if (Scrollbar* verticalScrollbar = this->verticalScrollbar()) { |
648 int clientHeight = box().pixelSnappedClientHeight(); | 648 int clientHeight = box().pixelSnappedClientHeight(); |
649 verticalScrollbar->setProportion(clientHeight, overflowRect().height
()); | 649 verticalScrollbar->setProportion(clientHeight, overflowRect().height
()); |
650 } | 650 } |
651 } | 651 } |
652 | 652 |
653 updateScrollableAreaSet(hasScrollableHorizontalOverflow() || hasScrollableVe
rticalOverflow()); | 653 bool hasOverflow = hasScrollableHorizontalOverflow() || hasScrollableVertica
lOverflow(); |
| 654 updateScrollableAreaSet(hasOverflow); |
| 655 |
| 656 if (hasOverflow) { |
| 657 DisableCompositingQueryAsserts disabler; |
| 658 positionOverflowControls(IntSize()); |
| 659 } |
654 } | 660 } |
655 | 661 |
656 bool RenderLayerScrollableArea::hasHorizontalOverflow() const | 662 bool RenderLayerScrollableArea::hasHorizontalOverflow() const |
657 { | 663 { |
658 ASSERT(!m_scrollDimensionsDirty); | 664 ASSERT(!m_scrollDimensionsDirty); |
659 | 665 |
660 return pixelSnappedScrollWidth() > box().pixelSnappedClientWidth(); | 666 return pixelSnappedScrollWidth() > box().pixelSnappedClientWidth(); |
661 } | 667 } |
662 | 668 |
663 bool RenderLayerScrollableArea::hasVerticalOverflow() const | 669 bool RenderLayerScrollableArea::hasVerticalOverflow() const |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1451 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) | 1457 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) |
1452 { | 1458 { |
1453 // We only want to track the topmost scroll child for scrollable areas with | 1459 // We only want to track the topmost scroll child for scrollable areas with |
1454 // overlay scrollbars. | 1460 // overlay scrollbars. |
1455 if (!hasOverlayScrollbars()) | 1461 if (!hasOverlayScrollbars()) |
1456 return; | 1462 return; |
1457 m_nextTopmostScrollChild = scrollChild; | 1463 m_nextTopmostScrollChild = scrollChild; |
1458 } | 1464 } |
1459 | 1465 |
1460 } // namespace blink | 1466 } // namespace blink |
OLD | NEW |