| 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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 { | 609 { |
| 610 // Hits in compositing/overflow/automatically-opt-into-composited-scroll
ing-after-style-change.html. | 610 // Hits in compositing/overflow/automatically-opt-into-composited-scroll
ing-after-style-change.html. |
| 611 DisableCompositingQueryAsserts disabler; | 611 DisableCompositingQueryAsserts disabler; |
| 612 | 612 |
| 613 // overflow:scroll should just enable/disable. | 613 // overflow:scroll should just enable/disable. |
| 614 if (box().style()->overflowX() == OSCROLL) | 614 if (box().style()->overflowX() == OSCROLL) |
| 615 horizontalScrollbar()->setEnabled(hasHorizontalOverflow); | 615 horizontalScrollbar()->setEnabled(hasHorizontalOverflow); |
| 616 if (box().style()->overflowY() == OSCROLL) | 616 if (box().style()->overflowY() == OSCROLL) |
| 617 verticalScrollbar()->setEnabled(hasVerticalOverflow); | 617 verticalScrollbar()->setEnabled(hasVerticalOverflow); |
| 618 } | 618 } |
| 619 if (hasOverlayScrollbars()) { | 619 |
| 620 if (!scrollSize(HorizontalScrollbar)) | |
| 621 setHasHorizontalScrollbar(false); | |
| 622 if (!scrollSize(VerticalScrollbar)) | |
| 623 setHasVerticalScrollbar(false); | |
| 624 } | |
| 625 // overflow:auto may need to lay out again if scrollbars got added/removed. | 620 // overflow:auto may need to lay out again if scrollbars got added/removed. |
| 626 bool autoHorizontalScrollBarChanged = box().hasAutoHorizontalScrollbar() &&
(hasHorizontalScrollbar() != hasHorizontalOverflow); | 621 bool autoHorizontalScrollBarChanged = box().hasAutoHorizontalScrollbar() &&
(hasHorizontalScrollbar() != hasHorizontalOverflow); |
| 627 bool autoVerticalScrollBarChanged = box().hasAutoVerticalScrollbar() && (has
VerticalScrollbar() != hasVerticalOverflow); | 622 bool autoVerticalScrollBarChanged = box().hasAutoVerticalScrollbar() && (has
VerticalScrollbar() != hasVerticalOverflow); |
| 628 | 623 |
| 629 if (autoHorizontalScrollBarChanged || autoVerticalScrollBarChanged) { | 624 if (autoHorizontalScrollBarChanged || autoVerticalScrollBarChanged) { |
| 630 if (box().hasAutoHorizontalScrollbar()) | 625 if (box().hasAutoHorizontalScrollbar()) |
| 631 setHasHorizontalScrollbar(hasHorizontalOverflow); | 626 setHasHorizontalScrollbar(hasHorizontalOverflow); |
| 632 if (box().hasAutoVerticalScrollbar()) | 627 if (box().hasAutoVerticalScrollbar()) |
| 633 setHasVerticalScrollbar(hasVerticalOverflow); | 628 setHasVerticalScrollbar(hasVerticalOverflow); |
| 634 | 629 |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1491 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) | 1486 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) |
| 1492 { | 1487 { |
| 1493 // We only want to track the topmost scroll child for scrollable areas with | 1488 // We only want to track the topmost scroll child for scrollable areas with |
| 1494 // overlay scrollbars. | 1489 // overlay scrollbars. |
| 1495 if (!hasOverlayScrollbars()) | 1490 if (!hasOverlayScrollbars()) |
| 1496 return; | 1491 return; |
| 1497 m_nextTopmostScrollChild = scrollChild; | 1492 m_nextTopmostScrollChild = scrollChild; |
| 1498 } | 1493 } |
| 1499 | 1494 |
| 1500 } // namespace blink | 1495 } // namespace blink |
| OLD | NEW |