WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
124775
background-repeat: repeat-y is imprecise for certain background-size values
https://bugs.webkit.org/show_bug.cgi?id=124775
Summary
background-repeat: repeat-y is imprecise for certain background-size values
Derek Detweiler
Reported
2013-11-22 07:30:21 PST
Overview: background-size appears to incorrectly scale when repeated across background, causing it to repeat more times than it should. Steps to reproduce: Visit this link for a working example:
http://jsfiddle.net/vwKv3/1/
Actual results: Note that the triangles in columns 5 and 7 (CSS classes "repeater e" and "repeater g" respectively) show a portion of an additional triangle at the bottom of the column. Expected results: The triangle stack should repeat a precise number of times according to the background-size of the div, have an extra bit of triangle at the bottom. Platforms: Seems to happen on Chrome on both Win 7 and Win Vista, Safari and Chrome on Mac OSX
Attachments
Add attachment
proposed patch, testcase, etc.
Derek Detweiler
Comment 1
2013-11-22 07:38:53 PST
(In reply to
comment #0
) Looks like column 7 (repeater g) is actually correct, whoops! But column 5 does correctly expose the behavior I noted above.
Manish Gurnaney
Comment 2
2014-03-04 00:19:35 PST
Checked the code and found the route cause of the issue. The issue is happening because of the Float point error. As per the given test case, When Image is drawn as per style property height of the Image should be 37.5. While doing the calculation for the height int RenderBoxModelObject::calculateFillTileSize, Float is being considered when we calculate the height. After this we create a Object for type LayoutUnit and pass the float value as a parameter,which in turn stores it as an int value has the value is reduced to 37 which creates the difference at the end.
Brent Fulgham
Comment 3
2022-07-13 16:28:58 PDT
Safari, Chrome, and Firefox all agree on rendering for this test case. I don't believe there is any remaining compatibility issue.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug