| 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 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 { | 593 { |
| 594 // Hits in compositing/overflow/automatically-opt-into-composited-scroll
ing-after-style-change.html. | 594 // Hits in compositing/overflow/automatically-opt-into-composited-scroll
ing-after-style-change.html. |
| 595 DisableCompositingQueryAsserts disabler; | 595 DisableCompositingQueryAsserts disabler; |
| 596 | 596 |
| 597 // overflow:scroll should just enable/disable. | 597 // overflow:scroll should just enable/disable. |
| 598 if (box().style()->overflowX() == OSCROLL) | 598 if (box().style()->overflowX() == OSCROLL) |
| 599 horizontalScrollbar()->setEnabled(hasHorizontalOverflow); | 599 horizontalScrollbar()->setEnabled(hasHorizontalOverflow); |
| 600 if (box().style()->overflowY() == OSCROLL) | 600 if (box().style()->overflowY() == OSCROLL) |
| 601 verticalScrollbar()->setEnabled(hasVerticalOverflow); | 601 verticalScrollbar()->setEnabled(hasVerticalOverflow); |
| 602 } | 602 } |
| 603 | 603 if (hasOverlayScrollbars()) { |
| 604 if (!scrollSize(HorizontalScrollbar)) |
| 605 setHasHorizontalScrollbar(false); |
| 606 if (!scrollSize(VerticalScrollbar)) |
| 607 setHasVerticalScrollbar(false); |
| 608 } |
| 604 // overflow:auto may need to lay out again if scrollbars got added/removed. | 609 // overflow:auto may need to lay out again if scrollbars got added/removed. |
| 605 bool autoHorizontalScrollBarChanged = box().hasAutoHorizontalScrollbar() &&
(hasHorizontalScrollbar() != hasHorizontalOverflow); | 610 bool autoHorizontalScrollBarChanged = box().hasAutoHorizontalScrollbar() &&
(hasHorizontalScrollbar() != hasHorizontalOverflow); |
| 606 bool autoVerticalScrollBarChanged = box().hasAutoVerticalScrollbar() && (has
VerticalScrollbar() != hasVerticalOverflow); | 611 bool autoVerticalScrollBarChanged = box().hasAutoVerticalScrollbar() && (has
VerticalScrollbar() != hasVerticalOverflow); |
| 607 | 612 |
| 608 if (autoHorizontalScrollBarChanged || autoVerticalScrollBarChanged) { | 613 if (autoHorizontalScrollBarChanged || autoVerticalScrollBarChanged) { |
| 609 if (box().hasAutoHorizontalScrollbar()) | 614 if (box().hasAutoHorizontalScrollbar()) |
| 610 setHasHorizontalScrollbar(hasHorizontalOverflow); | 615 setHasHorizontalScrollbar(hasHorizontalOverflow); |
| 611 if (box().hasAutoVerticalScrollbar()) | 616 if (box().hasAutoVerticalScrollbar()) |
| 612 setHasVerticalScrollbar(hasVerticalOverflow); | 617 setHasVerticalScrollbar(hasVerticalOverflow); |
| 613 | 618 |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1470 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) | 1475 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) |
| 1471 { | 1476 { |
| 1472 // We only want to track the topmost scroll child for scrollable areas with | 1477 // We only want to track the topmost scroll child for scrollable areas with |
| 1473 // overlay scrollbars. | 1478 // overlay scrollbars. |
| 1474 if (!hasOverlayScrollbars()) | 1479 if (!hasOverlayScrollbars()) |
| 1475 return; | 1480 return; |
| 1476 m_nextTopmostScrollChild = scrollChild; | 1481 m_nextTopmostScrollChild = scrollChild; |
| 1477 } | 1482 } |
| 1478 | 1483 |
| 1479 } // namespace blink | 1484 } // namespace blink |
| OLD | NEW |