inline-block/floated parent of <picture> with a srcset/2x on HiDPI monitor is twice as wide as the image

RESOLVED DUPLICATE of bug 1149357

Status

()

Core
Layout: Images
RESOLVED DUPLICATE of bug 1149357
7 months ago
6 months ago

People

(Reporter: Thomas Wisniewski, Unassigned)

Tracking

unspecified
Points:
---

Firefox Tracking Flags

(firefox54 affected, firefox55 affected, firefox56 affected)

Details

(Whiteboard: [webcompat])

Attachments

(1 attachment)

(Reporter)

Description

7 months ago
Created attachment 8891579 [details]
testcase.html

In the attached testcase there is a <picture> element with a srcset that has a 2x green image option. That <picture> is in an inline-block element with a red background.

When the picture is rendered on a HiDPI display (at least on my Intel Iris MacBook Pro), then that parent element ends up being twice the width as the rendered image. The parent element can also be floated to achieve the same effect.

Other browsers do not do this, and on a regular DPI screen the behavior doesn't seem to manifest (or when there is no "2x" image option in the srcset).
Flags: webcompat?
status-firefox54: --- → affected
status-firefox55: --- → affected
status-firefox56: --- → affected
(Reporter)

Comment 1

7 months ago
jdm, do you have any thoughts on this?
Flags: needinfo?(josh)
Flags: needinfo?(aschen)
Last good revision: ad587ca628cf (2015-03-28)
First bad revision: 385840329d91 (2015-03-29)
Pushlog:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=ad587ca628cf&tochange=385840329d91
Flags: needinfo?(aschen)

Comment 3

6 months ago
I suspect bug 1139560 made this srcset value be parsed correctly, but is not actually the cause of the layout issue here.
(In reply to Josh Matthews [:jdm] from comment #3)
> I suspect bug 1139560 made this srcset value be parsed correctly, but is not
> actually the cause of the layout issue here.

Yes, it seems the case.
I found that <img> render was broken first(no layout issue before it's broken) and then layout issue introduced within this broken period and appeared after bug 1139560.
David, this bug could be a dupe of bug 1149357. Can you help to confirm? Thanks.
Flags: needinfo?(dbaron)
Status: NEW → RESOLVED
Last Resolved: 6 months ago
Flags: needinfo?(dbaron)
Resolution: --- → DUPLICATE
Duplicate of bug: 1149357

Updated

6 months ago
Flags: needinfo?(josh)
You need to log in before you can comment on or make changes to this bug.