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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc

Issue 2540653003: Implement collection of out-of-flow descendants (Closed)
Patch Set: Merge conflicts resolved 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 bcf798ed92f009bfd08003a1c4e34624d5e7168d..d8fae61c705351f28a53f08da44b29cd15bcb792 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
@@ -244,6 +244,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();
@@ -431,8 +440,7 @@ NGBlockLayoutAlgorithm::CreateConstraintSpaceForCurrentChild() const {
NGConstraintSpace* child_space = 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());
return child_space;
}

Powered by Google App Engine
This is Rietveld 408576698