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

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

Issue 2365083002: Make NGFragment to own NGPhysicalFragment (Closed)
Patch Set: 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 NGPhysicalFragment_h 5 #ifndef NGPhysicalFragment_h
6 #define NGPhysicalFragment_h 6 #define NGPhysicalFragment_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/ng/ng_physical_fragment_base.h" 9 #include "core/layout/ng/ng_physical_fragment_base.h"
10 #include "core/layout/ng/ng_units.h" 10 #include "core/layout/ng/ng_units.h"
11 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
12 #include "wtf/Vector.h" 12 #include "wtf/Vector.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class CORE_EXPORT NGPhysicalFragment final : public NGPhysicalFragmentBase { 16 class CORE_EXPORT NGPhysicalFragment final : public NGPhysicalFragmentBase {
17 public: 17 public:
18 // This modifies the passed-in children vector. 18 // This modifies the passed-in children vector.
19 NGPhysicalFragment(NGPhysicalSize size, 19 NGPhysicalFragment(NGPhysicalSize size,
20 NGPhysicalSize overflow, 20 NGPhysicalSize overflow,
21 HeapVector<Member<const NGPhysicalFragmentBase>>& children, 21 Vector<const NGPhysicalFragmentBase*>& children,
22 NGMarginStrut margin_strut) 22 NGMarginStrut margin_strut)
23 : NGPhysicalFragmentBase(size, overflow, FragmentBox, margin_strut) { 23 : NGPhysicalFragmentBase(size, overflow, FragmentBox, margin_strut) {
24 children_.swap(children); 24 children_.swap(children);
25 } 25 }
26 26
27 const HeapVector<Member<const NGPhysicalFragmentBase>>& Children() const { 27 const Vector<const NGPhysicalFragmentBase*>& Children() const {
28 return children_; 28 return children_;
cbiesinger 2016/09/26 17:17:55 I really think you should document in the builder
29 } 29 }
30 30
31 DEFINE_INLINE_TRACE_AFTER_DISPATCH() {
32 visitor->trace(children_);
33 NGPhysicalFragmentBase::traceAfterDispatch(visitor);
34 }
35
36 private: 31 private:
37 HeapVector<Member<const NGPhysicalFragmentBase>> children_; 32 Vector<const NGPhysicalFragmentBase*> children_;
38 }; 33 };
39 34
40 } // namespace blink 35 } // namespace blink
41 36
42 #endif // NGPhysicalFragment_h 37 #endif // NGPhysicalFragment_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698