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

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

Issue 2562703003: Make AlgorithmForInputNode use original constraint space (Closed)
Patch Set: Make AlgorithmForInputNode use container constraint space 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/LayoutObject.h" 7 #include "core/layout/LayoutObject.h"
8 #include "core/layout/LayoutText.h" 8 #include "core/layout/LayoutText.h"
9 #include "core/layout/ng/ng_bidi_paragraph.h" 9 #include "core/layout/ng/ng_bidi_paragraph.h"
10 #include "core/layout/ng/ng_layout_inline_items_builder.h" 10 #include "core/layout/ng/ng_layout_inline_items_builder.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 TextRun item_run(item_text); 192 TextRun item_run(item_text);
193 CachingWordShapeIterator iterator(shape_cache, item_run, &item_font); 193 CachingWordShapeIterator iterator(shape_cache, item_run, &item_font);
194 RefPtr<const ShapeResult> word_result; 194 RefPtr<const ShapeResult> word_result;
195 while (iterator.next(&word_result)) { 195 while (iterator.next(&word_result)) {
196 item.shape_results_.append(word_result.get()); 196 item.shape_results_.append(word_result.get());
197 }; 197 };
198 } 198 }
199 } 199 }
200 200
201 bool NGInlineNode::Layout(const NGConstraintSpace* constraint_space, 201 bool NGInlineNode::Layout(NGConstraintSpace* constraint_space,
202 NGFragmentBase** out) { 202 NGFragmentBase** out) {
203 // TODO(layout-dev): Perform pre-layout text step. 203 // TODO(layout-dev): Perform pre-layout text step.
204 204
205 // NOTE: We don't need to change the coordinate system here as we are an 205 // NOTE: We don't need to change the coordinate system here as we are an
206 // inline. 206 // inline.
207 NGConstraintSpace* child_constraint_space = 207 NGConstraintSpace* child_constraint_space =
208 NGConstraintSpaceBuilder(constraint_space->WritingMode()) 208 NGConstraintSpaceBuilder(constraint_space->WritingMode())
209 .SetTextDirection(constraint_space->Direction()) 209 .SetTextDirection(constraint_space->Direction())
210 .ToConstraintSpace(); 210 .ToConstraintSpace();
211 211
(...skipping 27 matching lines...) Expand all
239 return next_sibling_; 239 return next_sibling_;
240 } 240 }
241 241
242 DEFINE_TRACE(NGInlineNode) { 242 DEFINE_TRACE(NGInlineNode) {
243 visitor->trace(next_sibling_); 243 visitor->trace(next_sibling_);
244 visitor->trace(layout_algorithm_); 244 visitor->trace(layout_algorithm_);
245 NGLayoutInputNode::trace(visitor); 245 NGLayoutInputNode::trace(visitor);
246 } 246 }
247 247
248 } // namespace blink 248 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698