Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutGeometryMap.h

Issue 1308273010: Adapt and reland old position sticky implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Merge with master and skip anonymous containing blocks for sticky container. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 // Called by code walking the layout or layer trees. 66 // Called by code walking the layout or layer trees.
67 void pushMappingsToAncestor(const PaintLayer*, const PaintLayer* ancestorLay er); 67 void pushMappingsToAncestor(const PaintLayer*, const PaintLayer* ancestorLay er);
68 void popMappingsToAncestor(const PaintLayer*); 68 void popMappingsToAncestor(const PaintLayer*);
69 void pushMappingsToAncestor(const LayoutObject*, const LayoutBoxModelObject* ancestorLayoutObject); 69 void pushMappingsToAncestor(const LayoutObject*, const LayoutBoxModelObject* ancestorLayoutObject);
70 70
71 // The following methods should only be called by layoutObjects inside a cal l to pushMappingsToAncestor(). 71 // The following methods should only be called by layoutObjects inside a cal l to pushMappingsToAncestor().
72 72
73 // Push geometry info between this layoutObject and some ancestor. The ances tor must be its container() or some 73 // Push geometry info between this layoutObject and some ancestor. The ances tor must be its container() or some
74 // stacking context between the layoutObject and its container. 74 // stacking context between the layoutObject and its container.
75 void push(const LayoutObject*, const LayoutSize&, bool accumulatingTransform = false, bool isNonUniform = false, bool isFixedPosition = false, bool hasTrans form = false, LayoutSize offsetForFixedPosition = LayoutSize()); 75 void push(const LayoutObject*, const LayoutSize&, bool accumulatingTransform = false, bool isNonUniform = false, bool isFixedPosition = false, bool hasTrans form = false, LayoutSize offsetForFixedPosition = LayoutSize(), LayoutSize offse tForStickyPosition = LayoutSize());
76 void push(const LayoutObject*, const TransformationMatrix&, bool accumulatin gTransform = false, bool isNonUniform = false, bool isFixedPosition = false, boo l hasTransform = false, LayoutSize offsetForFixedPosition = LayoutSize()); 76 void push(const LayoutObject*, const TransformationMatrix&, bool accumulatin gTransform = false, bool isNonUniform = false, bool isFixedPosition = false, boo l hasTransform = false, LayoutSize offsetForFixedPosition = LayoutSize(), Layout Size offsetForStickyPosition = LayoutSize());
77 77
78 private: 78 private:
79 void popMappingsToAncestor(const LayoutBoxModelObject*); 79 void popMappingsToAncestor(const LayoutBoxModelObject*);
80 void mapToAncestor(TransformState&, const LayoutBoxModelObject* ancestor = n ullptr) const; 80 void mapToAncestor(TransformState&, const LayoutBoxModelObject* ancestor = n ullptr) const;
81 81
82 void stepInserted(const LayoutGeometryMapStep&); 82 void stepInserted(const LayoutGeometryMapStep&);
83 void stepRemoved(const LayoutGeometryMapStep&); 83 void stepRemoved(const LayoutGeometryMapStep&);
84 84
85 bool hasNonUniformStep() const { return m_nonUniformStepsCount; } 85 bool hasNonUniformStep() const { return m_nonUniformStepsCount; }
86 bool hasTransformStep() const { return m_transformedStepsCount; } 86 bool hasTransformStep() const { return m_transformedStepsCount; }
(...skipping 14 matching lines...) Expand all
101 int m_transformedStepsCount; 101 int m_transformedStepsCount;
102 int m_fixedStepsCount; 102 int m_fixedStepsCount;
103 LayoutGeometryMapSteps m_mapping; 103 LayoutGeometryMapSteps m_mapping;
104 LayoutSize m_accumulatedOffset; 104 LayoutSize m_accumulatedOffset;
105 MapCoordinatesFlags m_mapCoordinatesFlags; 105 MapCoordinatesFlags m_mapCoordinatesFlags;
106 }; 106 };
107 107
108 } // namespace blink 108 } // namespace blink
109 109
110 #endif // LayoutGeometryMap_h 110 #endif // LayoutGeometryMap_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698