зеркало из https://github.com/mozilla/gecko-dev.git
Bug 701504 - Null out all BidiParagraphData::mPrevFrame when starting a new block. r=smontagu
This commit is contained in:
Родитель
857009063f
Коммит
e46f28dbdf
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
|
||||
function boom()
|
||||
{
|
||||
document.documentElement.offsetHeight;
|
||||
|
||||
var x = document.getElementById('x');
|
||||
x.removeChild(x.childNodes[1]);
|
||||
|
||||
document.documentElement.offsetHeight;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="boom();">
|
||||
|
||||
<div style="-moz-column-count: 2;"><span style="unicode-bidi: -moz-isolate;" id="x"><span style="direction: rtl;"></span> <span style="unicode-bidi: -moz-isolate; white-space: pre;">
|
||||
x</span></span></div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -368,6 +368,7 @@ load 691118-1.html
|
|||
load 695861.html
|
||||
load 698335.html
|
||||
needs-focus pref(accessibility.browsewithcaret,true) load 699353-1.html
|
||||
load 701504.html
|
||||
load 707098.html
|
||||
load 722137.html
|
||||
load 725535.html
|
||||
|
|
|
@ -199,6 +199,13 @@ struct BidiParagraphData {
|
|||
}
|
||||
}
|
||||
|
||||
void ResetForNewBlock()
|
||||
{
|
||||
for (BidiParagraphData* bpd = this; bpd; bpd = bpd->mSubParagraph) {
|
||||
bpd->mPrevFrame = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void AppendFrame(nsIFrame* aFrame,
|
||||
nsBlockInFlowLineIterator* aLineIter,
|
||||
nsIContent* aContent = nullptr)
|
||||
|
@ -603,8 +610,7 @@ nsBidiPresUtils::Resolve(nsBlockFrame* aBlockFrame)
|
|||
block = static_cast<nsBlockFrame*>(block->GetNextContinuation())) {
|
||||
block->RemoveStateBits(NS_BLOCK_NEEDS_BIDI_RESOLUTION);
|
||||
nsBlockInFlowLineIterator lineIter(block, block->begin_lines());
|
||||
bpd.mPrevFrame = nullptr;
|
||||
bpd.GetSubParagraph()->mPrevFrame = nullptr;
|
||||
bpd.ResetForNewBlock();
|
||||
TraverseFrames(aBlockFrame, &lineIter, block->GetFirstPrincipalChild(), &bpd);
|
||||
// XXX what about overflow lines?
|
||||
}
|
||||
|
@ -920,6 +926,10 @@ nsBidiPresUtils::TraverseFrames(nsBlockFrame* aBlockFrame,
|
|||
if (!aCurrentFrame)
|
||||
return;
|
||||
|
||||
#ifdef DEBUG
|
||||
nsBlockFrame* initialLineContainer = aLineIter->GetContainer();
|
||||
#endif
|
||||
|
||||
nsIFrame* childFrame = aCurrentFrame;
|
||||
do {
|
||||
/*
|
||||
|
@ -1165,6 +1175,8 @@ nsBidiPresUtils::TraverseFrames(nsBlockFrame* aBlockFrame,
|
|||
}
|
||||
childFrame = nextSibling;
|
||||
} while (childFrame);
|
||||
|
||||
MOZ_ASSERT(initialLineContainer == aLineIter->GetContainer());
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче