From 2df582470ec067678c3a2aeaf195687595a7a27b Mon Sep 17 00:00:00 2001 From: Simon Montagu Date: Sun, 18 Jan 2015 22:01:57 -0800 Subject: [PATCH] Bug 1121748 - patch 1 - Make sure to update the frame dimensions before calling ApplyRelativePositioning. r=jfkthame --- layout/generic/nsBlockReflowContext.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/layout/generic/nsBlockReflowContext.cpp b/layout/generic/nsBlockReflowContext.cpp index 5d55bea53d74..bf0eef81b9a4 100644 --- a/layout/generic/nsBlockReflowContext.cpp +++ b/layout/generic/nsBlockReflowContext.cpp @@ -428,6 +428,10 @@ nsBlockReflowContext::PlaceBlock(const nsHTMLReflowState& aReflowState, LogicalPoint logPos = LogicalPoint(mWritingMode, mICoord, mBCoord). ConvertTo(frameWM, mWritingMode, mContainerWidth - mMetrics.Width()); + + // ApplyRelativePositioning in right-to-left writing modes needs to + // know the updated frame width + mFrame->SetSize(mWritingMode, mMetrics.Size(mWritingMode)); aReflowState.ApplyRelativePositioning(&logPos, mContainerWidth); // Now place the frame and complete the reflow process