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

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

Issue 2230683003: [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 944f0a187ac92aa6bda220a91ed0179720a49e96..3e1d1630434f73a56f86d984bc21942213b31d2a 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
@@ -14,8 +14,8 @@ namespace blink {
NGBlockLayoutAlgorithm::NGBlockLayoutAlgorithm(
PassRefPtr<const ComputedStyle> style,
- NGBox firstChild)
- : m_style(style), m_firstChild(firstChild) {}
+ NGBoxIterator ngBoxIterator)
+ : m_style(style), m_ngBoxIterator(ngBoxIterator) {}
NGFragment* NGBlockLayoutAlgorithm::layout(
const NGConstraintSpace& constraintSpace) {
@@ -24,7 +24,7 @@ NGFragment* NGBlockLayoutAlgorithm::layout(
LayoutUnit blockSize = valueForLength(m_style->logicalHeight(),
constraintSpace.blockContainerSize());
- for (NGBox curr = m_firstChild; curr; curr.nextSibling()) {
+ for (NGBox curr = m_ngBoxIterator.first(); curr; m_ngBoxIterator.next()) {
curr.layout(constraintSpace);
}

Powered by Google App Engine
This is Rietveld 408576698