nsBlockFrame::StealFrame currently does a linear search over all lines (including overflow lines) to find the given child frame. We can optimize this in two ways: first, we now have a hash table for lines that have many (>200) frames - we should use it when available; second, we should test upfront if the given child is an inline or block and then skip lines accordingly.
Created attachment 725823 [details] [diff] [review] fix https://tbpl.mozilla.org/?tree=Try&rev=346b3251d96e
Comment on attachment 725823 [details] [diff] [review] fix r=me
Oops, the above changeset had some unrelated changes in it -- backed out.
Landed the right patch this time: https://hg.mozilla.org/integration/mozilla-inbound/rev/a5170d1c3bac