DeprecatedPtrList should be removed
The last client is on RenderBlock:
And the only times its used, it would work as well or better as a Vector. See the attached list of uses in the code. Note that we never insert or remove from the middle of the list. A vector will be more space efficient!
I'll post a patch to do this tomorrow if no one beats me to it.
Created attachment 30953 [details]
list of places that DeprecatedPtrList is used
Ok, I lied. There is one removeRef call in:
void RenderBlock::removeFloatingObject(RenderBox* o)
which does remove from the middle of the list.
That's called from:
void RenderBlock::markAllDescendantsWithFloatsForLayout(RenderBox* floatToRemove, bool inLayout)
which I would expect is expected to be O(N), not O(N^2) as it could be if we moved to a Vector here. Hum...
The only time floatToRemove is ever non-null is from:
Which is only called when an object is losing float status in a styleWillChange or the like.
I was also wrong above. This will not turn this from O(N) to O(N^2) because we're only going to remove it once. This will cause pages which make things floating-and-then-not-again slower, but I doubt anyone would notice. I do expect the iPhone will notice the memory savings on all pages which include floats! :) So I still think this change is a good one.
*** This bug has been marked as a duplicate of bug 17425 ***