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

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

Issue 2750213002: [LayoutNG] Don't pass parent NGFragmentBuilder into NGLineBuilder. (Closed)
Patch Set: rebase fix. Created 3 years, 9 months 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_line_builder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc b/third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc
index 23456ec01553d3bf529eb8e5a24cca953706da55..5e395a79e9fd9c6ab22e2802056abec530eea6c1 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc
@@ -22,11 +22,9 @@
namespace blink {
NGLineBuilder::NGLineBuilder(NGInlineNode* inline_box,
- NGConstraintSpace* constraint_space,
- NGFragmentBuilder* containing_block_builder)
+ NGConstraintSpace* constraint_space)
: inline_box_(inline_box),
constraint_space_(constraint_space),
- containing_block_builder_(containing_block_builder),
container_builder_(NGPhysicalFragment::kFragmentBox, inline_box_),
container_layout_result_(nullptr),
is_horizontal_writing_mode_(
@@ -309,13 +307,17 @@ void NGLineBuilder::PlaceItems(
} else {
LayoutObject* layout_object = item.GetLayoutObject();
if (layout_object->isOutOfFlowPositioned()) {
- if (containing_block_builder_) {
- // Absolute positioning blockifies the box's display type.
- // https://drafts.csswg.org/css-display/#transformations
- containing_block_builder_->AddOutOfFlowChildCandidate(
- new NGBlockNode(layout_object),
- NGLogicalOffset(line_box_data.inline_size, content_size_));
- }
+ // Absolute positioning blockifies the box's display type.
+ // https://drafts.csswg.org/css-display/#transformations
+ //
+ // TODO(layout-dev): Report the correct static position for the out of
+ // flow descendant. We can't do this here yet as it doesn't know the
+ // size of the line box.
+ container_builder_.AddOutOfFlowDescendant(
+ new NGBlockNode(layout_object),
+ NGStaticPosition::Create(ConstraintSpace().WritingMode(),
+ ConstraintSpace().Direction(),
+ NGPhysicalOffset()));
continue;
} else if (layout_object->isFloating()) {
// TODO(kojii): Implement float.
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_line_builder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698