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

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

Issue 2458023002: [css-grid] Fix percentage height resolution on replaced elements (Closed)
Patch Set: Created 4 years, 2 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/Source/core/layout/LayoutBoxModelObject.h ('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/LayoutBoxModelObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
index 653dffb1188e470df8c63354f5ee628f2b27cf94..da20d91b76b7e75db4c976ee0328591e22c9591f 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -690,8 +690,8 @@ LayoutBlock* LayoutBoxModelObject::containingBlockForAutoHeightDetection(
return cb;
}
-bool LayoutBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight(
- bool checkingContainingBlock) const {
+bool LayoutBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight()
+ const {
// TODO(rego): Check if we can somehow reuse LayoutBlock::
// availableLogicalHeightForPercentageComputation() (see crbug.com/635655).
const LayoutBox* thisBox = isBox() ? toLayoutBox(this) : nullptr;
@@ -705,13 +705,9 @@ bool LayoutBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight(
LayoutUnit(-1))
return false;
}
- if (thisBox && thisBox->isGridItem()) {
- if (checkingContainingBlock && thisBox->hasOverrideLogicalContentHeight())
- return false;
- if (!checkingContainingBlock &&
- thisBox->hasOverrideContainingBlockLogicalHeight())
- return false;
- }
+ if (thisBox && thisBox->isGridItem() &&
+ thisBox->hasOverrideContainingBlockLogicalHeight())
+ return false;
if (logicalHeightLength.isAuto() &&
!isOutOfFlowPositionedWithImplicitHeight(this))
return true;
@@ -719,16 +715,10 @@ bool LayoutBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight(
if (document().inQuirksMode())
return false;
- // If the height of the containing block computes to 'auto', then it hasn't
- // been 'specified explicitly'.
if (cb)
- return cb->hasAutoHeightOrContainingBlockWithAutoHeight(true);
- return false;
-}
+ return !cb->hasDefiniteLogicalHeight();
-bool LayoutBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight()
- const {
- return hasAutoHeightOrContainingBlockWithAutoHeight(false);
+ return false;
}
LayoutSize LayoutBoxModelObject::relativePositionOffset() const {
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698