mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Take left border+padding into account when calculating distance from block edge for TAB. b=430926 r+sr=roc
This commit is contained in:
parent
2b1bc4f9bd
commit
bd4639345b
@ -348,9 +348,14 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the horizontal offset of the current reflowed-frame from the
|
||||
* edge of the line container. This is always positive, measured from
|
||||
* Returns the accumulated advance width of frames before the current frame
|
||||
* 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.
|
||||
* 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();
|
||||
|
||||
|
@ -5531,7 +5531,9 @@ nsTextFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
iter.SetOriginalOffset(offset);
|
||||
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,
|
||||
lineContainer, xOffsetForTabs);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user