зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1539366
- Avoid calling AreOnSameLine once we know we've already changed lines since it can be expensive to compute. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D26650 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
65c3bca864
Коммит
a5c50d9eeb
|
@ -349,6 +349,7 @@ struct InlineBackgroundData {
|
|||
// Start with the previous flow frame as our continuation point
|
||||
// is the total of the widths of the previous frames.
|
||||
nsIFrame* inlineFrame = GetPrevContinuation(aFrame);
|
||||
bool changedLines = false;
|
||||
while (inlineFrame) {
|
||||
if (!mPIStartBorderData.mFrame &&
|
||||
!(mVertical ? inlineFrame->GetSkipSides().Top()
|
||||
|
@ -357,8 +358,9 @@ struct InlineBackgroundData {
|
|||
}
|
||||
nsRect rect = inlineFrame->GetRect();
|
||||
mContinuationPoint += mVertical ? rect.height : rect.width;
|
||||
if (mBidiEnabled && !AreOnSameLine(aFrame, inlineFrame)) {
|
||||
if (mBidiEnabled && (changedLines || !AreOnSameLine(aFrame, inlineFrame))) {
|
||||
mLineContinuationPoint += mVertical ? rect.height : rect.width;
|
||||
changedLines = true;
|
||||
}
|
||||
mUnbrokenMeasure += mVertical ? rect.height : rect.width;
|
||||
mBoundingBox.UnionRect(mBoundingBox, rect);
|
||||
|
|
Загрузка…
Ссылка в новой задаче