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

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

Issue 2417113002: [LayoutNG] Fix orthogonal writing mode child margin strut from being used in collapsing margins cal… (Closed)
Patch Set: address comments Created 4 years, 2 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NGPhysicalFragmentBase_h 5 #ifndef NGPhysicalFragmentBase_h
6 #define NGPhysicalFragmentBase_h 6 #define NGPhysicalFragmentBase_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/ng/ng_constraint_space.h" 9 #include "core/layout/ng/ng_constraint_space.h"
10 #include "core/layout/ng/ng_units.h" 10 #include "core/layout/ng/ng_units.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 return offset_.top; 52 return offset_.top;
53 } 53 }
54 54
55 // Should only be used by the parent fragement's layout. 55 // Should only be used by the parent fragement's layout.
56 void SetOffset(NGPhysicalOffset offset) { 56 void SetOffset(NGPhysicalOffset offset) {
57 DCHECK(!has_been_placed_); 57 DCHECK(!has_been_placed_);
58 offset_ = offset; 58 offset_ = offset;
59 has_been_placed_ = true; 59 has_been_placed_ = true;
60 } 60 }
61 61
62 NGMarginStrut MarginStrut() const { return margin_strut_; }
63
64 DEFINE_INLINE_TRACE_AFTER_DISPATCH() {} 62 DEFINE_INLINE_TRACE_AFTER_DISPATCH() {}
65 DECLARE_TRACE(); 63 DECLARE_TRACE();
66 64
67 protected: 65 protected:
68 NGPhysicalFragmentBase(NGPhysicalSize size, 66 NGPhysicalFragmentBase(NGPhysicalSize size,
69 NGPhysicalSize overflow, 67 NGPhysicalSize overflow,
70 NGFragmentType type, 68 NGFragmentType type)
71 NGMarginStrut margin_strut)
72 : size_(size), 69 : size_(size),
73 overflow_(overflow), 70 overflow_(overflow),
74 margin_strut_(margin_strut),
75 type_(type), 71 type_(type),
76 has_been_placed_(false) {} 72 has_been_placed_(false) {}
77 73
78 NGPhysicalSize size_; 74 NGPhysicalSize size_;
79 NGPhysicalSize overflow_; 75 NGPhysicalSize overflow_;
80 NGPhysicalOffset offset_; 76 NGPhysicalOffset offset_;
81 NGMarginStrut margin_strut_;
82 77
83 unsigned type_ : 1; 78 unsigned type_ : 1;
84 unsigned has_been_placed_ : 1; 79 unsigned has_been_placed_ : 1;
85 }; 80 };
86 81
87 } // namespace blink 82 } // namespace blink
88 83
89 #endif // NGFragmentBase_h 84 #endif // NGFragmentBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698