LayoutUnit::boundedMultiply is used for multiplication that's prone to overflow and for all LayoutUnit multiplication if SATURATED_LAYOUT_ARITHMETIC is enabled. The current approach is quite inefficient. Change it to use a more efficient saturated multiplication implementation.
Created attachment 179801 [details] Patch
Comment on attachment 179801 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=179801&action=review > Source/WebCore/platform/LayoutUnit.h:490 > + if (high != low >> 31) It wouldn't hurt to have a comment about the significance of this compare. > Source/WebCore/platform/LayoutUnit.h:497 > + // FIXME: Should be bounded even in the non-subpixel case. Thank you :)
Created attachment 179803 [details] Patch
Comment on attachment 179803 [details] Patch LGTM.
Committed r138041: <http://trac.webkit.org/changeset/138041>
Hopefully-ok follow up build fix: http://trac.webkit.org/changeset/138046.
(In reply to comment #6) > Hopefully-ok follow up build fix: http://trac.webkit.org/changeset/138046. Thanks Tim!