summaryrefslogtreecommitdiffstats
path: root/layout/generic/ReflowInput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layout/generic/ReflowInput.cpp')
-rw-r--r--layout/generic/ReflowInput.cpp11
1 files changed, 4 insertions, 7 deletions
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;
}