| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 // Called by code walking the layout or layer trees. | 67 // Called by code walking the layout or layer trees. |
| 68 void pushMappingsToAncestor(const DeprecatedPaintLayer*, const DeprecatedPai
ntLayer* ancestorLayer); | 68 void pushMappingsToAncestor(const DeprecatedPaintLayer*, const DeprecatedPai
ntLayer* ancestorLayer); |
| 69 void popMappingsToAncestor(const DeprecatedPaintLayer*); | 69 void popMappingsToAncestor(const DeprecatedPaintLayer*); |
| 70 void pushMappingsToAncestor(const LayoutObject*, const LayoutBoxModelObject*
ancestorLayoutObject); | 70 void pushMappingsToAncestor(const LayoutObject*, const LayoutBoxModelObject*
ancestorLayoutObject); |
| 71 void popMappingsToAncestor(const LayoutBoxModelObject*); | 71 void popMappingsToAncestor(const LayoutBoxModelObject*); |
| 72 | 72 |
| 73 // The following methods should only be called by layoutObjects inside a cal
l to pushMappingsToAncestor(). | 73 // The following methods should only be called by layoutObjects inside a cal
l to pushMappingsToAncestor(). |
| 74 | 74 |
| 75 // Push geometry info between this layoutObject and some ancestor. The ances
tor must be its container() or some | 75 // Push geometry info between this layoutObject and some ancestor. The ances
tor must be its container() or some |
| 76 // stacking context between the layoutObject and its container. | 76 // stacking context between the layoutObject and its container. |
| 77 void push(const LayoutObject*, const LayoutSize&, bool accumulatingTransform
= false, bool isNonUniform = false, bool isFixedPosition = false, bool hasTrans
form = false, LayoutSize offsetForFixedPosition = LayoutSize()); | 77 void push(const LayoutObject*, const LayoutSize&, bool accumulatingTransform
= false, bool isNonUniform = false, bool isViewportConstrained = false, bool ha
sTransform = false, LayoutSize offsetForFixedPosition = LayoutSize()); |
| 78 void push(const LayoutObject*, const TransformationMatrix&, bool accumulatin
gTransform = false, bool isNonUniform = false, bool isFixedPosition = false, boo
l hasTransform = false, LayoutSize offsetForFixedPosition = LayoutSize()); | 78 void push(const LayoutObject*, const TransformationMatrix&, bool accumulatin
gTransform = false, bool isNonUniform = false, bool isViewportConstrained = fals
e, bool hasTransform = false, LayoutSize offsetForFixedPosition = LayoutSize()); |
| 79 | 79 |
| 80 private: | 80 private: |
| 81 void mapToContainer(TransformState&, const LayoutBoxModelObject* container =
nullptr) const; | 81 void mapToContainer(TransformState&, const LayoutBoxModelObject* container =
nullptr) const; |
| 82 | 82 |
| 83 void stepInserted(const LayoutGeometryMapStep&); | 83 void stepInserted(const LayoutGeometryMapStep&); |
| 84 void stepRemoved(const LayoutGeometryMapStep&); | 84 void stepRemoved(const LayoutGeometryMapStep&); |
| 85 | 85 |
| 86 bool hasNonUniformStep() const { return m_nonUniformStepsCount; } | 86 bool hasNonUniformStep() const { return m_nonUniformStepsCount; } |
| 87 bool hasTransformStep() const { return m_transformedStepsCount; } | 87 bool hasTransformStep() const { return m_transformedStepsCount; } |
| 88 bool hasFixedPositionStep() const { return m_fixedStepsCount; } | 88 bool hasViewportConstrainedStep() const { return m_viewportConstrainedStepsC
ount; } |
| 89 | 89 |
| 90 #ifndef NDEBUG | 90 #ifndef NDEBUG |
| 91 void dumpSteps() const; | 91 void dumpSteps() const; |
| 92 #endif | 92 #endif |
| 93 | 93 |
| 94 #if ENABLE(ASSERT) | 94 #if ENABLE(ASSERT) |
| 95 bool isTopmostLayoutView(const LayoutObject*) const; | 95 bool isTopmostLayoutView(const LayoutObject*) const; |
| 96 #endif | 96 #endif |
| 97 | 97 |
| 98 typedef Vector<LayoutGeometryMapStep, 32> LayoutGeometryMapSteps; | 98 typedef Vector<LayoutGeometryMapStep, 32> LayoutGeometryMapSteps; |
| 99 | 99 |
| 100 size_t m_insertionPosition; | 100 size_t m_insertionPosition; |
| 101 int m_nonUniformStepsCount; | 101 int m_nonUniformStepsCount; |
| 102 int m_transformedStepsCount; | 102 int m_transformedStepsCount; |
| 103 int m_fixedStepsCount; | 103 int m_viewportConstrainedStepsCount; |
| 104 LayoutGeometryMapSteps m_mapping; | 104 LayoutGeometryMapSteps m_mapping; |
| 105 LayoutSize m_accumulatedOffset; | 105 LayoutSize m_accumulatedOffset; |
| 106 MapCoordinatesFlags m_mapCoordinatesFlags; | 106 MapCoordinatesFlags m_mapCoordinatesFlags; |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 } // namespace blink | 109 } // namespace blink |
| 110 | 110 |
| 111 #endif // LayoutGeometryMap_h | 111 #endif // LayoutGeometryMap_h |
| OLD | NEW |