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

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc

Issue 2525033002: Deprecate NGPhysicalConstraintSpace (Closed)
Patch Set: update TestExpectations Created 4 years 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 #include "core/layout/ng/ng_inline_node.h" 5 #include "core/layout/ng/ng_inline_node.h"
6 6
7 #include "core/layout/LayoutBlockFlow.h" 7 #include "core/layout/LayoutBlockFlow.h"
8 #include "core/style/ComputedStyle.h" 8 #include "core/style/ComputedStyle.h"
9 #include "core/layout/ng/layout_ng_block_flow.h" 9 #include "core/layout/ng/layout_ng_block_flow.h"
10 #include "core/layout/ng/ng_bidi_paragraph.h" 10 #include "core/layout/ng/ng_bidi_paragraph.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 }; 202 };
203 } 203 }
204 } 204 }
205 205
206 bool NGInlineNode::Layout(const NGConstraintSpace* constraint_space, 206 bool NGInlineNode::Layout(const NGConstraintSpace* constraint_space,
207 NGFragmentBase** out) { 207 NGFragmentBase** out) {
208 // TODO(layout-dev): Perform pre-layout text step. 208 // TODO(layout-dev): Perform pre-layout text step.
209 209
210 // NOTE: We don't need to change the coordinate system here as we are an 210 // NOTE: We don't need to change the coordinate system here as we are an
211 // inline. 211 // inline.
212 NGConstraintSpace* child_constraint_space = new NGConstraintSpace( 212 NGConstraintSpace* child_constraint_space =
213 constraint_space->WritingMode(), constraint_space->Direction(), 213 NGConstraintSpaceBuilder(constraint_space->WritingMode())
214 constraint_space->MutablePhysicalSpace()); 214 .SetTextDirection(constraint_space->Direction())
215 .ToConstraintSpace();
215 216
216 if (!layout_algorithm_) 217 if (!layout_algorithm_)
217 // TODO(layout-dev): If an atomic inline run the appropriate algorithm. 218 // TODO(layout-dev): If an atomic inline run the appropriate algorithm.
218 layout_algorithm_ = new NGTextLayoutAlgorithm(this, child_constraint_space); 219 layout_algorithm_ = new NGTextLayoutAlgorithm(this, child_constraint_space);
219 220
220 NGPhysicalFragmentBase* fragment = nullptr; 221 NGPhysicalFragmentBase* fragment = nullptr;
221 if (!layout_algorithm_->Layout(nullptr, &fragment, nullptr)) 222 if (!layout_algorithm_->Layout(nullptr, &fragment, nullptr))
222 return false; 223 return false;
223 224
224 // TODO(layout-dev): Implement copying of fragment data to LayoutObject tree. 225 // TODO(layout-dev): Implement copying of fragment data to LayoutObject tree.
(...skipping 18 matching lines...) Expand all
243 return next_sibling_; 244 return next_sibling_;
244 } 245 }
245 246
246 DEFINE_TRACE(NGInlineNode) { 247 DEFINE_TRACE(NGInlineNode) {
247 visitor->trace(next_sibling_); 248 visitor->trace(next_sibling_);
248 visitor->trace(layout_algorithm_); 249 visitor->trace(layout_algorithm_);
249 NGLayoutInputNode::trace(visitor); 250 NGLayoutInputNode::trace(visitor);
250 } 251 }
251 252
252 } // namespace blink 253 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698