Take left border+padding into account when calculating distance from block edge for TAB. b=430926 r+sr=roc
This commit is contained in:
@@ -348,9 +348,14 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the horizontal offset of the current reflowed-frame from the
|
* Returns the accumulated advance width of frames before the current frame
|
||||||
* edge of the line container. This is always positive, measured from
|
* on the line, plus the line container's left border+padding.
|
||||||
|
* This is always positive, the advance width is measured from
|
||||||
* the right edge for RTL blocks and from the left edge for LTR blocks.
|
* the right edge for RTL blocks and from the left edge for LTR blocks.
|
||||||
|
* In other words, the current frame's distance from the line container's
|
||||||
|
* start content edge is:
|
||||||
|
* <code>GetCurrentFrameXDistanceFromBlock() - lineContainer->GetUsedBorderAndPadding().left</code>
|
||||||
|
* Note the use of <code>.left</code> for both LTR and RTL line containers.
|
||||||
*/
|
*/
|
||||||
nscoord GetCurrentFrameXDistanceFromBlock();
|
nscoord GetCurrentFrameXDistanceFromBlock();
|
||||||
|
|
||||||
|
|||||||
@@ -5531,7 +5531,9 @@ nsTextFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
|
|
||||||
iter.SetOriginalOffset(offset);
|
iter.SetOriginalOffset(offset);
|
||||||
nscoord xOffsetForTabs = (mTextRun->GetFlags() & nsTextFrameUtils::TEXT_HAS_TAB) ?
|
nscoord xOffsetForTabs = (mTextRun->GetFlags() & nsTextFrameUtils::TEXT_HAS_TAB) ?
|
||||||
lineLayout.GetCurrentFrameXDistanceFromBlock() : -1;
|
(lineLayout.GetCurrentFrameXDistanceFromBlock() -
|
||||||
|
lineContainer->GetUsedBorderAndPadding().left)
|
||||||
|
: -1;
|
||||||
PropertyProvider provider(mTextRun, textStyle, frag, this, iter, length,
|
PropertyProvider provider(mTextRun, textStyle, frag, this, iter, length,
|
||||||
lineContainer, xOffsetForTabs);
|
lineContainer, xOffsetForTabs);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user