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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
index 43699720ab09f939075c57415ba8b68a01c2b2be..039ca524b65373f21255750a959c87ea33b288f2 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
@@ -270,10 +270,9 @@ NGLayoutStatus NGBlockLayoutAlgorithm::Layout(
current_child_->UpdateLayoutBox(toNGPhysicalFragment(child_fragment),
space_for_current_child_);
- FinishCurrentChildLayout(
- new NGFragment(space_for_current_child_->WritingMode(),
- current_child_->Style()->direction(),
- toNGPhysicalFragment(child_fragment)));
+ FinishCurrentChildLayout(new NGFragment(
+ ConstraintSpace().WritingMode(), ConstraintSpace().Direction(),
+ toNGPhysicalFragment(child_fragment)));
current_child_ = current_child_->NextSibling();
state_ = kStatePrepareForChildLayout;
return kNotFinished;
@@ -444,9 +443,13 @@ void NGBlockLayoutAlgorithm::UpdateMarginStrut(const NGMarginStrut& from) {
NGConstraintSpace*
NGBlockLayoutAlgorithm::CreateConstraintSpaceForCurrentChild() const {
DCHECK(current_child_);
- space_builder_->SetIsNewFormattingContext(
- IsNewFormattingContextForInFlowBlockLevelChild(ConstraintSpace(),
- CurrentChildStyle()));
+ space_builder_
+ ->SetIsNewFormattingContext(
+ IsNewFormattingContextForInFlowBlockLevelChild(ConstraintSpace(),
+ CurrentChildStyle()))
+ .SetWritingMode(
+ FromPlatformWritingMode(CurrentChildStyle().getWritingMode()))
+ .SetTextDirection(CurrentChildStyle().direction());
NGConstraintSpace* child_space = space_builder_->ToConstraintSpace();
// TODO(layout-ng): Set offset through the space builder.

Powered by Google App Engine
This is Rietveld 408576698