| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Intel Corporation. All rights reserved. | 3 * Copyright (C) 2013 Intel Corporation. All rights reserved. |
| 4 * | 4 * |
| 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 6 * | 6 * |
| 7 * Other contributors: | 7 * Other contributors: |
| 8 * Robert O'Callahan <roc+@cs.cmu.edu> | 8 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 9 * David Baron <dbaron@fas.harvard.edu> | 9 * David Baron <dbaron@fas.harvard.edu> |
| 10 * Christian Biesinger <cbiesinger@web.de> | 10 * Christian Biesinger <cbiesinger@web.de> |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 | 468 |
| 469 CompositedLayerMapping* compositedLayerMapping() const | 469 CompositedLayerMapping* compositedLayerMapping() const |
| 470 { | 470 { |
| 471 // NOTE: Checking whether backing exists is equivalent to asking if you
are in one of these two compositing states. | 471 // NOTE: Checking whether backing exists is equivalent to asking if you
are in one of these two compositing states. |
| 472 // If this is why you are using compositedLayerMapping(), consider
using compositingState() instead. | 472 // If this is why you are using compositedLayerMapping(), consider
using compositingState() instead. |
| 473 return m_compositedLayerMapping.get(); | 473 return m_compositedLayerMapping.get(); |
| 474 } | 474 } |
| 475 | 475 |
| 476 CompositedLayerMapping* ensureCompositedLayerMapping(); | 476 CompositedLayerMapping* ensureCompositedLayerMapping(); |
| 477 void clearCompositedLayerMapping(bool layerBeingDestroyed = false); | 477 void clearCompositedLayerMapping(bool layerBeingDestroyed = false); |
| 478 bool adjustForForceCompositedScrollingMode(bool) const; |
| 478 | 479 |
| 479 bool hasCompositedMask() const; | 480 bool hasCompositedMask() const; |
| 480 bool hasCompositedClippingMask() const; | 481 bool hasCompositedClippingMask() const; |
| 481 bool needsCompositedScrolling() const; | 482 bool needsCompositedScrolling() const; |
| 482 bool needsToBeStackingContainer() const; | 483 bool needsToBeStackingContainer() const; |
| 483 | 484 |
| 484 RenderLayer* scrollParent() const; | 485 RenderLayer* scrollParent() const; |
| 485 RenderLayer* clipParent() const; | 486 RenderLayer* clipParent() const; |
| 486 | 487 |
| 487 bool needsCompositingLayersRebuiltForClip(const RenderStyle* oldStyle, const
RenderStyle* newStyle) const; | 488 bool needsCompositingLayersRebuiltForClip(const RenderStyle* oldStyle, const
RenderStyle* newStyle) const; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 void setAncestorChainHasSelfPaintingLayerDescendant(); | 593 void setAncestorChainHasSelfPaintingLayerDescendant(); |
| 593 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); | 594 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); |
| 594 | 595 |
| 595 void setAncestorChainHasOutOfFlowPositionedDescendant(); | 596 void setAncestorChainHasOutOfFlowPositionedDescendant(); |
| 596 void dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus(); | 597 void dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus(); |
| 597 | 598 |
| 598 bool acceleratedCompositingForOverflowScrollEnabled() const; | 599 bool acceleratedCompositingForOverflowScrollEnabled() const; |
| 599 // FIXME: This is a temporary flag and should be removed once accelerated | 600 // FIXME: This is a temporary flag and should be removed once accelerated |
| 600 // overflow scroll is ready (crbug.com/254111). | 601 // overflow scroll is ready (crbug.com/254111). |
| 601 bool compositorDrivenAcceleratedScrollingEnabled() const; | 602 bool compositorDrivenAcceleratedScrollingEnabled() const; |
| 602 void updateCanBeStackingContainer(); | 603 void updateDescendantsAreContiguousInStackingOrder(); |
| 603 void collectBeforePromotionZOrderList(RenderLayer* ancestorStackingContext,
OwnPtr<Vector<RenderLayer*> >& posZOrderListBeforePromote, OwnPtr<Vector<RenderL
ayer*> >& negZOrderListBeforePromote); | 604 void collectBeforePromotionZOrderList(RenderLayer* ancestorStackingContext,
OwnPtr<Vector<RenderLayer*> >& posZOrderListBeforePromote, OwnPtr<Vector<RenderL
ayer*> >& negZOrderListBeforePromote); |
| 604 void collectAfterPromotionZOrderList(RenderLayer* ancestorStackingContext, O
wnPtr<Vector<RenderLayer*> >& posZOrderListAfterPromote, OwnPtr<Vector<RenderLay
er*> >& negZOrderListAfterPromote); | 605 void collectAfterPromotionZOrderList(RenderLayer* ancestorStackingContext, O
wnPtr<Vector<RenderLayer*> >& posZOrderListAfterPromote, OwnPtr<Vector<RenderLay
er*> >& negZOrderListAfterPromote); |
| 605 | 606 |
| 606 void dirtyNormalFlowListCanBePromotedToStackingContainer(); | 607 void dirtyNormalFlowListCanBePromotedToStackingContainer(); |
| 607 void dirtySiblingStackingContextCanBePromotedToStackingContainer(); | 608 void dirtySiblingStackingContextCanBePromotedToStackingContainer(); |
| 608 | 609 |
| 609 void clipToRect(RenderLayer* rootLayer, GraphicsContext*, const LayoutRect&
paintDirtyRect, const ClipRect&, | 610 void clipToRect(RenderLayer* rootLayer, GraphicsContext*, const LayoutRect&
paintDirtyRect, const ClipRect&, |
| 610 BorderRadiusClippingRule = IncludeSelfForBorderRadius); | 611 BorderRadiusClippingRule = IncludeSelfForBorderRadius); |
| 611 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C
lipRect&); | 612 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C
lipRect&); |
| 612 | 613 |
| 613 void updateSelfPaintingLayer(); | 614 void updateSelfPaintingLayer(); |
| 614 void updateIsNormalFlowOnly(); | 615 void updateIsNormalFlowOnly(); |
| 615 void updateVisibilityAfterStyleChange(const RenderStyle* oldStyle); | 616 void updateVisibilityAfterStyleChange(const RenderStyle* oldStyle); |
| 616 void updateStackingContextsAfterStyleChange(const RenderStyle* oldStyle); | 617 void updateStackingContextsAfterStyleChange(const RenderStyle* oldStyle); |
| 617 | 618 |
| 618 void updateOutOfFlowPositioned(const RenderStyle* oldStyle); | 619 void updateOutOfFlowPositioned(const RenderStyle* oldStyle); |
| 619 | 620 |
| 620 void setNeedsCompositedScrolling(bool); | 621 bool setNeedsCompositedScrolling(bool); |
| 622 bool setNeedsToBeStackingContainer(bool); |
| 621 void didUpdateNeedsCompositedScrolling(); | 623 void didUpdateNeedsCompositedScrolling(); |
| 622 | 624 |
| 623 // Returns true if the position changed. | 625 // Returns true if the position changed. |
| 624 bool updateLayerPosition(); | 626 bool updateLayerPosition(); |
| 625 | 627 |
| 626 void updateLayerPositions(RenderGeometryMap* = 0, UpdateLayerPositionsFlags
= defaultFlags); | 628 void updateLayerPositions(RenderGeometryMap* = 0, UpdateLayerPositionsFlags
= defaultFlags); |
| 627 | 629 |
| 628 enum UpdateLayerPositionsAfterScrollFlag { | 630 enum UpdateLayerPositionsAfterScrollFlag { |
| 629 NoFlag = 0, | 631 NoFlag = 0, |
| 630 IsOverflowScroll = 1 << 0, | 632 IsOverflowScroll = 1 << 0, |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 // FIXME: Temporary. Remove when new columns come online. | 816 // FIXME: Temporary. Remove when new columns come online. |
| 815 bool useRegionBasedColumns() const; | 817 bool useRegionBasedColumns() const; |
| 816 | 818 |
| 817 bool hasCompositingDescendant() const { return m_compositingProperties.hasCo
mpositingDescendant; } | 819 bool hasCompositingDescendant() const { return m_compositingProperties.hasCo
mpositingDescendant; } |
| 818 void setHasCompositingDescendant(bool b) { m_compositingProperties.hasCompo
sitingDescendant = b; } | 820 void setHasCompositingDescendant(bool b) { m_compositingProperties.hasCompo
sitingDescendant = b; } |
| 819 | 821 |
| 820 void setCompositingReasons(CompositingReasons reasons) { m_compositingProper
ties.compositingReasons = reasons; } | 822 void setCompositingReasons(CompositingReasons reasons) { m_compositingProper
ties.compositingReasons = reasons; } |
| 821 CompositingReasons compositingReasons() const { return m_compositingProperti
es.compositingReasons; } | 823 CompositingReasons compositingReasons() const { return m_compositingProperti
es.compositingReasons; } |
| 822 | 824 |
| 823 // Returns true if z ordering would not change if this layer were a stacking
container. | 825 // Returns true if z ordering would not change if this layer were a stacking
container. |
| 824 bool canBeStackingContainer() const; | 826 bool descendantsAreContiguousInStackingOrder() const; |
| 825 | 827 |
| 826 friend class CompositedLayerMapping; | 828 friend class CompositedLayerMapping; |
| 827 friend class RenderLayerCompositor; | 829 friend class RenderLayerCompositor; |
| 828 friend class RenderLayerModelObject; | 830 friend class RenderLayerModelObject; |
| 829 | 831 |
| 830 bool overflowControlsIntersectRect(const IntRect& localRect) const; | 832 bool overflowControlsIntersectRect(const IntRect& localRect) const; |
| 831 | 833 |
| 832 protected: | 834 protected: |
| 833 unsigned m_zOrderListsDirty : 1; | 835 unsigned m_zOrderListsDirty : 1; |
| 834 unsigned m_normalFlowListDirty: 1; | 836 unsigned m_normalFlowListDirty: 1; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 846 | 848 |
| 847 // This is true if we have an out-of-flow positioned descendant whose | 849 // This is true if we have an out-of-flow positioned descendant whose |
| 848 // containing block is our ancestor. If this is the case, the descendant | 850 // containing block is our ancestor. If this is the case, the descendant |
| 849 // may fall outside of our clip preventing things like opting into | 851 // may fall outside of our clip preventing things like opting into |
| 850 // composited scrolling (which causes clipping of all descendants). | 852 // composited scrolling (which causes clipping of all descendants). |
| 851 unsigned m_hasUnclippedDescendant : 1; | 853 unsigned m_hasUnclippedDescendant : 1; |
| 852 | 854 |
| 853 unsigned m_isUnclippedDescendant : 1; | 855 unsigned m_isUnclippedDescendant : 1; |
| 854 | 856 |
| 855 unsigned m_needsCompositedScrolling : 1; | 857 unsigned m_needsCompositedScrolling : 1; |
| 856 unsigned m_needsCompositedScrollingHasBeenRecorded : 1; | 858 unsigned m_needsToBeStackingContainerHasBeenRecorded : 1; |
| 857 unsigned m_willUseCompositedScrollingHasBeenRecorded : 1; | 859 unsigned m_willUseCompositedScrollingHasBeenRecorded : 1; |
| 858 | 860 |
| 859 unsigned m_isScrollableAreaHasBeenRecorded : 1; | 861 unsigned m_isScrollableAreaHasBeenRecorded : 1; |
| 860 | 862 |
| 863 unsigned m_needsToBeStackingContainer : 1; |
| 864 |
| 861 // If this is true, then no non-descendant appears between any of our | 865 // If this is true, then no non-descendant appears between any of our |
| 862 // descendants in stacking order. This is one of the requirements of being | 866 // descendants in stacking order. This is one of the requirements of being |
| 863 // able to safely become a stacking context. | 867 // able to safely become a stacking context. |
| 864 unsigned m_canBePromotedToStackingContainer : 1; | 868 unsigned m_descendantsAreContiguousInStackingOrder : 1; |
| 865 unsigned m_canBePromotedToStackingContainerDirty : 1; | 869 unsigned m_descendantsAreContiguousInStackingOrderDirty : 1; |
| 866 | 870 |
| 867 const unsigned m_isRootLayer : 1; | 871 const unsigned m_isRootLayer : 1; |
| 868 | 872 |
| 869 unsigned m_usedTransparency : 1; // Tracks whether we need to close a transp
arent layer, i.e., whether | 873 unsigned m_usedTransparency : 1; // Tracks whether we need to close a transp
arent layer, i.e., whether |
| 870 // we ended up painting this layer or any desce
ndants (and therefore need to | 874 // we ended up painting this layer or any desce
ndants (and therefore need to |
| 871 // blend). | 875 // blend). |
| 872 | 876 |
| 873 unsigned m_childLayerHasBlendMode : 1; | 877 unsigned m_childLayerHasBlendMode : 1; |
| 874 unsigned m_childLayerHasBlendModeStatusDirty : 1; | 878 unsigned m_childLayerHasBlendModeStatusDirty : 1; |
| 875 unsigned m_paintingInsideReflection : 1; // A state bit tracking if we are p
ainting inside a replica. | 879 unsigned m_paintingInsideReflection : 1; // A state bit tracking if we are p
ainting inside a replica. |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1020 | 1024 |
| 1021 } // namespace WebCore | 1025 } // namespace WebCore |
| 1022 | 1026 |
| 1023 #ifndef NDEBUG | 1027 #ifndef NDEBUG |
| 1024 // Outside the WebCore namespace for ease of invocation from gdb. | 1028 // Outside the WebCore namespace for ease of invocation from gdb. |
| 1025 void showLayerTree(const WebCore::RenderLayer*); | 1029 void showLayerTree(const WebCore::RenderLayer*); |
| 1026 void showLayerTree(const WebCore::RenderObject*); | 1030 void showLayerTree(const WebCore::RenderObject*); |
| 1027 #endif | 1031 #endif |
| 1028 | 1032 |
| 1029 #endif // RenderLayer_h | 1033 #endif // RenderLayer_h |
| OLD | NEW |