[webkit-reviews] review denied: [Bug 97247] [chromium] REGRESSION Boundaries with alpha have wrong widths when div rotated and offset to non-integer coordinates : [Attachment 164963] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Sep 20 13:14:48 PDT 2012
Levi Weintraub <leviw at chromium.org> has denied Emil A Eklund
<eae at chromium.org>'s request for review:
Bug 97247: [chromium] REGRESSION Boundaries with alpha have wrong widths when
div rotated and offset to non-integer coordinates
https://bugs.webkit.org/show_bug.cgi?id=97247
Attachment 164963: Patch
https://bugs.webkit.org/attachment.cgi?id=164963&action=review
------- Additional Comments from Levi Weintraub <leviw at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=164963&action=review
> Source/WebCore/rendering/RenderLayer.cpp:3048
> + // Accumulate and account for sub-pixel rounding to ensure that we
round in the right direction.
This would probably make more sense in a static inline function with a
descriptive name.
> Source/WebCore/rendering/RenderLayer.cpp:3050
> + LayoutUnit adjustedWidth = (subPixelAccumulation.width() +
(delta.x() - roundedDelta.x())).abs();
> + LayoutUnit adjustedHeight = (subPixelAccumulation.height() +
(delta.y() - roundedDelta.y())).abs();
I don't like the named adjustedWidth/Height.
Why are we taking the absolute value?
> Source/WebCore/rendering/RenderLayer.cpp:3054
> + while (adjustedWidth > 1)
> + adjustedWidth -= 1;
> + while (adjustedHeight > 1)
> + adjustedHeight -= 1;
I can understand how this got over 1, but it should never be 2 or more.
abs(subPixelAccumulation) is between 0 and 1, and abs(delta - roundedDelta)
should be <= 0.5. An assertion of this fact would be good. I don't like these
while loops at all.
More information about the webkit-reviews
mailing list