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

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: 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css-grid-layout/positioned-grid-container-percentage-tracks.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8da0e4926367ac8fd41d829a3a7463ab4a6836c4 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -4285,16 +4285,14 @@ bool LayoutBox::percentageLogicalHeightIsResolvable() const
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())
+ if (isOutOfFlowPositioned() && !style()->logicalTop().isAuto() && !style()->logicalBottom().isAuto())
return true;
if (hasOverrideContainingBlockLogicalHeight())
return overrideContainingBlockContentLogicalHeight() != -1;
+ if (logicalHeight.isIntrinsicOrAuto())
+ return false;
cbiesinger1 2016/06/06 16:46:02 This is not correct, if a grid is a flex item it c
Manuel Rego 2016/06/07 09:05:55 Yes, this is wrong for those cases. But it was alr
return percentageLogicalHeightIsResolvable();
}
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css-grid-layout/positioned-grid-container-percentage-tracks.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698