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

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

Issue 2237473003: [layoutng] Add helper functions to compute lengths (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format 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..894b00c4a227a8802d92a137f327495286c620c4 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
@@ -7,6 +7,7 @@
#include "core/layout/LayoutBox.h"
#include "core/layout/ng/ng_constraint_space.h"
#include "core/layout/ng/ng_fragment.h"
+#include "core/layout/ng/ng_length_utils.h"
#include "core/style/ComputedStyle.h"
#include "platform/LengthFunctions.h"
@@ -19,15 +20,15 @@ NGBlockLayoutAlgorithm::NGBlockLayoutAlgorithm(
NGFragment* NGBlockLayoutAlgorithm::layout(
const NGConstraintSpace& constraintSpace) {
- LayoutUnit inlineSize = valueForLength(m_style->logicalWidth(),
- constraintSpace.inlineContainerSize());
- LayoutUnit blockSize = valueForLength(m_style->logicalHeight(),
- constraintSpace.blockContainerSize());
+ LayoutUnit inlineSize =
+ computeInlineSizeForFragment(constraintSpace, *m_style);
for (NGBox curr = m_firstChild; curr; curr.nextSibling()) {
curr.layout(constraintSpace);
}
+ LayoutUnit blockSize =
+ computeBlockSizeForFragment(constraintSpace, *m_style, LayoutUnit());
return new NGFragment(inlineSize, blockSize, inlineSize, blockSize);
}
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/layout/ng/ng_length_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698