зеркало из https://github.com/mozilla/gecko-dev.git
Bug 695640 - Remove View Source pre chunking, because it is no longer needed for reasonable perf. r=smaug.
This commit is contained in:
Родитель
cbd4adeb93
Коммит
034415bb26
|
@ -83,7 +83,6 @@ nsHtml5Highlighter::nsHtml5Highlighter(nsAHtml5TreeOpSink* aOpSink)
|
|||
, mCStart(PR_INT32_MAX)
|
||||
, mPos(0)
|
||||
, mLineNumber(1)
|
||||
, mUnicharsInThisPre(0)
|
||||
, mInlinesOpen(0)
|
||||
, mInCharacters(false)
|
||||
, mBuffer(nsnull)
|
||||
|
@ -608,22 +607,8 @@ nsHtml5Highlighter::FlushChars()
|
|||
PRInt32 len = i - mCStart;
|
||||
AppendCharacters(buf, mCStart, len);
|
||||
mCStart = i;
|
||||
mUnicharsInThisPre += len;
|
||||
}
|
||||
++mLineNumber;
|
||||
if (mUnicharsInThisPre > NS_HTML5_HIGHLIGHTER_PRE_BREAK_THRESHOLD &&
|
||||
!mInlinesOpen && mInCharacters) {
|
||||
mUnicharsInThisPre = 0;
|
||||
// Split the pre. See bug 86355.
|
||||
Pop(); // span
|
||||
Pop(); // pre
|
||||
Push(nsGkAtoms::pre, nsnull);
|
||||
nsHtml5TreeOperation* treeOp = mOpQueue.AppendElement();
|
||||
NS_ASSERTION(treeOp, "Tree op allocation failed.");
|
||||
treeOp->InitAddLineNumberId(CurrentNode(), mLineNumber);
|
||||
Push(nsGkAtoms::span, nsnull);
|
||||
break;
|
||||
}
|
||||
Push(nsGkAtoms::span, nsnull);
|
||||
nsHtml5TreeOperation* treeOp = mOpQueue.AppendElement();
|
||||
NS_ASSERTION(treeOp, "Tree op allocation failed.");
|
||||
|
@ -640,7 +625,6 @@ nsHtml5Highlighter::FlushChars()
|
|||
PRInt32 len = mPos - mCStart;
|
||||
AppendCharacters(buf, mCStart, len);
|
||||
mCStart = mPos;
|
||||
mUnicharsInThisPre += len;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -321,12 +321,6 @@ class nsHtml5Highlighter
|
|||
*/
|
||||
PRInt32 mLineNumber;
|
||||
|
||||
/**
|
||||
* The number of PRUnichars flushed since the start of the current pre
|
||||
* block.
|
||||
*/
|
||||
PRInt32 mUnicharsInThisPre;
|
||||
|
||||
/**
|
||||
* The number of inline elements open inside the <pre> excluding the
|
||||
* span potentially wrapping a run of characters.
|
||||
|
|
Загрузка…
Ссылка в новой задаче