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

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

Issue 1383003002: [css-grid] Fix definite/indefinite size detection for abspos elements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: New version Created 4 years, 8 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 9655aac8a07ee74ede97abbb5aa82cc18d1b38e5..87af6757f5577015b0eef52df260da6b0d19df84 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -4145,9 +4145,7 @@ static bool logicalWidthIsResolvable(const LayoutBox& layoutBox)
return true;
if (box->isLayoutView())
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 (box->isOutOfFlowPositioned())
+ if (box->isOutOfFlowPositioned() && !box->style()->logicalLeft().isAuto() && !box->style()->logicalRight().isAuto())
mstensho (USE GERRIT) 2016/04/08 09:06:35 maybe isFixed() would be a better choice than !isA
return true;
if (box->hasOverrideContainingBlockLogicalWidth())
return box->overrideContainingBlockContentLogicalWidth() != -1;
@@ -4171,16 +4169,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())
mstensho (USE GERRIT) 2016/04/08 09:06:35 Ditto.
return true;
if (hasOverrideContainingBlockLogicalHeight())
return overrideContainingBlockContentLogicalHeight() != -1;
+ if (logicalHeight.isIntrinsicOrAuto())
+ return false;
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