From b12973bc9aa26f548549306eaec4146bf60d65d5 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Fri, 20 Jul 2018 09:09:36 +0200 Subject: Bug 958714 Remove special case for flex & grid items' percent block-axis margin/padding resolution, to align with other browsers --- layout/generic/ReflowInput.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'layout/generic') diff --git a/layout/generic/ReflowInput.cpp b/layout/generic/ReflowInput.cpp index a8756cea2..72624d55c 100644 --- a/layout/generic/ReflowInput.cpp +++ b/layout/generic/ReflowInput.cpp @@ -2142,14 +2142,11 @@ OffsetPercentBasis(const nsIFrame* aFrame, WritingMode aWM, const LogicalSize& aContainingBlockSize) { + // XXX The next patch in this series will get rid of this function and have + // the upstream/downstream code just work with the one nscoord value that + // we'll be dealing with now (which is aContainingBlockSize.ISize(aWM)). LogicalSize offsetPercentBasis = aContainingBlockSize; - if (MOZ_LIKELY(!aFrame->GetParent() || - !aFrame->GetParent()->IsFlexOrGridContainer())) { - offsetPercentBasis.BSize(aWM) = offsetPercentBasis.ISize(aWM); - } else if (offsetPercentBasis.BSize(aWM) == NS_AUTOHEIGHT) { - offsetPercentBasis.BSize(aWM) = 0; - } - + offsetPercentBasis.BSize(aWM) = offsetPercentBasis.ISize(aWM); return offsetPercentBasis; } -- cgit v1.2.3