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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 || renderer()->hasBlendMode() | 431 || renderer()->hasBlendMode() |
432 || layer()->isTransparent() | 432 || layer()->isTransparent() |
433 || renderer()->isRenderRegion(); | 433 || renderer()->isRenderRegion(); |
434 | 434 |
435 return couldBeNormalFlow && !preventsElementFromBeingNormalFlow; | 435 return couldBeNormalFlow && !preventsElementFromBeingNormalFlow; |
436 } | 436 } |
437 | 437 |
438 void RenderLayerStackingNode::updateIsNormalFlowOnly() | 438 void RenderLayerStackingNode::updateIsNormalFlowOnly() |
439 { | 439 { |
440 bool isNormalFlowOnly = shouldBeNormalFlowOnly(); | 440 bool isNormalFlowOnly = shouldBeNormalFlowOnly(); |
441 if (isNormalFlowOnly == this->isNormalFlowOnly()) | 441 if (isNormalFlowOnly == m_isNormalFlowOnly) |
442 return; | 442 return; |
443 | 443 |
444 m_isNormalFlowOnly = isNormalFlowOnly; | 444 m_isNormalFlowOnly = isNormalFlowOnly; |
445 if (RenderLayer* p = layer()->parent()) | 445 if (RenderLayer* p = layer()->parent()) |
446 p->stackingNode()->dirtyNormalFlowList(); | 446 p->stackingNode()->dirtyNormalFlowList(); |
447 dirtyStackingContainerZOrderLists(); | 447 dirtyStackingContainerZOrderLists(); |
448 } | 448 } |
449 | 449 |
450 bool RenderLayerStackingNode::needsToBeStackingContainer() const | 450 bool RenderLayerStackingNode::needsToBeStackingContainer() const |
451 { | 451 { |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 { | 613 { |
614 if (isStackingContext() || !ancestorStackingContainerNode()) | 614 if (isStackingContext() || !ancestorStackingContainerNode()) |
615 return true; | 615 return true; |
616 | 616 |
617 ASSERT(!m_descendantsAreContiguousInStackingOrderDirty); | 617 ASSERT(!m_descendantsAreContiguousInStackingOrderDirty); |
618 return m_descendantsAreContiguousInStackingOrder; | 618 return m_descendantsAreContiguousInStackingOrder; |
619 } | 619 } |
620 | 620 |
621 bool RenderLayerStackingNode::setNeedsToBeStackingContainer(bool needsToBeStacki
ngContainer) | 621 bool RenderLayerStackingNode::setNeedsToBeStackingContainer(bool needsToBeStacki
ngContainer) |
622 { | 622 { |
623 if (this->needsToBeStackingContainer() == needsToBeStackingContainer) | 623 if (m_needsToBeStackingContainer == needsToBeStackingContainer) |
624 return false; | 624 return false; |
625 | 625 |
626 // Count the total number of RenderLayers which need to be stacking | 626 // Count the total number of RenderLayers which need to be stacking |
627 // containers some point. This should be recorded at most once per | 627 // containers some point. This should be recorded at most once per |
628 // RenderLayer, so we check m_needsToBeStackingContainerHasBeenRecorded. | 628 // RenderLayer, so we check m_needsToBeStackingContainerHasBeenRecorded. |
629 if (layer()->acceleratedCompositingForOverflowScrollEnabled() && !m_needsToB
eStackingContainerHasBeenRecorded) { | 629 if (layer()->acceleratedCompositingForOverflowScrollEnabled() && !m_needsToB
eStackingContainerHasBeenRecorded) { |
630 blink::Platform::current()->histogramEnumeration("Renderer.CompositedScr
olling", RenderLayer::NeedsToBeStackingContainerBucket, RenderLayer::CompositedS
crollingHistogramMax); | 630 blink::Platform::current()->histogramEnumeration("Renderer.CompositedScr
olling", RenderLayer::NeedsToBeStackingContainerBucket, RenderLayer::CompositedS
crollingHistogramMax); |
631 m_needsToBeStackingContainerHasBeenRecorded = true; | 631 m_needsToBeStackingContainerHasBeenRecorded = true; |
632 } | 632 } |
633 | 633 |
(...skipping 21 matching lines...) Expand all Loading... |
655 return ancestor->stackingNode(); | 655 return ancestor->stackingNode(); |
656 return 0; | 656 return 0; |
657 } | 657 } |
658 | 658 |
659 RenderLayerModelObject* RenderLayerStackingNode::renderer() const | 659 RenderLayerModelObject* RenderLayerStackingNode::renderer() const |
660 { | 660 { |
661 return m_layer->renderer(); | 661 return m_layer->renderer(); |
662 } | 662 } |
663 | 663 |
664 } // namespace WebCore | 664 } // namespace WebCore |
OLD | NEW |