From 4d85275dd57f86042dccbc27ffc30d5f5f5a90eb Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Thu, 11 Dec 2014 15:13:42 +1100 Subject: [PATCH] Bug 1107721 - Move BeginSpan down for attaching annotation containers to the base container. r=dbaron --HG-- extra : source : 40b7661585537768ccc5bbac9c99ff70713815c9 extra : histedit_source : d9cd1403ce80c070fc3e3a1d66f9e9114bc0f1e3 --- layout/generic/nsRubyBaseContainerFrame.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/layout/generic/nsRubyBaseContainerFrame.cpp b/layout/generic/nsRubyBaseContainerFrame.cpp index 765330553698..779e9187246d 100644 --- a/layout/generic/nsRubyBaseContainerFrame.cpp +++ b/layout/generic/nsRubyBaseContainerFrame.cpp @@ -273,14 +273,6 @@ nsRubyBaseContainerFrame::Reflow(nsPresContext* aPresContext, aStatus = NS_FRAME_COMPLETE; WritingMode lineWM = aReflowState.mLineLayout->GetWritingMode(); - WritingMode frameWM = aReflowState.GetWritingMode(); - LogicalMargin borderPadding = aReflowState.ComputedLogicalBorderPadding(); - nscoord startEdge = borderPadding.IStart(frameWM); - nscoord endEdge = aReflowState.AvailableISize() - borderPadding.IEnd(frameWM); - - aReflowState.mLineLayout->BeginSpan(this, &aReflowState, - startEdge, endEdge, &mBaseline); - LogicalSize availSize(lineWM, aReflowState.AvailableWidth(), aReflowState.AvailableHeight()); @@ -339,6 +331,13 @@ nsRubyBaseContainerFrame::Reflow(nsPresContext* aPresContext, false, false, lineWM, containerWidth); } + WritingMode frameWM = aReflowState.GetWritingMode(); + LogicalMargin borderPadding = aReflowState.ComputedLogicalBorderPadding(); + nscoord startEdge = borderPadding.IStart(frameWM); + nscoord endEdge = aReflowState.AvailableISize() - borderPadding.IEnd(frameWM); + aReflowState.mLineLayout->BeginSpan(this, &aReflowState, + startEdge, endEdge, &mBaseline); + // Reflow pairs excluding any span nscoord pairsISize = ReflowPairs(aPresContext, aReflowState, rtcReflowStates, aStatus);