Backing out fix for bug 385607 due to bustage and Tp regressions

This commit is contained in:
roc+%cs.cmu.edu 2007-08-10 04:41:00 +00:00
Родитель d80db97ae5
Коммит 3418a30ac2
4 изменённых файлов: 5 добавлений и 49 удалений

Просмотреть файл

@ -605,10 +605,6 @@ static void ReparentFrame(nsIFrame* aFrame, nsIFrame* aOldParent,
//////////////////////////////////////////////////////////////////////
// Reflow methods
// If MarkIntrinsicWidthsDirty took a parameter indicating which child frame's
// subtree was causing intrinsic widths to be dirtied, we might be able to use it
// to call SetInvalidateTextRuns from here instead of scattered in other
// places in this file.
/* virtual */ void
nsBlockFrame::MarkIntrinsicWidthsDirty()
{
@ -668,7 +664,6 @@ nsBlockFrame::GetMinWidth(nsIRenderingContext *aRenderingContext)
}
// XXX Bug NNNNNN Should probably handle percentage text-indent.
data.line = &line;
nsIFrame *kid = line->mFirstChild;
for (PRInt32 i = 0, i_end = line->GetChildCount(); i != i_end;
++i, kid = kid->GetNextSibling()) {
@ -740,7 +735,6 @@ nsBlockFrame::GetPrefWidth(nsIRenderingContext *aRenderingContext)
}
// XXX Bug NNNNNN Should probably handle percentage text-indent.
data.line = &line;
nsIFrame *kid = line->mFirstChild;
for (PRInt32 i = 0, i_end = line->GetChildCount(); i != i_end;
++i, kid = kid->GetNextSibling()) {
@ -4809,19 +4803,12 @@ nsBlockFrame::AddFrames(nsIFrame* aFrameList,
prevSibLine->SetChildCount(prevSibLine->GetChildCount() - rem);
prevSibLine->MarkDirty();
}
// Force the lines next to where we're inserting content to regenerate
// their textruns
prevSibLine->SetInvalidateTextRuns(PR_TRUE);
if (prevSibLine.next() != end_lines()) {
prevSibLine.next()->SetInvalidateTextRuns(PR_TRUE);
}
// Now (partially) join the sibling lists together
aPrevSibling->SetNextSibling(aFrameList);
}
else if (! mLines.empty()) {
prevSiblingNextFrame = mLines.front()->mFirstChild;
mLines.front()->SetInvalidateTextRuns(PR_TRUE);
}
// Walk through the new frames being added and update the line data
@ -5150,10 +5137,6 @@ found_frame:;
NS_ERROR("can't find deleted frame in lines");
return NS_ERROR_FAILURE;
}
if (line != mLines.front()) {
line.prev()->SetInvalidateTextRuns(PR_TRUE);
}
if (prevSibling && !prevSibling->GetNextSibling()) {
// We must have found the first frame in the overflow line list. So
@ -5166,8 +5149,6 @@ found_frame:;
NS_ASSERTION(this == aDeletedFrame->GetParent(), "messed up delete code");
NS_ASSERTION(line->Contains(aDeletedFrame), "frame not in line");
line->SetInvalidateTextRuns(PR_TRUE);
// If the frame being deleted is the last one on the line then
// optimize away the line->Contains(next-in-flow) call below.
PRBool isLastFrameOnLine = (1 == line->GetChildCount() ||
@ -5315,10 +5296,6 @@ found_frame:;
}
}
if (line.next() != line_end) {
line.next()->SetInvalidateTextRuns(PR_TRUE);
}
#ifdef DEBUG
VerifyLines(PR_TRUE);
#endif
@ -6051,12 +6028,8 @@ nsBlockFrame::ChildIsDirty(nsIFrame* aChild)
} else {
// Mark the line containing the child frame dirty.
line_iterator fline = FindLineFor(aChild);
if (fline != end_lines()) {
// An inline descendant might have been added or removed, so we should
// reconstruct textruns.
fline->SetInvalidateTextRuns(PR_TRUE);
if (fline != end_lines())
MarkLineDirty(fline);
}
}
nsBlockFrameSuper::ChildIsDirty(aChild);

