From 66976fd0632bab620d97d0ec0a49e3d99da0b935 Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Wed, 1 Apr 2015 16:50:11 +0100 Subject: [PATCH] Bug 1145936 - Fix sizing of foreignObject with vertical writing mode. r=smontagu --- layout/svg/nsSVGForeignObjectFrame.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layout/svg/nsSVGForeignObjectFrame.cpp b/layout/svg/nsSVGForeignObjectFrame.cpp index a0e5d82ba1b..1f9cca7ea0d 100644 --- a/layout/svg/nsSVGForeignObjectFrame.cpp +++ b/layout/svg/nsSVGForeignObjectFrame.cpp @@ -539,7 +539,7 @@ nsSVGForeignObjectFrame::DoReflow() WritingMode wm = kid->GetWritingMode(); nsHTMLReflowState reflowState(presContext, kid, &renderingContext, - LogicalSize(wm, GetLogicalSize(wm).ISize(wm), + LogicalSize(wm, ISize(wm), NS_UNCONSTRAINEDSIZE)); nsHTMLReflowMetrics desiredSize(reflowState); nsReflowStatus status; @@ -550,9 +550,9 @@ nsSVGForeignObjectFrame::DoReflow() reflowState.ComputedPhysicalMargin() == nsMargin(0, 0, 0, 0), "style system should ensure that :-moz-svg-foreign-content " "does not get styled"); - NS_ASSERTION(reflowState.ComputedWidth() == mRect.width, + NS_ASSERTION(reflowState.ComputedISize() == ISize(wm), "reflow state made child wrong size"); - reflowState.SetComputedHeight(mRect.height); + reflowState.SetComputedBSize(BSize(wm)); ReflowChild(kid, presContext, desiredSize, reflowState, 0, 0, NS_FRAME_NO_MOVE_FRAME, status);