| 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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 { | 673 { |
| 674 return overflow == OAUTO || overflow == OOVERLAY; | 674 return overflow == OAUTO || overflow == OOVERLAY; |
| 675 } | 675 } |
| 676 | 676 |
| 677 void RenderLayerScrollableArea::updateAfterStyleChange(const RenderStyle* oldSty
le) | 677 void RenderLayerScrollableArea::updateAfterStyleChange(const RenderStyle* oldSty
le) |
| 678 { | 678 { |
| 679 // List box parts handle the scrollbars by themselves so we have nothing to
do. | 679 // List box parts handle the scrollbars by themselves so we have nothing to
do. |
| 680 if (m_box->style()->appearance() == ListboxPart) | 680 if (m_box->style()->appearance() == ListboxPart) |
| 681 return; | 681 return; |
| 682 | 682 |
| 683 // RenderView shouldn't provide scrollbars on its own. |
| 684 if (m_box->isRenderView()) |
| 685 return; |
| 686 |
| 683 if (!m_scrollDimensionsDirty) | 687 if (!m_scrollDimensionsDirty) |
| 684 updateScrollableAreaSet(hasScrollableHorizontalOverflow() || hasScrollab
leVerticalOverflow()); | 688 updateScrollableAreaSet(hasScrollableHorizontalOverflow() || hasScrollab
leVerticalOverflow()); |
| 685 | 689 |
| 686 EOverflow overflowX = m_box->style()->overflowX(); | 690 EOverflow overflowX = m_box->style()->overflowX(); |
| 687 EOverflow overflowY = m_box->style()->overflowY(); | 691 EOverflow overflowY = m_box->style()->overflowY(); |
| 688 | 692 |
| 689 // To avoid doing a relayout in updateScrollbarsAfterLayout, we try to keep
any automatic scrollbar that was already present. | 693 // To avoid doing a relayout in updateScrollbarsAfterLayout, we try to keep
any automatic scrollbar that was already present. |
| 690 bool needsHorizontalScrollbar = (hasHorizontalScrollbar() && overflowDefines
AutomaticScrollbar(overflowX)) || overflowRequiresScrollbar(overflowX); | 694 bool needsHorizontalScrollbar = (hasHorizontalScrollbar() && overflowDefines
AutomaticScrollbar(overflowX)) || overflowRequiresScrollbar(overflowX); |
| 691 bool needsVerticalScrollbar = (hasVerticalScrollbar() && overflowDefinesAuto
maticScrollbar(overflowY)) || overflowRequiresScrollbar(overflowY); | 695 bool needsVerticalScrollbar = (hasVerticalScrollbar() && overflowDefinesAuto
maticScrollbar(overflowY)) || overflowRequiresScrollbar(overflowY); |
| 692 setHasHorizontalScrollbar(needsHorizontalScrollbar); | 696 setHasHorizontalScrollbar(needsHorizontalScrollbar); |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1495 void RenderLayerScrollableArea::setForceNeedsCompositedScrolling(ForceNeedsCompo
sitedScrollingMode mode) | 1499 void RenderLayerScrollableArea::setForceNeedsCompositedScrolling(ForceNeedsCompo
sitedScrollingMode mode) |
| 1496 { | 1500 { |
| 1497 if (m_forceNeedsCompositedScrolling == mode) | 1501 if (m_forceNeedsCompositedScrolling == mode) |
| 1498 return; | 1502 return; |
| 1499 | 1503 |
| 1500 m_forceNeedsCompositedScrolling = mode; | 1504 m_forceNeedsCompositedScrolling = mode; |
| 1501 layer()->didUpdateNeedsCompositedScrolling(); | 1505 layer()->didUpdateNeedsCompositedScrolling(); |
| 1502 } | 1506 } |
| 1503 | 1507 |
| 1504 } // Namespace WebCore | 1508 } // Namespace WebCore |
| OLD | NEW |