Просмотреть файл

@ -92,7 +92,6 @@ class nsDisplayListSet;
class nsDisplayList;
class gfxSkipChars;
class gfxSkipCharsIterator;
class nsLineList_iterator;
struct nsPeekOffsetStruct;
struct nsPoint;
@ -1140,16 +1139,12 @@ public:
*/
struct InlineIntrinsicWidthData {
InlineIntrinsicWidthData()
: line(nsnull)
, prevLines(0)
: prevLines(0)
, currentLine(0)
, skipWhitespace(PR_TRUE)
, trailingWhitespace(0)
{}
// The line. This may be null if the inlines are not associated with a block.
const nsLineList_iterator* line;
// The maximum intrinsic width for all previous lines.
nscoord prevLines;

Просмотреть файл

@ -305,15 +305,6 @@ public:
return mFlags.mLineWrapped;
}
// mInvalidateTextRuns bit
void SetInvalidateTextRuns(PRBool aOn) {
NS_ASSERTION((PR_FALSE==aOn || PR_TRUE==aOn), "somebody is playing fast and loose with bools and bits!");
mFlags.mInvalidateTextRuns = aOn;
}
PRBool GetInvalidateTextRuns() const {
return mFlags.mInvalidateTextRuns;
}
// mResizeReflowOptimizationDisabled bit
void DisableResizeReflowOptimization() {
mFlags.mResizeReflowOptimizationDisabled = PR_TRUE;
@ -496,7 +487,6 @@ public:
PRUint32 mBlock : 1;
PRUint32 mImpactedByFloat : 1;
PRUint32 mLineWrapped: 1;
PRUint32 mInvalidateTextRuns : 1;
PRUint32 mResizeReflowOptimizationDisabled: 1; // default 0 = means that the opt potentially applies to this line. 1 = never skip reflowing this line for a resize reflow
PRUint32 mEmptyCacheValid: 1;
PRUint32 mEmptyCacheState: 1;

Просмотреть файл

@ -1197,8 +1197,6 @@ BuildTextRuns(nsIRenderingContext* aRC, nsTextFrame* aForFrame,
NS_ASSERTION(line != endLines && !line->IsBlock(), "Where is this frame anyway??");
nsIFrame* child = line->mFirstChild;
do {
line->SetInvalidateTextRuns(PR_FALSE);
scanner.SetAtStartOfLine();
scanner.SetCommonAncestorWithLastFrame(nsnull);
PRInt32 i;
@ -1960,7 +1958,7 @@ nsTextFrame::EnsureTextRun(nsIRenderingContext* aRC, nsIFrame* aLineContainer,
const nsLineList::iterator* aLine,
PRUint32* aFlowEndInTextRun)
{
if (mTextRun && aLine && !(*aLine)->GetInvalidateTextRuns()) {
if (mTextRun) {
if (mTextRun->GetExpirationState()->IsTracked()) {
gTextRuns->MarkUsed(mTextRun);
}
@ -4960,7 +4958,7 @@ nsTextFrame::AddInlineMinWidthForFlow(nsIRenderingContext *aRenderingContext,
{
PRUint32 flowEndInTextRun;
gfxSkipCharsIterator iter =
EnsureTextRun(aRenderingContext, nsnull, aData->line, &flowEndInTextRun);
EnsureTextRun(aRenderingContext, nsnull, nsnull, &flowEndInTextRun);
if (!mTextRun)
return;
@ -5058,7 +5056,7 @@ nsTextFrame::AddInlinePrefWidthForFlow(nsIRenderingContext *aRenderingContext,
{
PRUint32 flowEndInTextRun;
gfxSkipCharsIterator iter =
EnsureTextRun(aRenderingContext, nsnull, aData->line, &flowEndInTextRun);
EnsureTextRun(aRenderingContext, nsnull, nsnull, &flowEndInTextRun);
if (!mTextRun)
return;