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 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 int clientWidth = box().pixelSnappedClientWidth(); | 672 int clientWidth = box().pixelSnappedClientWidth(); |
673 horizontalScrollbar->setProportion(clientWidth, overflowRect().width
()); | 673 horizontalScrollbar->setProportion(clientWidth, overflowRect().width
()); |
674 } | 674 } |
675 if (Scrollbar* verticalScrollbar = this->verticalScrollbar()) { | 675 if (Scrollbar* verticalScrollbar = this->verticalScrollbar()) { |
676 int clientHeight = box().pixelSnappedClientHeight(); | 676 int clientHeight = box().pixelSnappedClientHeight(); |
677 verticalScrollbar->setProportion(clientHeight, overflowRect().height
()); | 677 verticalScrollbar->setProportion(clientHeight, overflowRect().height
()); |
678 } | 678 } |
679 } | 679 } |
680 | 680 |
681 updateScrollableAreaSet(hasScrollableHorizontalOverflow() || hasScrollableVe
rticalOverflow()); | 681 updateScrollableAreaSet(hasScrollableHorizontalOverflow() || hasScrollableVe
rticalOverflow()); |
682 | |
683 { | |
684 // FIXME: We should not be allowing repaint during layout. crbug.com/336
251 | |
685 AllowPaintInvalidationScope scoper(box().view()->frameView()); | |
686 | |
687 // FIXME: Remove incremental compositing updates after fixing the chicke
n/egg issues | |
688 // https://code.google.com/p/chromium/issues/detail?id=343756 | |
689 DisableCompositingQueryAsserts disabler; | |
690 box().view()->compositor()->updateLayerCompositingState(box().layer()); | |
691 } | |
692 } | 682 } |
693 | 683 |
694 bool RenderLayerScrollableArea::hasHorizontalOverflow() const | 684 bool RenderLayerScrollableArea::hasHorizontalOverflow() const |
695 { | 685 { |
696 ASSERT(!m_scrollDimensionsDirty); | 686 ASSERT(!m_scrollDimensionsDirty); |
697 | 687 |
698 return scrollWidth() > box().clientWidth(); | 688 return scrollWidth() > box().clientWidth(); |
699 } | 689 } |
700 | 690 |
701 bool RenderLayerScrollableArea::hasVerticalOverflow() const | 691 bool RenderLayerScrollableArea::hasVerticalOverflow() const |
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1500 DisableCompositingQueryAsserts disabler; | 1490 DisableCompositingQueryAsserts disabler; |
1501 return box().hasCompositedLayerMapping() && box().compositedLayerMapping()->
scrollingLayer(); | 1491 return box().hasCompositedLayerMapping() && box().compositedLayerMapping()->
scrollingLayer(); |
1502 } | 1492 } |
1503 | 1493 |
1504 bool RenderLayerScrollableArea::needsCompositedScrolling() const | 1494 bool RenderLayerScrollableArea::needsCompositedScrolling() const |
1505 { | 1495 { |
1506 return scrollsOverflow() && box().view()->compositor()->acceleratedCompositi
ngForOverflowScrollEnabled(); | 1496 return scrollsOverflow() && box().view()->compositor()->acceleratedCompositi
ngForOverflowScrollEnabled(); |
1507 } | 1497 } |
1508 | 1498 |
1509 } // Namespace WebCore | 1499 } // Namespace WebCore |
OLD | NEW |