Bug 600100, Part 3: Followup patch to maximize efficiency of changes in 2ed966e4. [r=mats]

This commit is contained in:
Scott Johnson 2013-03-19 12:36:05 -05:00
parent 33468072db
commit 66b44c2f73

View File

@ -480,7 +480,7 @@ public:
if (!mFloats.IsEmpty()) {
// If we have pushed floats, then they should be at the beginning of our
// float list.
if (mFloats.FrameAt(0)->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT) {
if (mFloats.FirstChild()->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT) {
return true;
}
}
@ -488,9 +488,9 @@ public:
#ifdef DEBUG
// Double-check the above assertion that pushed floats should be at the
// beginning of our floats list.
for (int32_t i = 0; i < mFloats.GetLength(); i++) {
NS_ASSERTION(!(mFloats.FrameAt(i)->GetStateBits() &
NS_FRAME_IS_PUSHED_FLOAT),
for (nsFrameList::Enumerator e(mFloats); !e.AtEnd(); e.Next()) {
nsIFrame* f = e.get();
NS_ASSERTION(!(f->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT),
"pushed floats must be at the beginning of the float list");
}
#endif