[webkit-reviews] review denied: [Bug 95883] Fix overflow in WebCore::snapSizeToPixel : [Attachment 162314] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 5 13:54:35 PDT 2012


Levi Weintraub <leviw at chromium.org> has denied Emil A Eklund
<eae at chromium.org>'s request for review:
Bug 95883: Fix overflow in WebCore::snapSizeToPixel
https://bugs.webkit.org/show_bug.cgi?id=95883

Attachment 162314: Patch
https://bugs.webkit.org/attachment.cgi?id=162314&action=review

------- Additional Comments from Levi Weintraub <leviw at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=162314&action=review


Seems like another step in the right direction, but we need to catch all the
cases where we do this.

> Source/WebCore/ChangeLog:10
> +	   No new tests, covered by existing tests if
SATURATED_LAYOUT_ARITHMETIC is enabled.

Can we not write a test case otherwise? Should it be gated by the same flag?

> Source/WebCore/ChangeLog:14
> +	   (WebCore::snapSizeToPixel): Change to use long longs and
roundRawValue.

I'm a little concerned about performance here given we perform this operation a
lot.

> Source/WebCore/platform/FractionalLayoutUnit.h:798
> +inline long long roundRawValue(long long value)
> +{
> +    if (value > 0)
> +	   return (value + (kFixedPointDenominator / 2)) /
kFixedPointDenominator;
> +    return (value - (kFixedPointDenominator / 2)) / kFixedPointDenominator;
> +}

We need to change pixelSnappedIntRect (and anywhere else we may be implicitly
doing this) to use this logic to be consistent.


More information about the webkit-reviews mailing list