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

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: Make sticky vertical ref tests expectations not dependent on font size. 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)
54 , m_flags(o.m_flags) 55 , m_flags(o.m_flags)
55 { 56 {
56 ASSERT(!o.m_transform); 57 ASSERT(!o.m_transform);
57 } 58 }
58 LayoutGeometryMapStep(const LayoutObject* layoutObject, GeometryInfoFlags fl ags) 59 LayoutGeometryMapStep(const LayoutObject* layoutObject, GeometryInfoFlags fl ags)
59 : m_layoutObject(layoutObject) 60 : m_layoutObject(layoutObject)
60 , m_flags(flags) 61 , m_flags(flags)
61 { 62 {
62 } 63 }
63 const LayoutObject* m_layoutObject; 64 const LayoutObject* m_layoutObject;
64 LayoutSize m_offset; 65 LayoutSize m_offset;
65 OwnPtr<TransformationMatrix> m_transform; // Includes offset if non-null. 66 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.
66 LayoutSize m_offsetForFixedPosition; 69 LayoutSize m_offsetForFixedPosition;
70 LayoutSize m_offsetForStickyPosition;
67 GeometryInfoFlags m_flags; 71 GeometryInfoFlags m_flags;
68 }; 72 };
69 73
70 } // namespace blink 74 } // namespace blink
71 75
72 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::LayoutGeometryMapStep) ; 76 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::LayoutGeometryMapStep) ;
73 77
74 #endif // LayoutGeometryMapStep_h 78 #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