| 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 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1447 bool needsCompositedScrolling = compositor->acceleratedCompositingForOverflo
wScrollEnabled(); | 1447 bool needsCompositedScrolling = compositor->acceleratedCompositingForOverflo
wScrollEnabled(); |
| 1448 ASSERT(scrollsOverflow()); | 1448 ASSERT(scrollsOverflow()); |
| 1449 if (compositor->legacyAcceleratedCompositingForOverflowScrollEnabled()) { | 1449 if (compositor->legacyAcceleratedCompositingForOverflowScrollEnabled()) { |
| 1450 layer()->stackingNode()->updateDescendantsAreContiguousInStackingOrder()
; | 1450 layer()->stackingNode()->updateDescendantsAreContiguousInStackingOrder()
; |
| 1451 layer()->updateDescendantDependentFlags(); | 1451 layer()->updateDescendantDependentFlags(); |
| 1452 const bool needsToBeStackingContainer = layer()->stackingNode()->descend
antsAreContiguousInStackingOrder() && !layer()->hasUnclippedDescendant(); | 1452 const bool needsToBeStackingContainer = layer()->stackingNode()->descend
antsAreContiguousInStackingOrder() && !layer()->hasUnclippedDescendant(); |
| 1453 needsToBeStackingContainerDidChange = layer()->stackingNode()->setNeedsT
oBeStackingContainer(needsToBeStackingContainer); | 1453 needsToBeStackingContainerDidChange = layer()->stackingNode()->setNeedsT
oBeStackingContainer(needsToBeStackingContainer); |
| 1454 needsCompositedScrolling |= needsToBeStackingContainer; | 1454 needsCompositedScrolling |= needsToBeStackingContainer; |
| 1455 } | 1455 } |
| 1456 | 1456 |
| 1457 const bool needsCompositedScrollingDidChange = setNeedsCompositedScrolling(n
eedsCompositedScrolling); | 1457 if (needsToBeStackingContainerDidChange || this->needsCompositedScrolling()
!= needsCompositedScrolling) { |
| 1458 if (needsToBeStackingContainerDidChange || needsCompositedScrollingDidChange
) { | 1458 setNeedsCompositedScrolling(needsCompositedScrolling); |
| 1459 // Note, the z-order lists may need to be rebuilt, but our code guarante
es | 1459 // Note, the z-order lists may need to be rebuilt, but our code guarante
es |
| 1460 // that we have not affected stacking, so we will not dirty | 1460 // that we have not affected stacking, so we will not dirty |
| 1461 // m_descendantsAreContiguousInStackingOrder for either us or our stacki
ng | 1461 // m_descendantsAreContiguousInStackingOrder for either us or our stacki
ng |
| 1462 // context or container. | 1462 // context or container. |
| 1463 layer()->didUpdateNeedsCompositedScrolling(); | 1463 layer()->didUpdateNeedsCompositedScrolling(); |
| 1464 } | 1464 } |
| 1465 } | 1465 } |
| 1466 | 1466 |
| 1467 bool RenderLayerScrollableArea::setNeedsCompositedScrolling(bool needsComposited
Scrolling) | |
| 1468 { | |
| 1469 if (this->needsCompositedScrolling() == needsCompositedScrolling) | |
| 1470 return false; | |
| 1471 | |
| 1472 m_needsCompositedScrolling = needsCompositedScrolling; | |
| 1473 return true; | |
| 1474 } | |
| 1475 | |
| 1476 void RenderLayerScrollableArea::updateCompositingLayersAfterScroll() | 1467 void RenderLayerScrollableArea::updateCompositingLayersAfterScroll() |
| 1477 { | 1468 { |
| 1478 RenderLayerCompositor* compositor = m_box->view()->compositor(); | 1469 RenderLayerCompositor* compositor = m_box->view()->compositor(); |
| 1479 if (compositor->inCompositingMode()) { | 1470 if (compositor->inCompositingMode()) { |
| 1480 // FIXME: Our stacking container is guaranteed to contain all of our des
cendants that may need | 1471 // FIXME: Our stacking container is guaranteed to contain all of our des
cendants that may need |
| 1481 // repositioning, so we should be able to enqueue a partial update compo
siting layers from there. | 1472 // repositioning, so we should be able to enqueue a partial update compo
siting layers from there. |
| 1482 // this feature was overridden for now by deferred compositing updates. | 1473 // this feature was overridden for now by deferred compositing updates. |
| 1483 if (usesCompositedScrolling()) | 1474 if (usesCompositedScrolling()) |
| 1484 compositor->setNeedsCompositingUpdate(CompositingUpdateOnCompositedS
croll); | 1475 compositor->setNeedsCompositingUpdate(CompositingUpdateOnCompositedS
croll); |
| 1485 else | 1476 else |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1520 void RenderLayerScrollableArea::setForceNeedsCompositedScrolling(ForceNeedsCompo
sitedScrollingMode mode) | 1511 void RenderLayerScrollableArea::setForceNeedsCompositedScrolling(ForceNeedsCompo
sitedScrollingMode mode) |
| 1521 { | 1512 { |
| 1522 if (m_forceNeedsCompositedScrolling == mode) | 1513 if (m_forceNeedsCompositedScrolling == mode) |
| 1523 return; | 1514 return; |
| 1524 | 1515 |
| 1525 m_forceNeedsCompositedScrolling = mode; | 1516 m_forceNeedsCompositedScrolling = mode; |
| 1526 layer()->didUpdateNeedsCompositedScrolling(); | 1517 layer()->didUpdateNeedsCompositedScrolling(); |
| 1527 } | 1518 } |
| 1528 | 1519 |
| 1529 } // Namespace WebCore | 1520 } // Namespace WebCore |
| OLD | NEW |