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 * | 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 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 | 484 |
485 // A stacking context is a layer that has a non-auto z-index. | 485 // A stacking context is a layer that has a non-auto z-index. |
486 bool isStackingContext() const { return isStackingContext(renderer()->style(
)); } | 486 bool isStackingContext() const { return isStackingContext(renderer()->style(
)); } |
487 | 487 |
488 // A stacking container can have z-order lists. All stacking contexts are | 488 // A stacking container can have z-order lists. All stacking contexts are |
489 // stacking containers, but the converse is not true. Layers that use | 489 // stacking containers, but the converse is not true. Layers that use |
490 // composited scrolling are stacking containers, but they may not | 490 // composited scrolling are stacking containers, but they may not |
491 // necessarily be stacking contexts. | 491 // necessarily be stacking contexts. |
492 bool isStackingContainer() const { return isStackingContext() || needsCompos
itedScrolling(); } | 492 bool isStackingContainer() const { return isStackingContext() || needsCompos
itedScrolling(); } |
493 | 493 |
494 // Gets the enclosing stacking container for this layer, excluding this | 494 RenderLayer* ancestorStackingContainer() const; |
495 // layer itself. | 495 RenderLayer* ancestorStackingContext() const; |
496 RenderLayer* stackingContainer() const; | |
497 | 496 |
498 // Gets the enclosing stacking container for this layer, possibly the layer | 497 // Gets the enclosing stacking container for this layer, possibly the layer |
499 // itself, if it is a stacking container. | 498 // itself, if it is a stacking container. |
500 RenderLayer* enclosingStackingContainer() { return isStackingContainer() ? t
his : stackingContainer(); } | 499 RenderLayer* enclosingStackingContainer() { return isStackingContainer() ? t
his : ancestorStackingContainer(); } |
501 | 500 |
502 void dirtyZOrderLists(); | 501 void dirtyZOrderLists(); |
503 void dirtyStackingContainerZOrderLists(); | 502 void dirtyStackingContainerZOrderLists(); |
504 | 503 |
505 Vector<RenderLayer*>* posZOrderList() const | 504 Vector<RenderLayer*>* posZOrderList() const |
506 { | 505 { |
507 ASSERT(!m_zOrderListsDirty); | 506 ASSERT(!m_zOrderListsDirty); |
508 ASSERT(isStackingContainer() || !m_posZOrderList); | 507 ASSERT(isStackingContainer() || !m_posZOrderList); |
509 return m_posZOrderList.get(); | 508 return m_posZOrderList.get(); |
510 } | 509 } |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 void computeRepaintRectsIncludingDescendants(); | 838 void computeRepaintRectsIncludingDescendants(); |
840 void clearRepaintRects(); | 839 void clearRepaintRects(); |
841 | 840 |
842 void clipToRect(RenderLayer* rootLayer, GraphicsContext*, const LayoutRect&
paintDirtyRect, const ClipRect&, | 841 void clipToRect(RenderLayer* rootLayer, GraphicsContext*, const LayoutRect&
paintDirtyRect, const ClipRect&, |
843 BorderRadiusClippingRule = IncludeSelfForBorderRadius); | 842 BorderRadiusClippingRule = IncludeSelfForBorderRadius); |
844 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C
lipRect&); | 843 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C
lipRect&); |
845 | 844 |
846 bool shouldRepaintAfterLayout() const; | 845 bool shouldRepaintAfterLayout() const; |
847 | 846 |
848 void updateSelfPaintingLayer(); | 847 void updateSelfPaintingLayer(); |
| 848 void updateIsNormalFlowOnly(); |
| 849 void updateVisibilityAfterStyleChange(const RenderStyle* oldStyle); |
849 void updateStackingContextsAfterStyleChange(const RenderStyle* oldStyle); | 850 void updateStackingContextsAfterStyleChange(const RenderStyle* oldStyle); |
850 | 851 |
851 void updateScrollbarsAfterStyleChange(const RenderStyle* oldStyle); | 852 void updateScrollbarsAfterStyleChange(const RenderStyle* oldStyle); |
852 void updateScrollbarsAfterLayout(); | 853 void updateScrollbarsAfterLayout(); |
853 | 854 |
854 void setAncestorChainHasOutOfFlowPositionedDescendant(RenderObject* containi
ngBlock); | 855 void setAncestorChainHasOutOfFlowPositionedDescendant(RenderObject* containi
ngBlock); |
855 void dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus(); | 856 void dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus(); |
856 void updateOutOfFlowPositioned(const RenderStyle* oldStyle); | 857 void updateOutOfFlowPositioned(const RenderStyle* oldStyle); |
857 | 858 |
858 void updateNeedsCompositedScrolling(); | 859 void updateNeedsCompositedScrolling(); |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 // stacking context. | 1121 // stacking context. |
1121 bool m_hasOutOfFlowPositionedDescendant : 1; | 1122 bool m_hasOutOfFlowPositionedDescendant : 1; |
1122 bool m_hasOutOfFlowPositionedDescendantDirty : 1; | 1123 bool m_hasOutOfFlowPositionedDescendantDirty : 1; |
1123 | 1124 |
1124 bool m_needsCompositedScrolling : 1; | 1125 bool m_needsCompositedScrolling : 1; |
1125 | 1126 |
1126 // If this is true, then no non-descendant appears between any of our | 1127 // If this is true, then no non-descendant appears between any of our |
1127 // descendants in stacking order. This is one of the requirements of being | 1128 // descendants in stacking order. This is one of the requirements of being |
1128 // able to safely become a stacking context. | 1129 // able to safely become a stacking context. |
1129 bool m_descendantsAreContiguousInStackingOrder : 1; | 1130 bool m_descendantsAreContiguousInStackingOrder : 1; |
| 1131 bool m_descendantsAreContiguousInStackingOrderDirty : 1; |
1130 | 1132 |
1131 const bool m_isRootLayer : 1; | 1133 const bool m_isRootLayer : 1; |
1132 | 1134 |
1133 bool m_usedTransparency : 1; // Tracks whether we need to close a transparen
t layer, i.e., whether | 1135 bool m_usedTransparency : 1; // Tracks whether we need to close a transparen
t layer, i.e., whether |
1134 // we ended up painting this layer or any desce
ndants (and therefore need to | 1136 // we ended up painting this layer or any desce
ndants (and therefore need to |
1135 // blend). | 1137 // blend). |
1136 bool m_paintingInsideReflection : 1; // A state bit tracking if we are pain
ting inside a replica. | 1138 bool m_paintingInsideReflection : 1; // A state bit tracking if we are pain
ting inside a replica. |
1137 bool m_inOverflowRelayout : 1; | 1139 bool m_inOverflowRelayout : 1; |
1138 unsigned m_repaintStatus : 2; // RepaintStatus | 1140 unsigned m_repaintStatus : 2; // RepaintStatus |
1139 | 1141 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 | 1286 |
1285 } // namespace WebCore | 1287 } // namespace WebCore |
1286 | 1288 |
1287 #ifndef NDEBUG | 1289 #ifndef NDEBUG |
1288 // Outside the WebCore namespace for ease of invocation from gdb. | 1290 // Outside the WebCore namespace for ease of invocation from gdb. |
1289 void showLayerTree(const WebCore::RenderLayer*); | 1291 void showLayerTree(const WebCore::RenderLayer*); |
1290 void showLayerTree(const WebCore::RenderObject*); | 1292 void showLayerTree(const WebCore::RenderObject*); |
1291 #endif | 1293 #endif |
1292 | 1294 |
1293 #endif // RenderLayer_h | 1295 #endif // RenderLayer_h |
OLD | NEW |