DescriptionMerge 114095 - Background width (or height) is wrong if width (or height) * zoom < 1.
https://bugs.webkit.org/show_bug.cgi?id=83350
Reviewed by Nikolas Zimmermann.
Source/WebCore:
calculateImageIntrinsicDimension will return wrong size if the calculated size is 0.
0 is used for expressing unspecfied, so the method returns the box width(height) instead.
Since CachedImage has already similar code, we moved it to IntSize and shared it.
Tests: fast/css/zoom-background-repeat-x-expected.html
fast/css/zoom-background-repeat-x.html
fast/css/zoom-background-repeat-y-expected.html
fast/css/zoom-background-repeat-y.html
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::imageSizeForRenderer):
* platform/graphics/IntSize.h:
(IntSize):
(WebCore::IntSize::scale):
(WebCore::IntSize::clampToMinimumSize):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
LayoutTests:
* fast/css/zoom-background-repeat-x-expected.html: Added.
* fast/css/zoom-background-repeat-x.html: Added.
* fast/css/zoom-background-repeat-y-expected.html: Added.
* fast/css/zoom-background-repeat-y.html: Added.
TBR=shinyak@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=116271
Patch Set 1 #
Messages
Total messages: 1 (0 generated)
|