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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 PaintLayer* renderingContextRoot(); | 286 PaintLayer* renderingContextRoot(); |
287 const PaintLayer* renderingContextRoot() const; | 287 const PaintLayer* renderingContextRoot() const; |
288 | 288 |
289 LayoutSize offsetForInFlowPosition() const { return m_rareData ? m_rareData-
>offsetForInFlowPosition : LayoutSize(); } | 289 LayoutSize offsetForInFlowPosition() const { return m_rareData ? m_rareData-
>offsetForInFlowPosition : LayoutSize(); } |
290 | 290 |
291 PaintLayerStackingNode* stackingNode() { return m_stackingNode.get(); } | 291 PaintLayerStackingNode* stackingNode() { return m_stackingNode.get(); } |
292 const PaintLayerStackingNode* stackingNode() const { return m_stackingNode.g
et(); } | 292 const PaintLayerStackingNode* stackingNode() const { return m_stackingNode.g
et(); } |
293 | 293 |
294 bool subtreeIsInvisible() const { return !hasVisibleContent() && !hasVisible
Descendant(); } | 294 bool subtreeIsInvisible() const { return !hasVisibleContent() && !hasVisible
Descendant(); } |
295 | 295 |
296 // FIXME: hasVisibleContent() should call updateDescendantDependentFlags() i
f m_visibleContentStatusDirty. | 296 // FIXME: hasVisibleContent() should call updateDescendantDependentFlags() i
f m_isVisibleContentDirty. |
297 bool hasVisibleContent() const { ASSERT(!m_visibleContentStatusDirty); retur
n m_hasVisibleContent; } | 297 bool hasVisibleContent() const { DCHECK(!m_isVisibleContentDirty); return m_
hasVisibleContent; } |
298 | 298 |
299 // FIXME: hasVisibleDescendant() should call updateDescendantDependentFlags(
) if m_visibleDescendantStatusDirty. | 299 // FIXME: hasVisibleDescendant() should call updateDescendantDependentFlags(
) if m_isVisibleDescendantDirty. |
300 bool hasVisibleDescendant() const { ASSERT(!m_visibleDescendantStatusDirty);
return m_hasVisibleDescendant; } | 300 bool hasVisibleDescendant() const { DCHECK(!m_isVisibleDescendantDirty); ret
urn m_hasVisibleDescendant; } |
301 | 301 |
302 void dirtyVisibleContentStatus(); | 302 void dirtyVisibleContentStatus(); |
303 void potentiallyDirtyVisibleContentStatus(EVisibility); | 303 void potentiallyDirtyVisibleContentStatus(EVisibility); |
304 | 304 |
305 bool hasBoxDecorationsOrBackground() const; | 305 bool hasBoxDecorationsOrBackground() const; |
306 bool hasVisibleBoxDecorations() const; | 306 bool hasVisibleBoxDecorations() const; |
307 // True if this layer container layoutObjects that paint. | 307 // True if this layer container layoutObjects that paint. |
308 bool hasNonEmptyChildLayoutObjects() const; | 308 bool hasNonEmptyChildLayoutObjects() const; |
309 | 309 |
310 // Will ensure that isAllScrollingContentComposited() is up to date. | 310 // Will ensure that isAllScrollingContentComposited() is up to date. |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 { | 700 { |
701 if (!m_clipRectsCache) | 701 if (!m_clipRectsCache) |
702 m_clipRectsCache = wrapUnique(new ClipRectsCache); | 702 m_clipRectsCache = wrapUnique(new ClipRectsCache); |
703 return *m_clipRectsCache; | 703 return *m_clipRectsCache; |
704 } | 704 } |
705 void clearClipRectsCache() const { m_clipRectsCache.reset(); } | 705 void clearClipRectsCache() const { m_clipRectsCache.reset(); } |
706 | 706 |
707 void dirty3DTransformedDescendantStatus(); | 707 void dirty3DTransformedDescendantStatus(); |
708 // Both updates the status, and returns true if descendants of this have 3d. | 708 // Both updates the status, and returns true if descendants of this have 3d. |
709 bool update3DTransformedDescendantStatus(); | 709 bool update3DTransformedDescendantStatus(); |
710 bool has3DTransformedDescendant() const { DCHECK(!m_3DTransformedDescendantS
tatusDirty); return m_has3DTransformedDescendant; } | 710 bool has3DTransformedDescendant() const { DCHECK(!m_is3DTransformedDescendan
tDirty); return m_has3DTransformedDescendant; } |
711 | 711 |
712 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS | 712 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS |
713 void endShouldKeepAliveAllClientsRecursive(); | 713 void endShouldKeepAliveAllClientsRecursive(); |
714 #endif | 714 #endif |
715 | 715 |
716 private: | 716 private: |
717 // Bounding box in the coordinates of this layer. | 717 // Bounding box in the coordinates of this layer. |
718 LayoutRect logicalBoundingBox() const; | 718 LayoutRect logicalBoundingBox() const; |
719 | 719 |
720 bool hasOverflowControls() const; | 720 bool hasOverflowControls() const; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 // FIXME(crbug.com/332791): Self-painting layer should be merged into the ov
erflow-only concept. | 806 // FIXME(crbug.com/332791): Self-painting layer should be merged into the ov
erflow-only concept. |
807 unsigned m_isSelfPaintingLayer : 1; | 807 unsigned m_isSelfPaintingLayer : 1; |
808 | 808 |
809 // If have no self-painting descendants, we don't have to walk our children
during painting. This can lead to | 809 // If have no self-painting descendants, we don't have to walk our children
during painting. This can lead to |
810 // significant savings, especially if the tree has lots of non-self-painting
layers grouped together (e.g. table cells). | 810 // significant savings, especially if the tree has lots of non-self-painting
layers grouped together (e.g. table cells). |
811 mutable unsigned m_hasSelfPaintingLayerDescendant : 1; | 811 mutable unsigned m_hasSelfPaintingLayerDescendant : 1; |
812 mutable unsigned m_hasSelfPaintingLayerDescendantDirty : 1; | 812 mutable unsigned m_hasSelfPaintingLayerDescendantDirty : 1; |
813 | 813 |
814 const unsigned m_isRootLayer : 1; | 814 const unsigned m_isRootLayer : 1; |
815 | 815 |
816 unsigned m_visibleContentStatusDirty : 1; | 816 unsigned m_isVisibleContentDirty : 1; |
817 unsigned m_hasVisibleContent : 1; | 817 unsigned m_hasVisibleContent : 1; |
818 unsigned m_visibleDescendantStatusDirty : 1; | 818 unsigned m_isVisibleDescendantDirty : 1; |
819 unsigned m_hasVisibleDescendant : 1; | 819 unsigned m_hasVisibleDescendant : 1; |
820 | 820 |
821 #if ENABLE(ASSERT) | 821 #if ENABLE(ASSERT) |
822 unsigned m_needsPositionUpdate : 1; | 822 unsigned m_needsPositionUpdate : 1; |
823 #endif | 823 #endif |
824 | 824 |
825 unsigned m_3DTransformedDescendantStatusDirty : 1; | 825 unsigned m_is3DTransformedDescendantDirty : 1; |
826 // Set on a stacking context layer that has 3D descendants anywhere | 826 // Set on a stacking context layer that has 3D descendants anywhere |
827 // in a preserves3D hierarchy. Hint to do 3D-aware hit testing. | 827 // in a preserves3D hierarchy. Hint to do 3D-aware hit testing. |
828 unsigned m_has3DTransformedDescendant : 1; | 828 unsigned m_has3DTransformedDescendant : 1; |
829 | 829 |
830 unsigned m_containsDirtyOverlayScrollbars : 1; | 830 unsigned m_containsDirtyOverlayScrollbars : 1; |
831 | 831 |
832 unsigned m_needsAncestorDependentCompositingInputsUpdate : 1; | 832 unsigned m_needsAncestorDependentCompositingInputsUpdate : 1; |
833 unsigned m_needsDescendantDependentCompositingInputsUpdate : 1; | 833 unsigned m_needsDescendantDependentCompositingInputsUpdate : 1; |
834 unsigned m_childNeedsCompositingInputsUpdate : 1; | 834 unsigned m_childNeedsCompositingInputsUpdate : 1; |
835 | 835 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 | 901 |
902 } // namespace blink | 902 } // namespace blink |
903 | 903 |
904 #ifndef NDEBUG | 904 #ifndef NDEBUG |
905 // Outside the WebCore namespace for ease of invocation from gdb. | 905 // Outside the WebCore namespace for ease of invocation from gdb. |
906 void showLayerTree(const blink::PaintLayer*); | 906 void showLayerTree(const blink::PaintLayer*); |
907 void showLayerTree(const blink::LayoutObject*); | 907 void showLayerTree(const blink::LayoutObject*); |
908 #endif | 908 #endif |
909 | 909 |
910 #endif // Layer_h | 910 #endif // Layer_h |
OLD | NEW |