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

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

Issue 2257223002: Allow using overrideContainingBlockContentLogical{Width,Height} outside of grid (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_box.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_box.cc b/third_party/WebKit/Source/core/layout/ng/ng_box.cc
index d5e1bafae6771664a5536c84479b44c6b06716f7..b2c849938f4d7cea0e96a73e6f65b2e7d7c51c45 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_box.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_box.cc
@@ -28,13 +28,20 @@ NGFragment* NGBox::layout(const NGConstraintSpace& constraintSpace) {
toLayoutBlock(m_layoutBox)->layoutPositionedObjects(true);
m_layoutBox->clearNeedsLayout();
} else {
+ // TODO(layout-ng): If fixedSize is true, set the override width/height too
+ NGLogicalSize containerSize = constraintSpace.ContainerSize();
+ m_layoutBox->setOverrideContainingBlockContentLogicalWidth(
+ containerSize.inlineSize);
+ m_layoutBox->setOverrideContainingBlockContentLogicalHeight(
+ containerSize.blockSize);
if (m_layoutBox->isLayoutNGBlockFlow() && m_layoutBox->needsLayout()) {
toLayoutNGBlockFlow(m_layoutBox)->LayoutBlockFlow::layoutBlock(true);
} else {
m_layoutBox->layoutIfNeeded();
}
LayoutRect overflow = m_layoutBox->layoutOverflowRect();
- // This does not handle writing modes correctly (for overflow & the enums)
+ // TODO(layout-ng): This does not handle writing modes correctly (for
+ // overflow & the enums)
fragment = new NGFragment(
m_layoutBox->logicalWidth(), m_layoutBox->logicalHeight(),
overflow.width(), overflow.height(), HorizontalTopBottom, LeftToRight);

Powered by Google App Engine
This is Rietveld 408576698