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

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

Issue 2807113002: [LayoutNG] Use NGLogical[Offset|Size] for NGFragment
Patch Set: Created 3 years, 8 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
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 0668e1334d4f58568a4d0c5aa1f9607646322cde..07a9167200ffac84055754f72c1952cd6eede497 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
@@ -413,10 +413,11 @@ void NGBlockLayoutAlgorithm::FinishChildLayout(
// <div style="margin-top: 8px"></div>
// <div style="margin-top: 10px"></div>
// </div>
- if (fragment.BlockSize())
- content_size_ = fragment.BlockSize() + logical_offset.block_offset;
+ NGLogicalSize fragment_size = fragment.Size();
+ if (fragment_size.block_size)
+ content_size_ = fragment_size.block_size + logical_offset.block_offset;
max_inline_size_ =
- std::max(max_inline_size_, fragment.InlineSize() +
+ std::max(max_inline_size_, fragment_size.inline_size +
curr_child_margins_.InlineSum() +
border_and_padding_.InlineSum());

Powered by Google App Engine
This is Rietveld 408576698