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

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

Issue 2238523002: [LayoutNG] Initial version of NGBox wrapper object. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/mutableStyle/style 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 be7236629f3e953921dd7d25078f1b020a646e57..944f0a187ac92aa6bda220a91ed0179720a49e96 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
@@ -12,8 +12,10 @@
namespace blink {
-NGBlockLayoutAlgorithm::NGBlockLayoutAlgorithm(const ComputedStyle* style)
- : m_style(style) {}
+NGBlockLayoutAlgorithm::NGBlockLayoutAlgorithm(
+ PassRefPtr<const ComputedStyle> style,
+ NGBox firstChild)
+ : m_style(style), m_firstChild(firstChild) {}
NGFragment* NGBlockLayoutAlgorithm::layout(
const NGConstraintSpace& constraintSpace) {
@@ -21,6 +23,11 @@ NGFragment* NGBlockLayoutAlgorithm::layout(
constraintSpace.inlineContainerSize());
LayoutUnit blockSize = valueForLength(m_style->logicalHeight(),
constraintSpace.blockContainerSize());
+
+ for (NGBox curr = m_firstChild; curr; curr.nextSibling()) {
+ curr.layout(constraintSpace);
+ }
+
return new NGFragment(inlineSize, blockSize, inlineSize, blockSize);
}

Powered by Google App Engine
This is Rietveld 408576698