mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-06-14 00:29:43 +00:00
#612: M1224669
This commit is contained in:
parent
9d3a836029
commit
819a494138
|
@ -7938,7 +7938,9 @@ nsTextFrame::AddInlineMinISizeForFlow(nsRenderingContext *aRenderingContext,
|
||||||
|
|
||||||
if (i > wordStart) {
|
if (i > wordStart) {
|
||||||
nscoord width =
|
nscoord width =
|
||||||
NSToCoordCeilClamped(textRun->GetAdvanceWidth(wordStart, i - wordStart, &provider));
|
NSToCoordCeilClamped(textRun->GetAdvanceWidth(wordStart, i - wordStart,
|
||||||
|
&provider));
|
||||||
|
width = std::max(0, width);
|
||||||
aData->currentLine = NSCoordSaturatingAdd(aData->currentLine, width);
|
aData->currentLine = NSCoordSaturatingAdd(aData->currentLine, width);
|
||||||
aData->atStartOfLine = false;
|
aData->atStartOfLine = false;
|
||||||
|
|
||||||
|
@ -7950,8 +7952,11 @@ nsTextFrame::AddInlineMinISizeForFlow(nsRenderingContext *aRenderingContext,
|
||||||
aData->trailingWhitespace += width;
|
aData->trailingWhitespace += width;
|
||||||
} else {
|
} else {
|
||||||
// Some non-whitespace so the old trailingWhitespace is no longer trailing
|
// Some non-whitespace so the old trailingWhitespace is no longer trailing
|
||||||
aData->trailingWhitespace =
|
nscoord wsWidth =
|
||||||
NSToCoordCeilClamped(textRun->GetAdvanceWidth(trimStart, i - trimStart, &provider));
|
NSToCoordCeilClamped(textRun->GetAdvanceWidth(trimStart,
|
||||||
|
i - trimStart,
|
||||||
|
&provider));
|
||||||
|
aData->trailingWhitespace = std::max(0, wsWidth);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
aData->trailingWhitespace = 0;
|
aData->trailingWhitespace = 0;
|
||||||
|
@ -8090,7 +8095,9 @@ nsTextFrame::AddInlinePrefISizeForFlow(nsRenderingContext *aRenderingContext,
|
||||||
|
|
||||||
if (i > lineStart) {
|
if (i > lineStart) {
|
||||||
nscoord width =
|
nscoord width =
|
||||||
NSToCoordCeilClamped(textRun->GetAdvanceWidth(lineStart, i - lineStart, &provider));
|
NSToCoordCeilClamped(textRun->GetAdvanceWidth(lineStart, i - lineStart,
|
||||||
|
&provider));
|
||||||
|
width = std::max(0, width);
|
||||||
aData->currentLine = NSCoordSaturatingAdd(aData->currentLine, width);
|
aData->currentLine = NSCoordSaturatingAdd(aData->currentLine, width);
|
||||||
|
|
||||||
if (collapseWhitespace) {
|
if (collapseWhitespace) {
|
||||||
|
@ -8101,8 +8108,11 @@ nsTextFrame::AddInlinePrefISizeForFlow(nsRenderingContext *aRenderingContext,
|
||||||
aData->trailingWhitespace += width;
|
aData->trailingWhitespace += width;
|
||||||
} else {
|
} else {
|
||||||
// Some non-whitespace so the old trailingWhitespace is no longer trailing
|
// Some non-whitespace so the old trailingWhitespace is no longer trailing
|
||||||
aData->trailingWhitespace =
|
nscoord wsWidth =
|
||||||
NSToCoordCeilClamped(textRun->GetAdvanceWidth(trimStart, i - trimStart, &provider));
|
NSToCoordCeilClamped(textRun->GetAdvanceWidth(trimStart,
|
||||||
|
i - trimStart,
|
||||||
|
&provider));
|
||||||
|
aData->trailingWhitespace = std::max(0, wsWidth);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
aData->trailingWhitespace = 0;
|
aData->trailingWhitespace = 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user