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

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

Issue 2234263002: Revert of [LayoutNG] Initial implementation of NGBoxIterator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 0579f117a4fef2ab0c5681d0ce6bb25e805189b8..56d0fad1e665d019a98e43b8fa0610599e88193c 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
@@ -15,8 +15,8 @@
NGBlockLayoutAlgorithm::NGBlockLayoutAlgorithm(
PassRefPtr<const ComputedStyle> style,
- NGBoxIterator boxIterator)
- : m_style(style), m_boxIterator(boxIterator) {}
+ NGBox firstChild)
+ : m_style(style), m_firstChild(firstChild) {}
NGFragment* NGBlockLayoutAlgorithm::layout(
const NGConstraintSpace& constraintSpace) {
@@ -24,8 +24,9 @@
computeInlineSizeForFragment(constraintSpace, *m_style);
HeapVector<Member<const NGFragmentBase>> childFragments;
+
LayoutUnit contentSize;
- for (NGBox curr = m_boxIterator.first(); curr; m_boxIterator.next()) {
+ for (NGBox curr = m_firstChild; curr; curr.nextSibling()) {
NGFragment* fragment = curr.layout(constraintSpace);
// TODO(layout-ng): Take margins into account
fragment->setOffset(LayoutUnit(), contentSize);

Powered by Google App Engine
This is Rietveld 408576698