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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutGeometryMapStep.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 (removing horizontal-bt test) Created 5 years 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 * Copyright (C) 2014 Google Inc. All rights reserved. 3 * Copyright (C) 2014 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 25 matching lines...) Expand all
36 36
37 class LayoutObject; 37 class LayoutObject;
38 38
39 // Stores data about how to map from one layoutObject to its container. 39 // Stores data about how to map from one layoutObject to its container.
40 struct LayoutGeometryMapStep { 40 struct LayoutGeometryMapStep {
41 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 41 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
42 LayoutGeometryMapStep(const LayoutGeometryMapStep& o) 42 LayoutGeometryMapStep(const LayoutGeometryMapStep& o)
43 : m_layoutObject(o.m_layoutObject) 43 : m_layoutObject(o.m_layoutObject)
44 , m_offset(o.m_offset) 44 , m_offset(o.m_offset)
45 , m_offsetForFixedPosition(o.m_offsetForFixedPosition) 45 , m_offsetForFixedPosition(o.m_offsetForFixedPosition)
46 , m_offsetForStickyPosition(o.m_offsetForStickyPosition)
46 , m_accumulatingTransform(o.m_accumulatingTransform) 47 , m_accumulatingTransform(o.m_accumulatingTransform)
47 , m_isNonUniform(o.m_isNonUniform) 48 , m_isNonUniform(o.m_isNonUniform)
48 , m_isFixedPosition(o.m_isFixedPosition) 49 , m_isFixedPosition(o.m_isFixedPosition)
49 , m_hasTransform(o.m_hasTransform) 50 , m_hasTransform(o.m_hasTransform)
50 { 51 {
51 ASSERT(!o.m_transform); 52 ASSERT(!o.m_transform);
52 } 53 }
53 LayoutGeometryMapStep(const LayoutObject* layoutObject, bool accumulatingTra nsform, bool isNonUniform, bool isFixedPosition, bool hasTransform) 54 LayoutGeometryMapStep(const LayoutObject* layoutObject, bool accumulatingTra nsform, bool isNonUniform, bool isFixedPosition, bool hasTransform)
54 : m_layoutObject(layoutObject) 55 : m_layoutObject(layoutObject)
55 , m_accumulatingTransform(accumulatingTransform) 56 , m_accumulatingTransform(accumulatingTransform)
56 , m_isNonUniform(isNonUniform) 57 , m_isNonUniform(isNonUniform)
57 , m_isFixedPosition(isFixedPosition) 58 , m_isFixedPosition(isFixedPosition)
58 , m_hasTransform(hasTransform) 59 , m_hasTransform(hasTransform)
59 { 60 {
60 } 61 }
61 const LayoutObject* m_layoutObject; 62 const LayoutObject* m_layoutObject;
62 LayoutSize m_offset; 63 LayoutSize m_offset;
63 OwnPtr<TransformationMatrix> m_transform; // Includes offset if non-null. 64 OwnPtr<TransformationMatrix> m_transform; // Includes offset if non-null.
65 // If m_offsetForFixedPosition could only apply to the fixed position steps, we may be able to merge
66 // with m_offsetForStickyPosition and simplify mapping.
64 LayoutSize m_offsetForFixedPosition; 67 LayoutSize m_offsetForFixedPosition;
68 LayoutSize m_offsetForStickyPosition;
65 bool m_accumulatingTransform; 69 bool m_accumulatingTransform;
66 bool m_isNonUniform; // Mapping depends on the input point, e.g. because of CSS columns. 70 bool m_isNonUniform; // Mapping depends on the input point, e.g. because of CSS columns.
67 bool m_isFixedPosition; 71 bool m_isFixedPosition;
68 bool m_hasTransform; 72 bool m_hasTransform;
69 }; 73 };
70 74
71 } // namespace blink 75 } // namespace blink
72 76
73 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::LayoutGeometryMapStep) ; 77 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::LayoutGeometryMapStep) ;
74 78
75 #endif // LayoutGeometryMapStep_h 79 #endif // LayoutGeometryMapStep_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698