OLD | NEW |
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 // Stores data about how to map from one layoutObject to its container. | 49 // Stores data about how to map from one layoutObject to its container. |
50 struct LayoutGeometryMapStep { | 50 struct LayoutGeometryMapStep { |
51 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 51 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
52 LayoutGeometryMapStep(const LayoutGeometryMapStep& o) | 52 LayoutGeometryMapStep(const LayoutGeometryMapStep& o) |
53 : m_layoutObject(o.m_layoutObject), | 53 : m_layoutObject(o.m_layoutObject), |
54 m_offset(o.m_offset), | 54 m_offset(o.m_offset), |
55 m_offsetForFixedPosition(o.m_offsetForFixedPosition), | 55 m_offsetForFixedPosition(o.m_offsetForFixedPosition), |
56 m_offsetForStickyPosition(o.m_offsetForStickyPosition), | 56 m_offsetForStickyPosition(o.m_offsetForStickyPosition), |
57 m_flags(o.m_flags) { | 57 m_flags(o.m_flags) { |
58 ASSERT(!o.m_transform); | 58 DCHECK(!o.m_transform); |
59 } | 59 } |
60 LayoutGeometryMapStep(const LayoutObject* layoutObject, | 60 LayoutGeometryMapStep(const LayoutObject* layoutObject, |
61 GeometryInfoFlags flags) | 61 GeometryInfoFlags flags) |
62 : m_layoutObject(layoutObject), m_flags(flags) {} | 62 : m_layoutObject(layoutObject), m_flags(flags) {} |
63 const LayoutObject* m_layoutObject; | 63 const LayoutObject* m_layoutObject; |
64 LayoutSize m_offset; | 64 LayoutSize m_offset; |
65 std::unique_ptr<TransformationMatrix> | 65 std::unique_ptr<TransformationMatrix> |
66 m_transform; // Includes offset if non-null. | 66 m_transform; // Includes offset if non-null. |
67 // If m_offsetForFixedPosition could only apply to the fixed position steps, | 67 // If m_offsetForFixedPosition could only apply to the fixed position steps, |
68 // we may be able to merge with m_offsetForStickyPosition and simplify | 68 // we may be able to merge with m_offsetForStickyPosition and simplify |
69 // mapping. | 69 // mapping. |
70 LayoutSize m_offsetForFixedPosition; | 70 LayoutSize m_offsetForFixedPosition; |
71 LayoutSize m_offsetForStickyPosition; | 71 LayoutSize m_offsetForStickyPosition; |
72 GeometryInfoFlags m_flags; | 72 GeometryInfoFlags m_flags; |
73 }; | 73 }; |
74 | 74 |
75 } // namespace blink | 75 } // namespace blink |
76 | 76 |
77 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS( | 77 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS( |
78 blink::LayoutGeometryMapStep); | 78 blink::LayoutGeometryMapStep); |
79 | 79 |
80 #endif // LayoutGeometryMapStep_h | 80 #endif // LayoutGeometryMapStep_h |
OLD | NEW |