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..bbc57c4eb27122c26b8c60cfb8e8467565b2910b 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 |
@@ -163,6 +163,7 @@ bool IsNewFormattingContextForInFlowBlockLevelChild( |
return true; |
EDisplay display = style.display(); |
+ |
ikilpatrick
2016/12/02 17:47:05
remove from this patch.
atotic
2016/12/02 19:55:15
done
|
if (display == EDisplay::Grid || display == EDisplay::Flex || |
display == EDisplay::WebkitBox) |
return true; |
@@ -197,7 +198,6 @@ NGLayoutStatus NGBlockLayoutAlgorithm::Layout( |
case kStateInit: { |
border_and_padding_ = |
ComputeBorders(Style()) + ComputePadding(ConstraintSpace(), Style()); |
- |
ikilpatrick
2016/12/02 17:47:05
remove from this patch.
atotic
2016/12/02 19:55:15
done
|
WTF::Optional<MinAndMaxContentSizes> sizes; |
if (NeedMinAndMaxContentSizes(Style())) { |
// TODOO(layout-ng): Implement |
@@ -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. |