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 224f9bc554f580b63ce790d92f688e6c6ef174f3..38b43b111befbc47c63be3a5c7f805196c2ff83d 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 |
@@ -245,6 +245,15 @@ NGLayoutStatus NGBlockLayoutAlgorithm::Layout( |
} |
case kStateChildLayout: { |
if (current_child_) { |
+ // TODO(atotic): uncomment this code when implementing oof layout. |
+ // This code cannot be turned on because it prevents layout of |
+ // oof children, and non-layedout objects trigger a DCHECK. |
+ // EPosition position = current_child_->Style()->position(); |
+ // if ((position == AbsolutePosition || position == FixedPosition)) { |
+ // builder_->AddOutOfFlowCandidateChild(current_child_, |
+ // GetChildSpaceOffset()); |
+ // } |
+ // else |
if (!LayoutCurrentChild()) |
return kNotFinished; |
current_child_ = current_child_->NextSibling(); |
@@ -434,8 +443,7 @@ NGBlockLayoutAlgorithm::CreateConstraintSpaceForCurrentChild() const { |
space_builder_->ToConstraintSpace()); |
// TODO(layout-ng): Set offset through the space builder. |
- child_space->SetOffset( |
- NGLogicalOffset(border_and_padding_.inline_start, content_size_)); |
+ child_space->SetOffset(GetChildSpaceOffset()); |
// TODO(layout-ng): avoid copying here. A child and parent constraint spaces |
// should share the same backing space. |