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

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

Issue 1850703002: Revert "Adapt and reland old position sticky implementation from https://codereview.chromium.org/34… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 * 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 }; 44 };
45 typedef unsigned GeometryInfoFlags; 45 typedef unsigned GeometryInfoFlags;
46 46
47 // Stores data about how to map from one layoutObject to its container. 47 // Stores data about how to map from one layoutObject to its container.
48 struct LayoutGeometryMapStep { 48 struct LayoutGeometryMapStep {
49 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 49 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
50 LayoutGeometryMapStep(const LayoutGeometryMapStep& o) 50 LayoutGeometryMapStep(const LayoutGeometryMapStep& o)
51 : m_layoutObject(o.m_layoutObject) 51 : m_layoutObject(o.m_layoutObject)
52 , m_offset(o.m_offset) 52 , m_offset(o.m_offset)
53 , m_offsetForFixedPosition(o.m_offsetForFixedPosition) 53 , m_offsetForFixedPosition(o.m_offsetForFixedPosition)
54 , m_offsetForStickyPosition(o.m_offsetForStickyPosition)
55 , m_flags(o.m_flags) 54 , m_flags(o.m_flags)
56 { 55 {
57 ASSERT(!o.m_transform); 56 ASSERT(!o.m_transform);
58 } 57 }
59 LayoutGeometryMapStep(const LayoutObject* layoutObject, GeometryInfoFlags fl ags) 58 LayoutGeometryMapStep(const LayoutObject* layoutObject, GeometryInfoFlags fl ags)
60 : m_layoutObject(layoutObject) 59 : m_layoutObject(layoutObject)
61 , m_flags(flags) 60 , m_flags(flags)
62 { 61 {
63 } 62 }
64 const LayoutObject* m_layoutObject; 63 const LayoutObject* m_layoutObject;
65 LayoutSize m_offset; 64 LayoutSize m_offset;
66 OwnPtr<TransformationMatrix> m_transform; // Includes offset if non-null. 65 OwnPtr<TransformationMatrix> m_transform; // Includes offset if non-null.
67 // If m_offsetForFixedPosition could only apply to the fixed position steps, we may be able to merge
68 // with m_offsetForStickyPosition and simplify mapping.
69 LayoutSize m_offsetForFixedPosition; 66 LayoutSize m_offsetForFixedPosition;
70 LayoutSize m_offsetForStickyPosition;
71 GeometryInfoFlags m_flags; 67 GeometryInfoFlags m_flags;
72 }; 68 };
73 69
74 } // namespace blink 70 } // namespace blink
75 71
76 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::LayoutGeometryMapStep) ; 72 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::LayoutGeometryMapStep) ;
77 73
78 #endif // LayoutGeometryMapStep_h 74 #endif // LayoutGeometryMapStep_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutGrid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698