mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
Bug 1646639 - Don't recursively apply the line's start-offset and text-indent to children of a first-line frame. r=dholbert
But do apply any adjustment needed for text-align to the first-line frame itself. Differential Revision: https://phabricator.services.mozilla.com/D82725
This commit is contained in:
parent
10b6298357
commit
953fcef392
@ -1486,6 +1486,9 @@ nscoord nsBidiPresUtils::ReorderFrames(nsIFrame* aFirstFrameOnLine,
|
||||
// aNumFramesOnLine to -1 makes InitLogicalArrayFromLine look at all of
|
||||
// them.
|
||||
aNumFramesOnLine = -1;
|
||||
// As the line frame itself has been adjusted at its inline-start position
|
||||
// by the caller, we do not want to apply this to its children.
|
||||
aStart = 0;
|
||||
}
|
||||
|
||||
BidiLineData bld(aFirstFrameOnLine, aNumFramesOnLine);
|
||||
|
@ -3186,6 +3186,14 @@ void nsLineLayout::TextAlignLine(nsLineBox* aLine, bool aIsLastLine) {
|
||||
lineWM, mContainerSize,
|
||||
psd->mIStart + mTextIndent + dx);
|
||||
if (dx) {
|
||||
if (startFrame->mFrame->IsLineFrame()) {
|
||||
// If startFrame is a ::first-line frame, the mIStart and mTextIndent
|
||||
// offsets will already have been applied to its position. But we still
|
||||
// need to apply the text-align adjustment |dx| to its position.
|
||||
startFrame->mBounds.IStart(lineWM) += dx;
|
||||
startFrame->mFrame->SetRect(lineWM, startFrame->mBounds,
|
||||
ContainerSizeForSpan(psd));
|
||||
}
|
||||
aLine->IndentBy(dx, ContainerSize());
|
||||
}
|
||||
} else if (dx) {
|
||||
|
@ -1,4 +0,0 @@
|
||||
[floating-first-letter-05d0.html]
|
||||
type: reftest
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1495674
|
Loading…
Reference in New Issue
Block a user