[Webkit-unassigned] [Bug 241800] Wrong image display for Non-integer sized elements and background-position specified as %
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jun 22 20:48:57 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=241800
--- Comment #6 from zalan <zalan at apple.com> ---
(In reply to zalan from comment #4)
> Yeah, so we apparently pixel-snap too early in the process of generating
> background images.
>
> @@ -1258,7 +1258,6 @@ BackgroundImageGeometry
> RenderBoxModelObject::calculateBackgroundImageGeometry(c
> }
> } else {
> positioningAreaSize = borderBoxRect.size() - LayoutSize(left +
> right, top + bottom);
> - positioningAreaSize =
> LayoutSize(snapRectToDevicePixels(LayoutRect(paintOffset,
> positioningAreaSize), deviceScaleFactor).size());
> }
> } else {
> LayoutRect viewportRect;
>
> ^^ fixes the issue.
Sadly even with this change, the rendered content is slightly different from what Blink and Gecko have. Due to the LayoutUnit's fixed point denominator (64), 32.15234234px is resolved to 34.140625px which makes the background image shift slightly to the right.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220623/6405c03c/attachment.htm>
More information about the webkit-unassigned
mailing list