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

Unified Diff: Source/core/rendering/RenderBox.cpp

Issue 914993003: [CSS Grid Layout] Determine definite/indefinite size properly in nested grids (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index 2cf62d56b3ec3e058d0507708a4d31f92305419f..dbbf24bbcfb5e20ccddb16597b5e2c4179d0cd1c 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -4179,8 +4179,12 @@ void RenderBox::clearLayoutOverflow()
bool RenderBox::logicalWidthIsResolvableFromBlock(const RenderBlock* containingBlock)
Julien - ping for review 2015/02/18 22:13:16 This function looks like it could have static link
Manuel Rego 2015/02/25 16:57:59 This is marked as static in LayoutBox.h like perce
{
const RenderBlock* cb = containingBlock;
- while (!cb->isRenderView() && !cb->isOutOfFlowPositioned() && (cb->style()->logicalWidth().isAuto() || cb->isAnonymousBlock()))
+ while (!cb->isRenderView() && !cb->isOutOfFlowPositioned() && (cb->style()->logicalWidth().isAuto() || cb->isAnonymousBlock())) {
+ if (cb->hasOverrideContainingBlockLogicalWidth())
+ return cb->overrideContainingBlockContentLogicalWidth() != -1;
Julien - ping for review 2015/02/18 22:13:16 I am concerned about this logic needing the bits i
Manuel Rego 2015/02/25 16:57:59 Done.
+
cb = cb->containingBlock();
+ }
if (cb->style()->logicalWidth().isFixed())
return true;
@@ -4205,6 +4209,8 @@ bool RenderBox::hasDefiniteLogicalWidth() const
// element (http://dev.w3.org/csswg/css-sizing-3/#definite).
if (isOutOfFlowPositioned())
return true;
+ if (hasOverrideContainingBlockLogicalWidth())
+ return overrideContainingBlockContentLogicalWidth() != -1;
return RenderBox::logicalWidthIsResolvableFromBlock(containingBlock());
}
@@ -4226,6 +4232,9 @@ bool RenderBox::percentageLogicalHeightIsResolvableFromBlock(const RenderBlock*
while (!cb->isRenderView() && !cb->isBody() && !cb->isTableCell() && !cb->isOutOfFlowPositioned() && cb->style()->logicalHeight().isAuto()) {
if (!inQuirksMode && !cb->isAnonymousBlock())
break;
+ if (cb->hasOverrideContainingBlockLogicalHeight())
+ return cb->overrideContainingBlockContentLogicalHeight() != -1;
+
cb = cb->containingBlock();
}
@@ -4269,6 +4278,8 @@ bool RenderBox::hasDefiniteLogicalHeight() const
// element (http://dev.w3.org/csswg/css-sizing-3/#definite).
if (isOutOfFlowPositioned())
return true;
+ if (hasOverrideContainingBlockLogicalHeight())
+ return overrideContainingBlockContentLogicalHeight() != -1;
return percentageLogicalHeightIsResolvable(this);
}

Powered by Google App Engine
This is Rietveld 408576698