Chromium Code Reviews| 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 b79d4d6bbb6958acc35faf9942a375174d0ed3c5..c072de52ded346151f47082ced39804dea777108 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp |
| @@ -555,7 +555,7 @@ LayoutBlock* LayoutBoxModelObject::containingBlockForAutoHeightDetection(Length |
| return cb; |
| } |
| -bool LayoutBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight() const |
| +bool LayoutBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight(bool checkingContainingBlock) const |
|
svillar
2016/07/07 11:45:48
It's usually considered better to use an enum inst
Manuel Rego
2016/07/07 14:40:57
Ok, I can change this I'm thinking in something li
cbiesinger
2016/07/07 17:34:27
To make sure I understand, callers should never pa
Manuel Rego
2016/07/08 07:57:04
Yeah that's the idea.
Probably it'd be better tha
|
| { |
| const LayoutBox* thisBox = isBox() ? toLayoutBox(this) : nullptr; |
| Length logicalHeightLength = style()->logicalHeight(); |
| @@ -567,6 +567,12 @@ bool LayoutBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight() const |
| if (flexBox.childLogicalHeightForPercentageResolution(*thisBox) != LayoutUnit(-1)) |
| return false; |
| } |
| + if (thisBox && thisBox->isGridItem()) { |
| + if (checkingContainingBlock && thisBox->hasOverrideLogicalContentHeight()) |
| + return false; |
| + if (!checkingContainingBlock && thisBox->hasOverrideContainingBlockLogicalHeight()) |
| + return false; |
| + } |
| if (logicalHeightLength.isAuto()) |
| return true; |
| @@ -575,7 +581,7 @@ bool LayoutBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight() const |
| // If the height of the containing block computes to 'auto', then it hasn't been 'specified explicitly'. |
| if (cb) |
| - return cb->hasAutoHeightOrContainingBlockWithAutoHeight(); |
| + return cb->hasAutoHeightOrContainingBlockWithAutoHeight(true); |
| return false; |
| } |