[webkit-reviews] review denied: [Bug 83350] Background width (or height) is wrong if width (or height) * zoom < 1 : [Attachment 136377] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 11 00:57:55 PDT 2012


Nikolas Zimmermann <zimmermann at kde.org> has denied Shinya Kawanaka
<shinyak at chromium.org>'s request for review:
Bug 83350: Background width (or height) is wrong if width (or height) * zoom <
1
https://bugs.webkit.org/show_bug.cgi?id=83350

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

------- Additional Comments from Nikolas Zimmermann <zimmermann at kde.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=136377&action=review


Patch looks better! r- because of the cr-linux EWS failures, you should
investigate into them first. This code is a bit tricky :-)

> Source/WebCore/ChangeLog:21
> +	   (WebCore::IntSize::scaleWithMinimumSize):

How about 'scaleAndClampToMinimumSize' ? Sounds more descriptive IMHO.

> Source/WebCore/loader/cache/CachedImage.cpp:268
> +    int minWidth = imageSize.width() > 0 ? 1 : 0;
> +    int minHeight = imageSize.height() > 0 ? 1 : 0;

I'd rather early exit and return IntSize() if either m_imageSize.width() or
m_imageSize.height() is 0.
if (imageSize.isEmpty())
    return IntSize();
float widthScale = m_image->hasRelativeWidth() ? 1.0 : multiplier;
...


More information about the webkit-reviews mailing list