| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 #include "wtf/Allocator.h" | 60 #include "wtf/Allocator.h" |
| 61 #include "wtf/AutoReset.h" | 61 #include "wtf/AutoReset.h" |
| 62 #include "wtf/PtrUtil.h" | 62 #include "wtf/PtrUtil.h" |
| 63 #include <memory> | 63 #include <memory> |
| 64 | 64 |
| 65 namespace blink { | 65 namespace blink { |
| 66 | 66 |
| 67 class CompositedLayerMapping; | 67 class CompositedLayerMapping; |
| 68 class CompositorFilterOperations; | 68 class CompositorFilterOperations; |
| 69 class ComputedStyle; | 69 class ComputedStyle; |
| 70 class FilterEffect; |
| 70 class FilterOperations; | 71 class FilterOperations; |
| 71 class HitTestRequest; | 72 class HitTestRequest; |
| 72 class HitTestResult; | 73 class HitTestResult; |
| 73 class HitTestingTransformState; | 74 class HitTestingTransformState; |
| 74 class PaintLayerCompositor; | 75 class PaintLayerCompositor; |
| 75 class PaintTiming; | 76 class PaintTiming; |
| 76 class TransformationMatrix; | 77 class TransformationMatrix; |
| 77 | 78 |
| 78 enum IncludeSelfOrNot { IncludeSelf, ExcludeSelf }; | 79 enum IncludeSelfOrNot { IncludeSelf, ExcludeSelf }; |
| 79 | 80 |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 | 586 |
| 586 // Calls the above, rounding outwards. | 587 // Calls the above, rounding outwards. |
| 587 LayoutRect mapLayoutRectForFilter(const LayoutRect&) const; | 588 LayoutRect mapLayoutRectForFilter(const LayoutRect&) const; |
| 588 | 589 |
| 589 bool hasFilterThatMovesPixels() const; | 590 bool hasFilterThatMovesPixels() const; |
| 590 | 591 |
| 591 PaintLayerFilterInfo* filterInfo() const { | 592 PaintLayerFilterInfo* filterInfo() const { |
| 592 return m_rareData ? m_rareData->filterInfo.get() : nullptr; | 593 return m_rareData ? m_rareData->filterInfo.get() : nullptr; |
| 593 } | 594 } |
| 594 PaintLayerFilterInfo& ensureFilterInfo(); | 595 PaintLayerFilterInfo& ensureFilterInfo(); |
| 596 void removeFilterInfo(); |
| 595 | 597 |
| 596 void updateFilters(const ComputedStyle* oldStyle, | 598 void updateFilters(const ComputedStyle* oldStyle, |
| 597 const ComputedStyle& newStyle); | 599 const ComputedStyle& newStyle); |
| 598 | 600 |
| 599 Node* enclosingNode() const; | 601 Node* enclosingNode() const; |
| 600 | 602 |
| 601 bool isInTopLayer() const; | 603 bool isInTopLayer() const; |
| 602 | 604 |
| 603 bool scrollsWithViewport() const; | 605 bool scrollsWithViewport() const; |
| 604 bool scrollsWithRespectTo(const PaintLayer*) const; | 606 bool scrollsWithRespectTo(const PaintLayer*) const; |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 void setHasCompositingDescendant(bool); | 814 void setHasCompositingDescendant(bool); |
| 813 | 815 |
| 814 bool shouldIsolateCompositedDescendants() const { | 816 bool shouldIsolateCompositedDescendants() const { |
| 815 ASSERT(isAllowedToQueryCompositingState()); | 817 ASSERT(isAllowedToQueryCompositingState()); |
| 816 return m_shouldIsolateCompositedDescendants; | 818 return m_shouldIsolateCompositedDescendants; |
| 817 } | 819 } |
| 818 void setShouldIsolateCompositedDescendants(bool); | 820 void setShouldIsolateCompositedDescendants(bool); |
| 819 | 821 |
| 820 void updateDescendantDependentFlags(); | 822 void updateDescendantDependentFlags(); |
| 821 | 823 |
| 822 void updateOrRemoveFilterEffect(); | |
| 823 | |
| 824 void updateSelfPaintingLayer(); | 824 void updateSelfPaintingLayer(); |
| 825 // This is O(depth) so avoid calling this in loops. Instead use optimizations | 825 // This is O(depth) so avoid calling this in loops. Instead use optimizations |
| 826 // like those in PaintInvalidationState. | 826 // like those in PaintInvalidationState. |
| 827 PaintLayer* enclosingSelfPaintingLayer(); | 827 PaintLayer* enclosingSelfPaintingLayer(); |
| 828 | 828 |
| 829 PaintLayer* enclosingTransformedAncestor() const; | 829 PaintLayer* enclosingTransformedAncestor() const; |
| 830 LayoutPoint computeOffsetFromTransformedAncestor() const; | 830 LayoutPoint computeOffsetFromTransformedAncestor() const; |
| 831 | 831 |
| 832 void didUpdateNeedsCompositedScrolling(); | 832 void didUpdateNeedsCompositedScrolling(); |
| 833 | 833 |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 | 1066 |
| 1067 bool childBackgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const; | 1067 bool childBackgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const; |
| 1068 | 1068 |
| 1069 bool shouldBeSelfPaintingLayer() const; | 1069 bool shouldBeSelfPaintingLayer() const; |
| 1070 | 1070 |
| 1071 // FIXME: We should only create the stacking node if needed. | 1071 // FIXME: We should only create the stacking node if needed. |
| 1072 bool requiresStackingNode() const { return true; } | 1072 bool requiresStackingNode() const { return true; } |
| 1073 void updateStackingNode(); | 1073 void updateStackingNode(); |
| 1074 | 1074 |
| 1075 FilterOperations addReflectionToFilterOperations(const ComputedStyle&) const; | 1075 FilterOperations addReflectionToFilterOperations(const ComputedStyle&) const; |
| 1076 FilterEffect* updateFilterEffect() const; | |
| 1077 | 1076 |
| 1078 // FIXME: We could lazily allocate our ScrollableArea based on style | 1077 // FIXME: We could lazily allocate our ScrollableArea based on style |
| 1079 // properties ('overflow', ...) but for now, we are always allocating it for | 1078 // properties ('overflow', ...) but for now, we are always allocating it for |
| 1080 // LayoutBox as it's safer. crbug.com/467721. | 1079 // LayoutBox as it's safer. crbug.com/467721. |
| 1081 bool requiresScrollableArea() const { return layoutBox(); } | 1080 bool requiresScrollableArea() const { return layoutBox(); } |
| 1082 void updateScrollableArea(); | 1081 void updateScrollableArea(); |
| 1083 | 1082 |
| 1084 void dirtyAncestorChainVisibleDescendantStatus(); | 1083 void dirtyAncestorChainVisibleDescendantStatus(); |
| 1085 | 1084 |
| 1086 bool attemptDirectCompositingUpdate(StyleDifference, | 1085 bool attemptDirectCompositingUpdate(StyleDifference, |
| 1087 const ComputedStyle* oldStyle); | 1086 const ComputedStyle* oldStyle); |
| 1088 void updateTransform(const ComputedStyle* oldStyle, | 1087 void updateTransform(const ComputedStyle* oldStyle, |
| 1089 const ComputedStyle& newStyle); | 1088 const ComputedStyle& newStyle); |
| 1090 | 1089 |
| 1091 void removeAncestorOverflowLayer(const PaintLayer* removedLayer); | 1090 void removeAncestorOverflowLayer(const PaintLayer* removedLayer); |
| 1092 | 1091 |
| 1093 void updateOrRemoveFilterClients(); | |
| 1094 | |
| 1095 void updatePaginationRecursive(bool needsPaginationUpdate = false); | 1092 void updatePaginationRecursive(bool needsPaginationUpdate = false); |
| 1096 void clearPaginationRecursive(); | 1093 void clearPaginationRecursive(); |
| 1097 | 1094 |
| 1098 void setNeedsRepaintInternal(); | 1095 void setNeedsRepaintInternal(); |
| 1099 void markCompositingContainerChainForNeedsRepaint(); | 1096 void markCompositingContainerChainForNeedsRepaint(); |
| 1100 | 1097 |
| 1101 PaintLayerRareData& ensureRareData() { | 1098 PaintLayerRareData& ensureRareData() { |
| 1102 if (!m_rareData) | 1099 if (!m_rareData) |
| 1103 m_rareData = wrapUnique(new PaintLayerRareData); | 1100 m_rareData = wrapUnique(new PaintLayerRareData); |
| 1104 return *m_rareData; | 1101 return *m_rareData; |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1230 | 1227 |
| 1231 } // namespace blink | 1228 } // namespace blink |
| 1232 | 1229 |
| 1233 #ifndef NDEBUG | 1230 #ifndef NDEBUG |
| 1234 // Outside the WebCore namespace for ease of invocation from gdb. | 1231 // Outside the WebCore namespace for ease of invocation from gdb. |
| 1235 CORE_EXPORT void showLayerTree(const blink::PaintLayer*); | 1232 CORE_EXPORT void showLayerTree(const blink::PaintLayer*); |
| 1236 CORE_EXPORT void showLayerTree(const blink::LayoutObject*); | 1233 CORE_EXPORT void showLayerTree(const blink::LayoutObject*); |
| 1237 #endif | 1234 #endif |
| 1238 | 1235 |
| 1239 #endif // Layer_h | 1236 #endif // Layer_h |
| OLD | NEW |