| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // Called by code walking the renderer or layer trees. | 64 // Called by code walking the renderer or layer trees. |
| 65 void pushMappingsToAncestor(const RenderLayer*, const RenderLayer* ancestorL
ayer); | 65 void pushMappingsToAncestor(const RenderLayer*, const RenderLayer* ancestorL
ayer); |
| 66 void popMappingsToAncestor(const RenderLayer*); | 66 void popMappingsToAncestor(const RenderLayer*); |
| 67 void pushMappingsToAncestor(const RenderObject*, const RenderLayerModelObjec
t* ancestorRenderer); | 67 void pushMappingsToAncestor(const RenderObject*, const RenderLayerModelObjec
t* ancestorRenderer); |
| 68 void popMappingsToAncestor(const RenderLayerModelObject*); | 68 void popMappingsToAncestor(const RenderLayerModelObject*); |
| 69 | 69 |
| 70 // The following methods should only be called by renderers inside a call to
pushMappingsToAncestor(). | 70 // The following methods should only be called by renderers inside a call to
pushMappingsToAncestor(). |
| 71 | 71 |
| 72 // Push geometry info between this renderer and some ancestor. The ancestor
must be its container() or some | 72 // Push geometry info between this renderer and some ancestor. The ancestor
must be its container() or some |
| 73 // stacking context between the renderer and its container. | 73 // stacking context between the renderer and its container. |
| 74 void push(const RenderObject*, const LayoutSize&, bool accumulatingTransform
= false, bool isNonUniform = false, bool isFixedPosition = false, bool hasTrans
form = false, LayoutSize offsetForFixedPosition = LayoutSize()); | 74 void push(const RenderObject*, const LayoutSize&, bool accumulatingTransform
= false, bool isNonUniform = false, bool hasTransform = false); |
| 75 void push(const RenderObject*, const TransformationMatrix&, bool accumulatin
gTransform = false, bool isNonUniform = false, bool isFixedPosition = false, boo
l hasTransform = false, LayoutSize offsetForFixedPosition = LayoutSize()); | 75 void push(const RenderObject*, const TransformationMatrix&, bool accumulatin
gTransform = false, bool isNonUniform = false, bool hasTransform = false); |
| 76 | 76 |
| 77 private: | 77 private: |
| 78 void mapToContainer(TransformState&, const RenderLayerModelObject* container
= 0) const; | 78 void mapToContainer(TransformState&, const RenderLayerModelObject* container
= 0) const; |
| 79 | 79 |
| 80 void stepInserted(const RenderGeometryMapStep&); | 80 void stepInserted(const RenderGeometryMapStep&); |
| 81 void stepRemoved(const RenderGeometryMapStep&); | 81 void stepRemoved(const RenderGeometryMapStep&); |
| 82 | 82 |
| 83 bool hasNonUniformStep() const { return m_nonUniformStepsCount; } | 83 bool hasNonUniformStep() const { return m_nonUniformStepsCount; } |
| 84 bool hasTransformStep() const { return m_transformedStepsCount; } | 84 bool hasTransformStep() const { return m_transformedStepsCount; } |
| 85 bool hasFixedPositionStep() const { return m_fixedStepsCount; } | |
| 86 | 85 |
| 87 #ifndef NDEBUG | 86 #ifndef NDEBUG |
| 88 void dumpSteps() const; | 87 void dumpSteps() const; |
| 89 #endif | 88 #endif |
| 90 | 89 |
| 91 #if ENABLE(ASSERT) | 90 #if ENABLE(ASSERT) |
| 92 bool isTopmostRenderView(const RenderObject* renderer) const; | 91 bool isTopmostRenderView(const RenderObject* renderer) const; |
| 93 #endif | 92 #endif |
| 94 | 93 |
| 95 typedef Vector<RenderGeometryMapStep, 32> RenderGeometryMapSteps; | 94 typedef Vector<RenderGeometryMapStep, 32> RenderGeometryMapSteps; |
| 96 | 95 |
| 97 size_t m_insertionPosition; | 96 size_t m_insertionPosition; |
| 98 int m_nonUniformStepsCount; | 97 int m_nonUniformStepsCount; |
| 99 int m_transformedStepsCount; | 98 int m_transformedStepsCount; |
| 100 int m_fixedStepsCount; | |
| 101 RenderGeometryMapSteps m_mapping; | 99 RenderGeometryMapSteps m_mapping; |
| 102 LayoutSize m_accumulatedOffset; | 100 LayoutSize m_accumulatedOffset; |
| 103 MapCoordinatesFlags m_mapCoordinatesFlags; | 101 MapCoordinatesFlags m_mapCoordinatesFlags; |
| 104 }; | 102 }; |
| 105 | 103 |
| 106 } // namespace blink | 104 } // namespace blink |
| 107 | 105 |
| 108 #endif // RenderGeometryMap_h | 106 #endif // RenderGeometryMap_h |
| OLD | NEW |