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

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

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 12 matching lines...) Expand all
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27 #ifndef LayoutGeometryMapStep_h 27 #ifndef LayoutGeometryMapStep_h
28 #define LayoutGeometryMapStep_h 28 #define LayoutGeometryMapStep_h
29 29
30 #include "platform/geometry/LayoutSize.h" 30 #include "platform/geometry/LayoutSize.h"
31 #include "platform/transforms/TransformationMatrix.h" 31 #include "platform/transforms/TransformationMatrix.h"
32 #include "wtf/Allocator.h" 32 #include "wtf/Allocator.h"
33 #include <memory> 33 #include "wtf/OwnPtr.h"
34 34
35 namespace blink { 35 namespace blink {
36 36
37 class LayoutObject; 37 class LayoutObject;
38 38
39 enum GeometryInfoFlag { 39 enum GeometryInfoFlag {
40 AccumulatingTransform = 1 << 0, 40 AccumulatingTransform = 1 << 0,
41 IsNonUniform = 1 << 1, // Mapping depends on the input point, e.g. because o f CSS columns. 41 IsNonUniform = 1 << 1, // Mapping depends on the input point, e.g. because o f CSS columns.
42 IsFixedPosition = 1 << 2, 42 IsFixedPosition = 1 << 2,
43 HasTransform = 1 << 3, 43 HasTransform = 1 << 3,
(...skipping 12 matching lines...) Expand all
56 { 56 {
57 ASSERT(!o.m_transform); 57 ASSERT(!o.m_transform);
58 } 58 }
59 LayoutGeometryMapStep(const LayoutObject* layoutObject, GeometryInfoFlags fl ags) 59 LayoutGeometryMapStep(const LayoutObject* layoutObject, GeometryInfoFlags fl ags)
60 : m_layoutObject(layoutObject) 60 : m_layoutObject(layoutObject)
61 , m_flags(flags) 61 , m_flags(flags)
62 { 62 {
63 } 63 }
64 const LayoutObject* m_layoutObject; 64 const LayoutObject* m_layoutObject;
65 LayoutSize m_offset; 65 LayoutSize m_offset;
66 std::unique_ptr<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 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. 68 // with m_offsetForStickyPosition and simplify mapping.
69 LayoutSize m_offsetForFixedPosition; 69 LayoutSize m_offsetForFixedPosition;
70 LayoutSize m_offsetForStickyPosition; 70 LayoutSize m_offsetForStickyPosition;
71 GeometryInfoFlags m_flags; 71 GeometryInfoFlags m_flags;
72 }; 72 };
73 73
74 } // namespace blink 74 } // namespace blink
75 75
76 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::LayoutGeometryMapStep) ; 76 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::LayoutGeometryMapStep) ;
77 77
78 #endif // LayoutGeometryMapStep_h 78 #endif // LayoutGeometryMapStep_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutGeometryMap.h ('k') | third_party/WebKit/Source/core/layout/LayoutGrid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698