| 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 | 308 |
| 309 PaintLayerStackingNode* stackingNode() { return m_stackingNode.get(); } | 309 PaintLayerStackingNode* stackingNode() { return m_stackingNode.get(); } |
| 310 const PaintLayerStackingNode* stackingNode() const { | 310 const PaintLayerStackingNode* stackingNode() const { |
| 311 return m_stackingNode.get(); | 311 return m_stackingNode.get(); |
| 312 } | 312 } |
| 313 | 313 |
| 314 bool subtreeIsInvisible() const { | 314 bool subtreeIsInvisible() const { |
| 315 return !hasVisibleContent() && !hasVisibleDescendant(); | 315 return !hasVisibleContent() && !hasVisibleDescendant(); |
| 316 } | 316 } |
| 317 | 317 |
| 318 // FIXME: hasVisibleContent() should call updateDescendantDependentFlags() if | |
| 319 // m_isVisibleContentDirty. | |
| 320 bool hasVisibleContent() const { | 318 bool hasVisibleContent() const { |
| 321 DCHECK(!m_isVisibleContentDirty); | 319 DCHECK(!m_needsDescendantDependentFlagsUpdate); |
| 322 return m_hasVisibleContent; | 320 return m_hasVisibleContent; |
| 323 } | 321 } |
| 324 | 322 |
| 325 // FIXME: hasVisibleDescendant() should call updateDescendantDependentFlags() | |
| 326 // if m_isVisibleDescendantDirty. | |
| 327 bool hasVisibleDescendant() const { | 323 bool hasVisibleDescendant() const { |
| 328 DCHECK(!m_isVisibleDescendantDirty); | 324 DCHECK(!m_needsDescendantDependentFlagsUpdate); |
| 329 return m_hasVisibleDescendant; | 325 return m_hasVisibleDescendant; |
| 330 } | 326 } |
| 331 | 327 |
| 332 void dirtyVisibleContentStatus(); | 328 void dirtyVisibleContentStatus(); |
| 333 void potentiallyDirtyVisibleContentStatus(EVisibility); | |
| 334 | 329 |
| 335 bool hasBoxDecorationsOrBackground() const; | 330 bool hasBoxDecorationsOrBackground() const; |
| 336 bool hasVisibleBoxDecorations() const; | 331 bool hasVisibleBoxDecorations() const; |
| 337 // True if this layer container layoutObjects that paint. | 332 // True if this layer container layoutObjects that paint. |
| 338 bool hasNonEmptyChildLayoutObjects() const; | 333 bool hasNonEmptyChildLayoutObjects() const; |
| 339 | 334 |
| 340 // Will ensure that isAllScrollingContentComposited() is up to date. | 335 // Will ensure that isAllScrollingContentComposited() is up to date. |
| 341 void updateScrollingStateAfterCompositingChange(); | 336 void updateScrollingStateAfterCompositingChange(); |
| 342 bool isAllScrollingContentComposited() const { | 337 bool isAllScrollingContentComposited() const { |
| 343 return m_isAllScrollingContentComposited; | 338 return m_isAllScrollingContentComposited; |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 void updateStackingNode(); | 1061 void updateStackingNode(); |
| 1067 | 1062 |
| 1068 FilterOperations addReflectionToFilterOperations(const ComputedStyle&) const; | 1063 FilterOperations addReflectionToFilterOperations(const ComputedStyle&) const; |
| 1069 | 1064 |
| 1070 // FIXME: We could lazily allocate our ScrollableArea based on style | 1065 // FIXME: We could lazily allocate our ScrollableArea based on style |
| 1071 // properties ('overflow', ...) but for now, we are always allocating it for | 1066 // properties ('overflow', ...) but for now, we are always allocating it for |
| 1072 // LayoutBox as it's safer. crbug.com/467721. | 1067 // LayoutBox as it's safer. crbug.com/467721. |
| 1073 bool requiresScrollableArea() const { return layoutBox(); } | 1068 bool requiresScrollableArea() const { return layoutBox(); } |
| 1074 void updateScrollableArea(); | 1069 void updateScrollableArea(); |
| 1075 | 1070 |
| 1076 void dirtyAncestorChainVisibleDescendantStatus(); | 1071 void markAncestorChainForDescendantDependentFlagsUpdate(); |
| 1077 | 1072 |
| 1078 bool attemptDirectCompositingUpdate(StyleDifference, | 1073 bool attemptDirectCompositingUpdate(StyleDifference, |
| 1079 const ComputedStyle* oldStyle); | 1074 const ComputedStyle* oldStyle); |
| 1080 void updateTransform(const ComputedStyle* oldStyle, | 1075 void updateTransform(const ComputedStyle* oldStyle, |
| 1081 const ComputedStyle& newStyle); | 1076 const ComputedStyle& newStyle); |
| 1082 | 1077 |
| 1083 void removeAncestorOverflowLayer(const PaintLayer* removedLayer); | 1078 void removeAncestorOverflowLayer(const PaintLayer* removedLayer); |
| 1084 | 1079 |
| 1085 void updatePaginationRecursive(bool needsPaginationUpdate = false); | 1080 void updatePaginationRecursive(bool needsPaginationUpdate = false); |
| 1086 void clearPaginationRecursive(); | 1081 void clearPaginationRecursive(); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1126 | 1121 |
| 1127 // If have no self-painting descendants, we don't have to walk our children | 1122 // If have no self-painting descendants, we don't have to walk our children |
| 1128 // during painting. This can lead to significant savings, especially if the | 1123 // during painting. This can lead to significant savings, especially if the |
| 1129 // tree has lots of non-self-painting layers grouped together (e.g. table | 1124 // tree has lots of non-self-painting layers grouped together (e.g. table |
| 1130 // cells). | 1125 // cells). |
| 1131 mutable unsigned m_hasSelfPaintingLayerDescendant : 1; | 1126 mutable unsigned m_hasSelfPaintingLayerDescendant : 1; |
| 1132 mutable unsigned m_hasSelfPaintingLayerDescendantDirty : 1; | 1127 mutable unsigned m_hasSelfPaintingLayerDescendantDirty : 1; |
| 1133 | 1128 |
| 1134 const unsigned m_isRootLayer : 1; | 1129 const unsigned m_isRootLayer : 1; |
| 1135 | 1130 |
| 1136 unsigned m_isVisibleContentDirty : 1; | |
| 1137 unsigned m_hasVisibleContent : 1; | 1131 unsigned m_hasVisibleContent : 1; |
| 1138 unsigned m_isVisibleDescendantDirty : 1; | 1132 unsigned m_needsDescendantDependentFlagsUpdate : 1; |
| 1139 unsigned m_hasVisibleDescendant : 1; | 1133 unsigned m_hasVisibleDescendant : 1; |
| 1140 | 1134 |
| 1141 #if DCHECK_IS_ON() | 1135 #if DCHECK_IS_ON() |
| 1142 unsigned m_needsPositionUpdate : 1; | 1136 unsigned m_needsPositionUpdate : 1; |
| 1143 #endif | 1137 #endif |
| 1144 | 1138 |
| 1145 unsigned m_is3DTransformedDescendantDirty : 1; | 1139 unsigned m_is3DTransformedDescendantDirty : 1; |
| 1146 // Set on a stacking context layer that has 3D descendants anywhere | 1140 // Set on a stacking context layer that has 3D descendants anywhere |
| 1147 // in a preserves3D hierarchy. Hint to do 3D-aware hit testing. | 1141 // in a preserves3D hierarchy. Hint to do 3D-aware hit testing. |
| 1148 unsigned m_has3DTransformedDescendant : 1; | 1142 unsigned m_has3DTransformedDescendant : 1; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1232 | 1226 |
| 1233 } // namespace blink | 1227 } // namespace blink |
| 1234 | 1228 |
| 1235 #ifndef NDEBUG | 1229 #ifndef NDEBUG |
| 1236 // Outside the WebCore namespace for ease of invocation from gdb. | 1230 // Outside the WebCore namespace for ease of invocation from gdb. |
| 1237 CORE_EXPORT void showLayerTree(const blink::PaintLayer*); | 1231 CORE_EXPORT void showLayerTree(const blink::PaintLayer*); |
| 1238 CORE_EXPORT void showLayerTree(const blink::LayoutObject*); | 1232 CORE_EXPORT void showLayerTree(const blink::LayoutObject*); |
| 1239 #endif | 1233 #endif |
| 1240 | 1234 |
| 1241 #endif // Layer_h | 1235 #endif // Layer_h |
| OLD | NEW |