[Webkit-unassigned] [Bug 155955] border-image-repeat:round output doesn't match other browsers

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 17 16:54:33 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=155955

--- Comment #10 from Brent Fulgham <bfulgham at webkit.org> ---
(In reply to Simon Fraser (smfr) from comment #7)
> Please do. I started looking at this and it's a bit more involved than I
> thought.
> 
> Basically I think the fix should reflect this comment in Image::drawTiled():
>     // FIXME: These rules follow CSS border-image rules, but they should not
> be down here in Image.
> 
> so the 'space' and 'round' logic there needs to pushed up into
> NinePieceImage::computeTileScales(), maybe as part of scaleSlicesIfNeeded().
> This probably requires sending 'spacing' and 'phase' down through
> GraphicsContext::drawTiledImage(). I think this code move is necessary to
> implement this part of the spec:
> 
> "The middle image's width is scaled by the same factor as the top image
> unless that factor is zero or infinity, in which case the scaling factor of
> the bottom is substituted, and failing that, the width is not scaled. The
> height of the middle image is scaled by the same factor as the left image
> unless that factor is zero or infinity, in which case the scaling factor of
> the right image is substituted, and failing that, the height is not scaled."

I think the logic in NinePieceImage::computeMiddleTileScale(...) correctly addresses the above (at east for zero -- not sure if Infinity ever gets this far).

I believe I've found a calculation error. Patch coming.

-- 
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/20230317/cf534e63/attachment.htm>


More information about the webkit-unassigned mailing list