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

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

Issue 2722763002: [LayoutNG] Switch NGBreakToken to being RefCounted. (Closed)
Patch Set: remove comments. Created 3 years, 9 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 NGPhysicalBoxFragment_h 5 #ifndef NGPhysicalBoxFragment_h
6 #define NGPhysicalBoxFragment_h 6 #define NGPhysicalBoxFragment_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/ng/ng_physical_fragment.h" 9 #include "core/layout/ng/ng_physical_fragment.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/Optional.h" 12 #include "wtf/Optional.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 struct NGFloatingObject; 16 struct NGFloatingObject;
17 17
18 class CORE_EXPORT NGPhysicalBoxFragment final : public NGPhysicalFragment { 18 class CORE_EXPORT NGPhysicalBoxFragment final : public NGPhysicalFragment {
19 public: 19 public:
20 // This modifies the passed-in children vector. 20 // This modifies the passed-in children vector.
21 NGPhysicalBoxFragment( 21 NGPhysicalBoxFragment(LayoutObject* layout_object,
22 LayoutObject* layout_object, 22 NGPhysicalSize size,
23 NGPhysicalSize size, 23 NGPhysicalSize overflow,
24 NGPhysicalSize overflow, 24 Vector<RefPtr<NGPhysicalFragment>>& children,
25 Vector<RefPtr<NGPhysicalFragment>>& children, 25 Vector<Persistent<NGFloatingObject>>& positioned_floats,
26 Vector<Persistent<NGFloatingObject>>& positioned_floats, 26 const WTF::Optional<NGLogicalOffset>& bfc_offset,
27 const WTF::Optional<NGLogicalOffset>& bfc_offset, 27 const NGMarginStrut& end_margin_strut,
28 const NGMarginStrut& end_margin_strut, 28 RefPtr<NGBreakToken> break_token = nullptr);
29 NGBreakToken* break_token = nullptr);
30 29
31 const Vector<RefPtr<NGPhysicalFragment>>& Children() const { 30 const Vector<RefPtr<NGPhysicalFragment>>& Children() const {
32 return children_; 31 return children_;
33 } 32 }
34 33
35 // List of positioned float that need to be copied to the old layout tree. 34 // List of positioned float that need to be copied to the old layout tree.
36 // TODO(layout-ng): remove this once we change painting code to handle floats 35 // TODO(layout-ng): remove this once we change painting code to handle floats
37 // differently. 36 // differently.
38 const Vector<Persistent<NGFloatingObject>>& PositionedFloats() const { 37 const Vector<Persistent<NGFloatingObject>>& PositionedFloats() const {
39 return positioned_floats_; 38 return positioned_floats_;
(...skipping 14 matching lines...) Expand all
54 53
55 DEFINE_TYPE_CASTS(NGPhysicalBoxFragment, 54 DEFINE_TYPE_CASTS(NGPhysicalBoxFragment,
56 NGPhysicalFragment, 55 NGPhysicalFragment,
57 fragment, 56 fragment,
58 fragment->Type() == NGPhysicalFragment::kFragmentBox, 57 fragment->Type() == NGPhysicalFragment::kFragmentBox,
59 fragment.Type() == NGPhysicalFragment::kFragmentBox); 58 fragment.Type() == NGPhysicalFragment::kFragmentBox);
60 59
61 } // namespace blink 60 } // namespace blink
62 61
63 #endif // NGPhysicalBoxFragment_h 62 #endif // NGPhysicalBoxFragment_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698