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

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

Issue 2070823002: Replaced elements also need to check for flexbox when computing height (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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/css3/flexbox/percentage-height-replaced-element.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/LayoutBoxModelObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
index cb416dca18088a6b66608b98352cce926530b206..0c3af3981485bb9900415ac8955d9ffe08246593 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -30,6 +30,7 @@
#include "core/html/HTMLBodyElement.h"
#include "core/layout/ImageQualityController.h"
#include "core/layout/LayoutBlock.h"
+#include "core/layout/LayoutFlexibleBox.h"
#include "core/layout/LayoutGeometryMap.h"
#include "core/layout/LayoutInline.h"
#include "core/layout/LayoutView.h"
@@ -577,6 +578,12 @@ LayoutBlock* LayoutBoxModelObject::containingBlockForAutoHeightDetection(Length
bool LayoutBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight() const
{
+ const LayoutBox* thisBox = isBox() ? toLayoutBox(this) : nullptr;
+ if (thisBox && thisBox->isFlexItem()) {
+ LayoutFlexibleBox& flexBox = toLayoutFlexibleBox(*parent());
+ if (flexBox.childLogicalHeightForPercentageResolution(*thisBox) != LayoutUnit(-1))
+ return false;
+ }
Length logicalHeightLength = style()->logicalHeight();
if (logicalHeightLength.isAuto())
return true;
« no previous file with comments | « third_party/WebKit/LayoutTests/css3/flexbox/percentage-height-replaced-element.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698