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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2037383002: [css-grid] Fix definite/indefinite size detection on block axis (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-percentage-widths
Patch Set: New version getting rid of hasDefiniteLogicalHeight() Created 4 years, 6 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/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 1cbedcad8db3996a92f175d35cad6c5aeda90a76..ff110abb401004b70019bbe9231463d1d8d49e32 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -2731,7 +2731,7 @@ LayoutUnit LayoutBox::computePercentageLogicalHeight(const Length& height) const
availableHeight = containingBlockChild->containingBlockLogicalWidthForContent();
} else if (stretchedFlexHeight != LayoutUnit(-1)) {
availableHeight = stretchedFlexHeight;
- } else if (hasOverrideContainingBlockLogicalHeight()) {
+ } else if (hasOverrideContainingBlockLogicalHeight() && !isOutOfFlowPositionedWithSpecifiedHeight) {
availableHeight = overrideContainingBlockContentLogicalHeight();
} else if (cbstyle.logicalHeight().isFixed()) {
LayoutUnit contentBoxHeight = cb->adjustContentBoxLogicalHeightForBoxSizing(cbstyle.logicalHeight().value());
@@ -4282,23 +4282,6 @@ bool LayoutBox::percentageLogicalHeightIsResolvable() const
return computePercentageLogicalHeight(fakeLength) != -1;
}
-bool LayoutBox::hasDefiniteLogicalHeight() const
-{
- const Length& logicalHeight = style()->logicalHeight();
- if (logicalHeight.isIntrinsicOrAuto())
- return false;
- if (logicalHeight.isFixed())
- return true;
- // The size of the containing block of an absolutely positioned element is always definite with respect to that
- // element (http://dev.w3.org/csswg/css-sizing-3/#definite).
- if (isOutOfFlowPositioned())
- return true;
- if (hasOverrideContainingBlockLogicalHeight())
- return overrideContainingBlockContentLogicalHeight() != -1;
-
- return percentageLogicalHeightIsResolvable();
-}
-
bool LayoutBox::hasUnsplittableScrollingOverflow() const
{
// We will paginate as long as we don't scroll overflow in the pagination direction.

Powered by Google App Engine
This is Rietveld 408576698