Open Bug 1251327 Opened 4 years ago Updated Last year

Outer block "width" issue with inner "srcset" images with higher pixel density

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect)

44 Branch
defect
Not set

Tracking

()

UNCONFIRMED

People

(Reporter: arnis.juraga, Unassigned)

References

Details

Attachments

(1 file)

Attached image sshot-142.png
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36

Steps to reproduce:

Create two images: 
- one 304px width
- another 608px width.

Set them accordingly to correct srcset values.

Like this:

~~~
<style>
    #forest{   
		border: 1px solid red;
		float:left;
		margin-top: 15px;
		width: initial;
	}
</style>

<div id="forest">
        <img src="http://i.imgur.com/CW3MCgi.png" srcset="http://i.imgur.com/CW3MCgi.png 1x, http://i.imgur.com/AGNo2V6.jpg 2x" alt="Firefox Outer block width inner srcset image" />
    </div>
~~~


Open the page on 2x pixel density monitor.



Actual results:

Outer block element "width" sets to 2x than inner image width. 
Only on Firefox. Other tested browsers sets outer block width the same, as displayed inner image width.


Expected results:

Outer block width should be set to same, as inner image width.
Could you give a testcase, from here http://codepen.io/pen/ eg.
Flags: needinfo?(arnis.juraga)
Please, see Codepen here: 

http://codepen.io/anon/pen/ONLvWR
Flags: needinfo?(arnis.juraga)
Component: Untriaged → Layout: Images
Might be the same as bug 1149357.
(In reply to Arnis from comment #0)
> Open the page on 2x pixel density monitor.
> http://codepen.io/anon/pen/ONLvWR
[1] I can also reproduce the issue on normal DPI, by increasing zoom level to 110% and higher.

> Outer block element "width" sets to 2x than inner image width. Only on Firefox.
> Other tested browsers sets outer block width the same, as displayed inner image width.
I used [1] to verify that this bug isn't present on GoogleChrome (that doesn't support DPI levels as far as I know). And yes, this bug doesn't happen when using GoogleChrome.
Depends on: 1149357
Product: Core → Core Graveyard
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.