Improve performance by making nsWordFrame in nsLineLayout an nsDeque instead of an nsAutoVoidArray. Bug 121967, r=timeless, sr=attinasi, a=asa
git-svn-id: svn://10.0.0.236/trunk@116883 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -163,7 +163,8 @@ nsLineLayout::nsLineLayout(nsIPresContext* aPresContext,
|
||||
mBlockReflowState(aOuterReflowState),
|
||||
mBlockRS(nsnull),/* XXX temporary */
|
||||
mMinLineHeight(0),
|
||||
mComputeMaxElementSize(aComputeMaxElementSize)
|
||||
mComputeMaxElementSize(aComputeMaxElementSize),
|
||||
mWordFrames(0)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsLineLayout);
|
||||
|
||||
@@ -194,7 +195,8 @@ nsLineLayout::nsLineLayout(nsIPresContext* aPresContext,
|
||||
}
|
||||
|
||||
nsLineLayout::nsLineLayout(nsIPresContext* aPresContext)
|
||||
: mPresContext(aPresContext)
|
||||
: mPresContext(aPresContext),
|
||||
mWordFrames(0)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsLineLayout);
|
||||
|
||||
@@ -3329,9 +3331,9 @@ nsLineLayout::RelativePositionFrames(PerSpanData* psd, nsRect& aCombinedArea)
|
||||
void
|
||||
nsLineLayout::ForgetWordFrame(nsIFrame* aFrame)
|
||||
{
|
||||
NS_ASSERTION((void*)aFrame == mWordFrames[0], "forget-word-frame");
|
||||
if (0 != mWordFrames.Count()) {
|
||||
mWordFrames.RemoveElementAt(0);
|
||||
if (0 != mWordFrames.GetSize()) {
|
||||
NS_ASSERTION((void*)aFrame == mWordFrames.PeekFront(), "forget-word-frame");
|
||||
mWordFrames.PopFront();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user