background-size:cover with background-origin: content-box causes missing images
Categories
(Core :: CSS Parsing and Computation, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox67 | --- | unaffected |
firefox68 | + | verified |
firefox69 | + | verified |
People
(Reporter: bugzilla.mozilla.org, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
779 bytes,
text/html
|
Details | |
47 bytes,
text/x-phabricator-request
|
ritu
:
approval-mozilla-beta+
|
Details | Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Steps to reproduce:
- Update FF to 68.0beta4 (or maybe earlier) or nightly 69.0a1.
- Visit https://thecovr.de/iphone/classic
- The page displays images as background-image to a <div>. The there is no height present, only padding-bottom.
- Tested in Linux (Debian testing) and Windows 7.
Actual results:
The images on the bottom of the page (selectors .footer-image1 and .footer-image2) are missing. Their actual size is preserved as a white space.
background-size:cover and background-size:contain cause the bug; background-size:auto does not cause the white space, but (obviously) the images are not scaled.
Setting height:auto seems to fix the problem for Firefox 68.
Expected results:
The images should be displayed correctly without having to set height:auto, because it works in Firefox 67, Chrome 75 (+ IE Edge + Vivaldi), IE 11, Safari, Epiphany 3.32, and Konqueror 5.0.
Reporter | ||
Comment 1•4 years ago
|
||
Added a minimal, complete, and verifiable example.
Comment 2•4 years ago
|
||
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0
Hi,
I have managed to reproduce this issue on latest Beta version 68.0b11 and latest Nightly build 69.0a1 (2019-06-18) using Windows 10 and Ubuntu 18.
The issue is not reproducible on Release version 67.0.2
I will move this over to a component so developers can take a look over it. If is not the correct component please feel free to change it to an appropriate one.
This is a recent regression:
Last known good build: Build ID 20190503041749
First known bad build: Build ID 20190503215639
Pushlog:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=bdf36faf780ba706bbebc8cbcd32ba892a899440&tochange=03166449953fbcaaf6c66d2c3b358319781a0e52
Maybe this bug can be related to this:
https://bugzilla.mozilla.org/show_bug.cgi?id=1548349
Thanks for the report.
Comment 3•4 years ago
|
||
Bugbug thinks this bug is a regression, but please revert this change in case of error.
Comment 4•4 years ago
|
||
Can we narrow this down to a smaller regression window?
![]() |
||
Comment 5•4 years ago
|
||
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=020e530d49b3b177902dad1048c90d7d9b290354&tochange=451701e88d92935b77385235832865dabe8c2942
Regressed by: 451701e88d92935b77385235832865dabe8c2942 Emilio Cobos Álvarez — Bug 1547792 - AspectRatio should be a single ratio, not a size. r=dholbert
Assignee | ||
Comment 7•4 years ago
|
||
Thanks, yeah.
[Tracking Requested - why for this release]: Recent regression that would be nice not to ship.
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 8•4 years ago
|
||
I filed https://github.com/w3c/csswg-drafts/issues/4049 on the spec not saying anything close to what implementations do.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 9•4 years ago
|
||
This restores our previous behavior and adds a .tentative test because I
couldn't see how the spec makes any sense.
Filed https://github.com/w3c/csswg-drafts/issues/4049 about that.
Comment 10•4 years ago
|
||
We should consider uplifting this to beta68. Should be safe, since it's restoring previous behavior (after a change that wasn't intended to affect behavior inadvertently did have this small unintended effect).
Comment 11•4 years ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7ae44e68ef10 Restore old behavior for background-size: cover + zero-height background positioning area. r=dholbert
Comment 12•4 years ago
|
||
Backout by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/498895b4ad69 Back out changeset 7ae44e68ef10 for landing too soon, since I understand what the spec is trying to say now. r=me
Updated•4 years ago
|
Assignee | ||
Comment 13•4 years ago
|
||
Comment on attachment 9073287 [details]
Bug 1559094 - Restore old behavior for background-size: cover + zero-sized background positioning area. r=dholbert
Beta/Release Uplift Approval Request
-
User impact if declined: Some backgrounds not showing up.
-
Is this code covered by automated tests?: Yes
-
Has the fix been verified in Nightly?: No
-
Needs manual test from QE?: Yes
-
If yes, steps to reproduce: Comment 0.
-
List of other uplifts needed: None
-
Risk to taking this patch: Low
-
Why is the change risky/not risky? (and alternatives if risky): We have pretty good test coverage for this area of the code, except for this edge-case, looks like, for which I've added WPT tests:
-
https://searchfox.org/mozilla-central/search?q=&case=true®exp=false&path=backgrounds%2F*%2F*cover*
-
https://searchfox.org/mozilla-central/search?q=&case=true®exp=false&path=backgrounds%2F*cover*
-
String changes made/needed: none
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 14•4 years ago
|
||
Thanks so much for the report and the test-case René!
Comment 15•4 years ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f7addc19e0ae Restore old behavior for background-size: cover + zero-sized background positioning area. r=dholbert
Comment 16•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Comment 17•4 years ago
|
||
Verified - Fixed on latest Nightly 69.0a1 (2019-06-23) (64-bit) Build ID 20190623215020, on Windows 10 and Ubuntu 18.04.
Updating flag and waiting for fix on Beta.
Comment on attachment 9073287 [details]
Bug 1559094 - Restore old behavior for background-size: cover + zero-sized background positioning area. r=dholbert
Recent regression, verified in nightly, new automated tests, Beta68+
Comment 19•4 years ago
|
||
bugherderuplift |
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/17475 for changes under testing/web-platform/tests
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/17478 for changes under testing/web-platform/tests
Comment 22•4 years ago
|
||
Verified - Fixed on latest Beta 68.0b13, Build ID 20190624133534, on Windows 10 and Ubuntu 18.04.
Upstream PR merged
Upstream PR merged
Upstream PR merged
Upstream PR merged
Upstream PR merged
Upstream PR merged
Description
•