mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 947158 - Drain the overflow list on inlines before traversing children for bidi processing. r=smontagu
This commit is contained in:
parent
a69abfa957
commit
b1a72337a4
@ -976,6 +976,13 @@ nsBidiPresUtils::TraverseFrames(nsBlockFrame* aBlockFrame,
|
||||
|
||||
PRUnichar ch = 0;
|
||||
if (frame->IsFrameOfType(nsIFrame::eBidiInlineContainer)) {
|
||||
if (!(frame->GetStateBits() & NS_FRAME_FIRST_REFLOW)) {
|
||||
nsContainerFrame* c = static_cast<nsContainerFrame*>(frame);
|
||||
MOZ_ASSERT(c = do_QueryFrame(frame),
|
||||
"eBidiInlineContainer must be a nsContainerFrame subclass");
|
||||
c->DrainSelfOverflowList();
|
||||
}
|
||||
|
||||
const nsStyleVisibility* vis = frame->StyleVisibility();
|
||||
const nsStyleTextReset* text = frame->StyleTextReset();
|
||||
if (text->mUnicodeBidi & NS_STYLE_UNICODE_BIDI_OVERRIDE) {
|
||||
@ -1143,8 +1150,9 @@ nsBidiPresUtils::TraverseFrames(nsBlockFrame* aBlockFrame,
|
||||
} else {
|
||||
// For a non-leaf frame, recurse into TraverseFrames
|
||||
nsIFrame* kid = frame->GetFirstPrincipalChild();
|
||||
nsIFrame* overflowKid = frame->GetFirstChild(nsIFrame::kOverflowList);
|
||||
if (kid || overflowKid) {
|
||||
MOZ_ASSERT(!frame->GetFirstChild(nsIFrame::kOverflowList),
|
||||
"should have drained the overflow list above");
|
||||
if (kid) {
|
||||
const nsStyleTextReset* text = frame->StyleTextReset();
|
||||
if (text->mUnicodeBidi & NS_STYLE_UNICODE_BIDI_ISOLATE ||
|
||||
text->mUnicodeBidi & NS_STYLE_UNICODE_BIDI_PLAINTEXT) {
|
||||
@ -1168,7 +1176,6 @@ nsBidiPresUtils::TraverseFrames(nsBlockFrame* aBlockFrame,
|
||||
subParagraph->Reset(frame, aBpd);
|
||||
}
|
||||
TraverseFrames(aBlockFrame, aLineIter, kid, subParagraph);
|
||||
TraverseFrames(aBlockFrame, aLineIter, overflowKid, subParagraph);
|
||||
if (isLastContinuation) {
|
||||
ResolveParagraph(aBlockFrame, subParagraph);
|
||||
subParagraph->EmptyBuffer();
|
||||
@ -1179,7 +1186,6 @@ nsBidiPresUtils::TraverseFrames(nsBlockFrame* aBlockFrame,
|
||||
aBpd->AppendControlChar(kObjectSubstitute);
|
||||
} else {
|
||||
TraverseFrames(aBlockFrame, aLineIter, kid, aBpd);
|
||||
TraverseFrames(aBlockFrame, aLineIter, overflowKid, aBpd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user