| 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 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 // that need to be painted. That will cause the second pass through the laye
r tree to run, | 726 // that need to be painted. That will cause the second pass through the laye
r tree to run, |
| 727 // and we'll paint the scrollbars then. In the meantime, cache tx and ty so
that the | 727 // and we'll paint the scrollbars then. In the meantime, cache tx and ty so
that the |
| 728 // second pass doesn't need to re-enter the RenderTree to get it right. | 728 // second pass doesn't need to re-enter the RenderTree to get it right. |
| 729 if (hasOverlayScrollbars() && !paintingOverlayControls) { | 729 if (hasOverlayScrollbars() && !paintingOverlayControls) { |
| 730 m_cachedOverlayScrollbarOffset = paintOffset; | 730 m_cachedOverlayScrollbarOffset = paintOffset; |
| 731 IntRect localDamgeRect = damageRect; | 731 IntRect localDamgeRect = damageRect; |
| 732 localDamgeRect.moveBy(-paintOffset); | 732 localDamgeRect.moveBy(-paintOffset); |
| 733 if (!overflowControlsIntersectRect(localDamgeRect)) | 733 if (!overflowControlsIntersectRect(localDamgeRect)) |
| 734 return; | 734 return; |
| 735 | 735 |
| 736 RenderView* renderView = box().view(); | 736 box().view()->layer()->setContainsDirtyOverlayScrollbars(true); |
| 737 | |
| 738 RenderLayer* paintingRoot = layer()->enclosingLayerWithCompositedLayerMa
pping(IncludeSelf); | |
| 739 if (!paintingRoot) | |
| 740 paintingRoot = renderView->layer(); | |
| 741 | |
| 742 paintingRoot->setContainsDirtyOverlayScrollbars(true); | |
| 743 return; | 737 return; |
| 744 } | 738 } |
| 745 | 739 |
| 746 // This check is required to avoid painting custom CSS scrollbars twice. | 740 // This check is required to avoid painting custom CSS scrollbars twice. |
| 747 if (paintingOverlayControls && !hasOverlayScrollbars()) | 741 if (paintingOverlayControls && !hasOverlayScrollbars()) |
| 748 return; | 742 return; |
| 749 | 743 |
| 750 // Now that we're sure the scrollbars are in the right place, paint them. | 744 // Now that we're sure the scrollbars are in the right place, paint them. |
| 751 if (m_hBar) | 745 if (m_hBar) |
| 752 m_hBar->paint(context, damageRect); | 746 m_hBar->paint(context, damageRect); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) | 805 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) |
| 812 { | 806 { |
| 813 // We only want to track the topmost scroll child for scrollable areas with | 807 // We only want to track the topmost scroll child for scrollable areas with |
| 814 // overlay scrollbars. | 808 // overlay scrollbars. |
| 815 if (!hasOverlayScrollbars()) | 809 if (!hasOverlayScrollbars()) |
| 816 return; | 810 return; |
| 817 m_nextTopmostScrollChild = scrollChild; | 811 m_nextTopmostScrollChild = scrollChild; |
| 818 } | 812 } |
| 819 | 813 |
| 820 } // namespace blink | 814 } // namespace blink |
| OLD | NEW |