зеркало из https://github.com/mozilla/gecko-dev.git
Optimized Reflow() some more. In the case where we're not measuring text but
we need to peek ahead and so we need to know the length of the last word, if there's only one word in the text run then we can avoid measuring
This commit is contained in:
Родитель
2c5c80b40d
Коммит
f004ab4be8
|
@ -2611,7 +2611,11 @@ nsTextFrame::Reflow(nsIPresContext& aPresContext,
|
|||
if (!measureText) {
|
||||
// We didn't measure any text so we don't know lastWordWidth.
|
||||
// We have to compute it now
|
||||
if (ts.mSmallCaps) {
|
||||
if (prevOffset == startingOffset) {
|
||||
// There's only one word, so we don't have to measure after all
|
||||
lastWordWidth = x;
|
||||
}
|
||||
else if (ts.mSmallCaps) {
|
||||
MeasureSmallCapsText(aReflowState, ts, tx.GetTextAt(prevOffset),
|
||||
lastWordLen, &lastWordWidth);
|
||||
}
|
||||
|
|
|
@ -2611,7 +2611,11 @@ nsTextFrame::Reflow(nsIPresContext& aPresContext,
|
|||
if (!measureText) {
|
||||
// We didn't measure any text so we don't know lastWordWidth.
|
||||
// We have to compute it now
|
||||
if (ts.mSmallCaps) {
|
||||
if (prevOffset == startingOffset) {
|
||||
// There's only one word, so we don't have to measure after all
|
||||
lastWordWidth = x;
|
||||
}
|
||||
else if (ts.mSmallCaps) {
|
||||
MeasureSmallCapsText(aReflowState, ts, tx.GetTextAt(prevOffset),
|
||||
lastWordLen, &lastWordWidth);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче