To compute bounds of vertices in CCMathUtil.cpp, there were two places where min/max values were assigned to initial opposite max/min values. There was a mistake in this code however, because numeric_limits<float>::min() is actually zero, not -flt_max. The desired correct behavior is to use -flt_max. Patch coming in a moment: - moves some code around so that unit testing is nice and clean - fixes the numeric_limits mistake in two places (computeEnclosingRectForVertices and computeEnclosingClippedRect) - adds two unit tests to cover the change.
Created attachment 144967 [details] Patch
Comment on attachment 144967 [details] Patch numeric_limits<float>::min() is actually something like the least positive representable number (can't remember if it's a denormal or not). Pretty much never what you want. Looks good, do we expect any impact on pages?
Comment on attachment 144967 [details] Patch (In reply to comment #2) > (From update of attachment 144967 [details]) > numeric_limits<float>::min() is actually something like the least positive representable number (can't remember if it's a denormal or not). Pretty much never what you want. > > Looks good, do we expect any impact on pages? Thanks for the review I wouldn't be surprised if a few rare uncommon pages broke because of this, but I have not actually encountered them. On pages that have been already working, there would not be any performance benefit or any other change.
Comment on attachment 144967 [details] Patch Clearing flags on attachment: 144967 Committed r119058: <http://trac.webkit.org/changeset/119058>
All reviewed patches have been landed. Closing bug.