Bug 244179

Summary: Background-size incorrectly gets rounded to device pixel
Product: WebKit Reporter: Xidorn Quan <xidorn-webkit>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bfulgham, heycam, karlcow, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: BrowserCompat, CanvaBug, InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
testcase
none
rendering in Safari, firefox, chrome none

Description Xidorn Quan 2022-08-21 20:22:04 PDT
Created attachment 461783 [details]
testcase

See the attached testcase.

Expected result:

The container is 98x98, and background-size is 12.25x12.25, so it should have just 8x8 dots in the container, and since its position is center, it should have half dots on all edges. Seemingly it's rounding to 12.5px for me.

Actual result:

The dots on right and bottom are much smaller than half.

Both Firefox and Chrome have the right result.
Comment 1 Karl Dubost 2022-08-21 23:52:34 PDT
Created attachment 461791 [details]
rendering in Safari, firefox, chrome

Rendering in 
Safari 16.1
Firefox Nightly 105.0a1
Google Chrome Canary 107.0.5253.0
Comment 2 Radar WebKit Bug Importer 2022-08-21 23:53:01 PDT
<rdar://problem/98962915>