In my debug builds, I'm seeing lots of warning messages in my console coming from nsFrame::Invalidate(): NS_WARNING("empty damage rect: update caller to avoid fcn call overhead"); whenever I select text on pages like http://www.mozilla.org. These messages are really bogging down selection speed in debug builds. The invalidate calls are from nsTextFrame::SetSelected(), and the text frames in question seem to be related to the HTML whitespace formatting nodes ... they don't actually render on screen, but they are in the frame tree with zero width and height, and get their SELECT bits set during selection manipulation. I have a patch that modifies SetSelected() to check if the rect is empty before calling Invalidate().
Created attachment 58738 [details] [diff] [review] Patch Rev 1 Can I get an r= and sr= from mjudge and attinasi for Patch Rev 1?
Comment on attachment 58738 [details] [diff] [review] Patch Rev 1 firstname.lastname@example.org
Comment on attachment 58738 [details] [diff] [review] Patch Rev 1 sr=attinasi - alright! That warning really worked - sorry I didn't catcth that case earlier.
Fix checked in on TRUNK: mozilla/layout/html/base/src/nsTextFrame.cpp revision 1.339
Verified fix checked into lxr.mozilla.org