DescriptionMerge 139659
> offsetWidth/height incorrect for images when zoomed
> https://bugs.webkit.org/show_bug.cgi?id=106624
>
> Source/WebCore:
>
> Reviewed by Levi Weintraub.
>
> offsetWidth and height are incorrect for images at certain zoom
> levels due to flooring the values ones adjusted for zoom.
> By rounding the value instead we avoid the problem and return
> the right size.
>
> Test: fast/images/zoomed-offset-size.html
>
> * dom/Element.cpp:
> (WebCore::Element::offsetWidth):
> (WebCore::Element::offsetHeight):
> (WebCore::Element::clientWidth):
> (WebCore::Element::clientHeight):
> Change to round (as opposed to floor) the zoom adjusted value.
>
> * rendering/RenderObject.h:
> (WebCore::adjustLayoutUnitForAbsoluteZoom):
> * rendering/style/RenderStyle.h:
> (WebCore::adjustLayoutUnitForAbsoluteZoom):
> Add LayoutUnit version of adjustForAbsoluteZoom to avoid float
> conversion.
>
> LayoutTests:
>
> Reviewed by Levi Weintraub.
>
> Add test for offsetWidth/Height for zoomed image.
>
> * fast/images/zoomed-offset-size-expected.txt: Added.
> * fast/images/zoomed-offset-size.html: Added.
>
TBR=eae@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=140864
Patch Set 1 #
Messages
Total messages: 1 (0 generated)
|