Closed Bug 1559094 Opened 5 years ago Closed 5 years ago

background-size:cover with background-origin: content-box causes missing images

Categories

(Core :: CSS Parsing and Computation, defect, P2)

68 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla69
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)

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.

Attached file MVCE.html

Added a minimal, complete, and verifiable example.

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.

Status: UNCONFIRMED → NEW
Component: Untriaged → CSS Parsing and Computation
Ever confirmed: true
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → All

Bugbug thinks this bug is a regression, but please revert this change in case of error.

Keywords: regression

Can we narrow this down to a smaller regression window?

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

Has Regression Range: --- → yes
Has STR: --- → yes
Regressed by: 1547792

Emilio, can you please look into this?

Flags: needinfo?(emilio)

Thanks, yeah.

[Tracking Requested - why for this release]: Recent regression that would be nice not to ship.

Assignee: nobody → emilio
Priority: -- → P2

I filed https://github.com/w3c/csswg-drafts/issues/4049 on the spec not saying anything close to what implementations do.

Flags: needinfo?(emilio)
Summary: background-size:cover without height:auto causes missing images → background-size:cover with background-origin: content-box causes missing images

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.

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).

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
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
Attachment #9073287 - Attachment description: Bug 1559094 - Restore old behavior for background-size: cover + zero-height background positioning area. r=dholbert → Bug 1559094 - Restore old behavior for background-size: cover + zero-sized background positioning area. r=dholbert

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

Attachment #9073287 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Thanks so much for the report and the test-case René!

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
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
QA Whiteboard: [qa-triaged]

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.

Flags: qe-verify+

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+

Attachment #9073287 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
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

Verified - Fixed on latest Beta 68.0b13, Build ID 20190624133534, on Windows 10 and Ubuntu 18.04.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: