WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
67712
background-size:contain and full page zoom can sometimes cause background image not to fill the container
https://bugs.webkit.org/show_bug.cgi?id=67712
Summary
background-size:contain and full page zoom can sometimes cause background ima...
Adam Roben (:aroben)
Reported
2011-09-07 09:40:48 PDT
Created
attachment 106592
[details]
image used by testcase To reproduce: 1. Load the attached test case 2. Zoom the page once You'll see some red appear to the right of the grid.
Attachments
image used by testcase
(450 bytes, image/png)
2011-09-07 09:40 PDT
,
Adam Roben (:aroben)
no flags
Details
testcase
(383 bytes, text/html)
2011-09-07 09:41 PDT
,
Adam Roben (:aroben)
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Adam Roben (:aroben)
Comment 1
2011-09-07 09:41:18 PDT
Created
attachment 106593
[details]
testcase
Adam Roben (:aroben)
Comment 2
2011-09-07 09:43:26 PDT
Note that the div#inner and the background-image have the same dimensions: 570x18. But after zooming once, document.getElementById('inner').getBoundingClientRect().height is 17.5! I assume this is the source of the bug.
Adam Roben (:aroben)
Comment 3
2011-09-07 09:46:38 PDT
Maybe related to
bug 66256
?
Simon Fraser (smfr)
Comment 4
2011-09-07 09:48:24 PDT
By "zoom" you mean command+, or gesture zoom?
Adam Roben (:aroben)
Comment 5
2011-09-07 09:54:49 PDT
Cmd-+
mitz
Comment 6
2011-09-07 09:58:25 PDT
I believe the height is rounded down to floor(18 * 1.2) = 21, and the width is 570*1.2 = 684. This allows the image to scale by a factor of 21/18, giving it a width of 665, leaving 19 horizontal pixels showing red.
Dave Hyatt
Comment 7
2011-09-07 12:26:12 PDT
I suspect the "auto" value for background-size will have similar issues.
Radar WebKit Bug Importer
Comment 8
2011-09-30 16:18:45 PDT
<
rdar://problem/10218266
>
Dominik Röttsches (drott)
Comment 9
2012-09-21 06:22:00 PDT
(In reply to
comment #7
)
> I suspect the "auto" value for background-size will have similar issues.
Yes - I see a red line below in "containt" & "auto" case.
Dominik Röttsches (drott)
Comment 10
2012-09-21 06:24:07 PDT
(In reply to
comment #9
)
> (In reply to
comment #7
) > > I suspect the "auto" value for background-size will have similar issues.
Same for "100%".
Simon Fraser (smfr)
Comment 11
2017-04-27 10:34:43 PDT
I can't reproduce this bug in recent builds.
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