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

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

Issue 2764753007: [LayoutNG] Add NGLineBoxFragment (Closed)
Patch Set: Rebase again as other CLs landed faster Created 3 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 // 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 NGFragmentBuilder_h 5 #ifndef NGFragmentBuilder_h
6 #define NGFragmentBuilder_h 6 #define NGFragmentBuilder_h
7 7
8 #include "core/layout/ng/ng_break_token.h" 8 #include "core/layout/ng/ng_break_token.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_floating_object.h" 10 #include "core/layout/ng/ng_floating_object.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 NGFragmentBuilder& SetEndMarginStrut(const NGMarginStrut& from) { 92 NGFragmentBuilder& SetEndMarginStrut(const NGMarginStrut& from) {
93 end_margin_strut_ = from; 93 end_margin_strut_ = from;
94 return *this; 94 return *this;
95 } 95 }
96 96
97 // Offsets are not supposed to be set during fragment construction, so we 97 // Offsets are not supposed to be set during fragment construction, so we
98 // do not provide a setter here. 98 // do not provide a setter here.
99 99
100 // Creates the fragment. Can only be called once. 100 // Creates the fragment. Can only be called once.
101 RefPtr<NGLayoutResult> ToBoxFragment(); 101 RefPtr<NGLayoutResult> ToBoxFragment();
102 RefPtr<NGPhysicalTextFragment> ToTextFragment(unsigned index,
103 unsigned start_offset,
104 unsigned end_offset);
105 102
106 Vector<RefPtr<NGPhysicalFragment>>& MutableChildren() { return children_; } 103 Vector<RefPtr<NGPhysicalFragment>>& MutableChildren() { return children_; }
107 104
108 Vector<NGLogicalOffset>& MutableOffsets() { return offsets_; } 105 Vector<NGLogicalOffset>& MutableOffsets() { return offsets_; }
109 106
110 // Mutable list of floats that need to be positioned. 107 // Mutable list of floats that need to be positioned.
111 Vector<RefPtr<NGFloatingObject>>& MutableUnpositionedFloats() { 108 Vector<RefPtr<NGFloatingObject>>& MutableUnpositionedFloats() {
112 return unpositioned_floats_; 109 return unpositioned_floats_;
113 } 110 }
114 111
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 Vector<NGLogicalOffset> floating_object_offsets_; 173 Vector<NGLogicalOffset> floating_object_offsets_;
177 Vector<RefPtr<NGFloatingObject>> positioned_floats_; 174 Vector<RefPtr<NGFloatingObject>> positioned_floats_;
178 175
179 WTF::Optional<NGLogicalOffset> bfc_offset_; 176 WTF::Optional<NGLogicalOffset> bfc_offset_;
180 NGMarginStrut end_margin_strut_; 177 NGMarginStrut end_margin_strut_;
181 }; 178 };
182 179
183 } // namespace blink 180 } // namespace blink
184 181
185 #endif // NGFragmentBuilder 182 #endif // NGFragmentBuilder
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698