зеркало из https://github.com/mozilla/pjs.git
Bug 385234. Iterate through textframe continuations properly in AddInlinePref/MinWidth. r=smontagu
This commit is contained in:
Родитель
cc164e9991
Коммит
84fb1e155c
|
@ -4960,18 +4960,18 @@ nsTextFrame::AddInlineMinWidthForFlow(nsIRenderingContext *aRenderingContext,
|
||||||
nsTextFrame::AddInlineMinWidth(nsIRenderingContext *aRenderingContext,
|
nsTextFrame::AddInlineMinWidth(nsIRenderingContext *aRenderingContext,
|
||||||
nsIFrame::InlineMinWidthData *aData)
|
nsIFrame::InlineMinWidthData *aData)
|
||||||
{
|
{
|
||||||
AddInlineMinWidthForFlow(aRenderingContext, aData);
|
nsTextFrame* f;
|
||||||
if (mTextRun && !(mTextRun->GetFlags() & nsTextFrameUtils::TEXT_IS_SIMPLE_FLOW)) {
|
gfxTextRun* lastTextRun = nsnull;
|
||||||
// mTextRun did not cover all continuations of this frame.
|
// nsContinuingTextFrame does nothing for AddInlineMinWidth; all text frames
|
||||||
// Measure all additional flows associated with this frame's content.
|
// in the flow are handled right here.
|
||||||
nsTextFrame* f = this;
|
for (f = this; f; f = NS_STATIC_CAST(nsTextFrame*, f->GetNextContinuation())) {
|
||||||
for (;;) {
|
// f->mTextRun could be null if we haven't set up textruns yet for f.
|
||||||
f = NS_STATIC_CAST(nsTextFrame*, f->GetNextContinuation());
|
// Except in OOM situations, lastTextRun will only be null for the first
|
||||||
if (!f)
|
// text frame.
|
||||||
break;
|
if (f == this || f->mTextRun != lastTextRun) {
|
||||||
if (f->GetStateBits() & TEXT_IS_RUN_OWNER) {
|
// This will process all the text frames that share the same textrun as f.
|
||||||
f->AddInlineMinWidthForFlow(aRenderingContext, aData);
|
f->AddInlineMinWidthForFlow(aRenderingContext, aData);
|
||||||
}
|
lastTextRun = f->mTextRun;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5049,18 +5049,18 @@ nsTextFrame::AddInlinePrefWidthForFlow(nsIRenderingContext *aRenderingContext,
|
||||||
nsTextFrame::AddInlinePrefWidth(nsIRenderingContext *aRenderingContext,
|
nsTextFrame::AddInlinePrefWidth(nsIRenderingContext *aRenderingContext,
|
||||||
nsIFrame::InlinePrefWidthData *aData)
|
nsIFrame::InlinePrefWidthData *aData)
|
||||||
{
|
{
|
||||||
AddInlinePrefWidthForFlow(aRenderingContext, aData);
|
nsTextFrame* f;
|
||||||
if (mTextRun && !(mTextRun->GetFlags() & nsTextFrameUtils::TEXT_IS_SIMPLE_FLOW)) {
|
gfxTextRun* lastTextRun = nsnull;
|
||||||
// mTextRun did not cover all continuations of this frame.
|
// nsContinuingTextFrame does nothing for AddInlineMinWidth; all text frames
|
||||||
// Measure all additional flows associated with this frame's content.
|
// in the flow are handled right here.
|
||||||
nsTextFrame* f = this;
|
for (f = this; f; f = NS_STATIC_CAST(nsTextFrame*, f->GetNextContinuation())) {
|
||||||
for (;;) {
|
// f->mTextRun could be null if we haven't set up textruns yet for f.
|
||||||
f = NS_STATIC_CAST(nsTextFrame*, f->GetNextContinuation());
|
// Except in OOM situations, lastTextRun will only be null for the first
|
||||||
if (!f)
|
// text frame.
|
||||||
break;
|
if (f == this || f->mTextRun != lastTextRun) {
|
||||||
if (f->GetStateBits() & TEXT_IS_RUN_OWNER) {
|
// This will process all the text frames that share the same textrun as f.
|
||||||
f->AddInlinePrefWidthForFlow(aRenderingContext, aData);
|
f->AddInlinePrefWidthForFlow(aRenderingContext, aData);
|
||||||
}
|
lastTextRun = f->mTextRun;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,7 +121,7 @@ random == 328829-1.xhtml 328829-1-ref.xhtml # bug 369046 (intermittent)
|
||||||
== 335628-1.html 335628-1-ref.html
|
== 335628-1.html 335628-1-ref.html
|
||||||
!= 335628-2.xul 335628-2-ref.xul
|
!= 335628-2.xul 335628-2-ref.xul
|
||||||
== 336147-1.html 336147-1-ref.html
|
== 336147-1.html 336147-1-ref.html
|
||||||
fails == 336736-1.html 336736-1-ref.html # something wrong with subpixel horizontal alignment (tracked in bug 336736)
|
fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 336736-1.html 336736-1-ref.html # something wrong with subpixel horizontal alignment (tracked in bug 336736)
|
||||||
== 339289-1.html 339289-1-ref.html
|
== 339289-1.html 339289-1-ref.html
|
||||||
== 341043-1a.html 341043-1-ref.html
|
== 341043-1a.html 341043-1-ref.html
|
||||||
!= 341043-1b.html 341043-1-ref.html
|
!= 341043-1b.html 341043-1-ref.html
|
||||||
|
|
Загрузка…
Ссылка в новой задаче