Closed
Bug 910098
Opened 12 years ago
Closed 12 years ago
images in tables on wikipedia (mobile) resized beyond viewport's width when page load is done
Categories
(Web Compatibility :: Site Reports, defect)
Tracking
(firefox23 unaffected, firefox24 unaffected, firefox25- affected, firefox26- affected)
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
firefox23 | --- | unaffected |
firefox24 | --- | unaffected |
firefox25 | - | affected |
firefox26 | - | affected |
People
(Reporter: nirvn.asia, Assigned: hsteen)
References
()
Details
(Keywords: regression, reproducible, Whiteboard: [sitewait][country-all])
Attachments
(3 files)
Browsing Wikipedia on Firefox Android is hampered by an issue which results in tables elements growing beyond viewport's width due to images in these tables resized when page load is done.
Steps to reproduce:
1. Visit a wikipedia page with a summary table featuring a landscape image (for e.g. http://en.m.wikipedia.org/wiki/Bialowieza_Forest)
2. When page load is over, you'll notice the landscape image at the top of the summary table will be resized beyond viewport width, and with it resizing the whole table
Comment 1•12 years ago
|
||
What device and version of Firefox are you seeing this on? I'm unable to reproduce on my Galaxy Q running nightly.
Reporter | ||
Comment 2•12 years ago
|
||
I'm seeing this on Firefox's latest nightly build, without any add-on installed. My device is a Samsung Galaxy Note 2.
Comment 3•12 years ago
|
||
Aaron, can you repro on the Note 2? (IIRC you have one but I could be wrong)
Flags: needinfo?(aaron.train)
Comment 4•12 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #3)
> Aaron, can you repro on the Note 2? (IIRC you have one but I could be wrong)
Yes; and this is a regression.
Flags: needinfo?(aaron.train)
Updated•12 years ago
|
tracking-fennec: --- → ?
status-firefox23:
--- → unaffected
status-firefox24:
--- → unaffected
status-firefox25:
--- → affected
status-firefox26:
--- → affected
Comment 5•12 years ago
|
||
Proper formatting in Firefox 24 on the mozilla-beta channel (and similar formatting in Firefox 23 on the mozilla-release channel).
This seems to be a regression currently starting on mozilla-aurora.
Comment 6•12 years ago
|
||
http://hg.mozilla.org/mozilla-central/pushloghtml?startdate=2013-07-04&enddate=2013-07-05
Bug 803207?
Blocks: 803207
Flags: needinfo?(bugmail.mozilla)
Updated•12 years ago
|
Keywords: regressionwindow-wanted
Comment 7•12 years ago
|
||
Ok, I can repro on HiDPI devices. I am able to reproduce on desktop too if I simulate the behaviour of a Hi-DPI device (i.e. set layout.css.devPixelsPerPx to 2.0, switch to a Fennec UA string, and use responsive design mode to have a smaller window). I believe this is either intended behaviour or a tech evangelism issue. It could be that they worked around our previous incorrect behaviour and now that we are returning correct values for window.devicePixelRatio and CSS media queries it is behaving incorrectly or exposing a bug in the wikimedia code. Moving to Evangelism.
Assignee: nobody → english-us
Component: Graphics, Panning and Zooming → English US
Flags: needinfo?(bugmail.mozilla)
Product: Firefox for Android → Tech Evangelism
Updated•12 years ago
|
Blocks: wikipedia.org
Updated•12 years ago
|
Assignee: english-us → nobody
Component: English US → Mobile
Updated•12 years ago
|
tracking-fennec: ? → ---
![]() |
Assignee | |
Comment 8•12 years ago
|
||
This is the JS: https://gist.github.com/hallvors/6549877
I don't see any sniffing, and the same code runs in the Android browser. Without being very familiar with srcset logic, it all seems to make sense to me. The image has height and width specified. Why does it grow when .src is set to an image with bigger dimensions?
Unless someone can point out a problem in this code, it doesn't seem like a Tech Evangelism issue.
Updated•12 years ago
|
Flags: needinfo?(bugmail.mozilla)
Comment 9•12 years ago
|
||
Yeah I think you're right. I didn't realize that the width and height properties were set on the image element. If that is the case then layout shouldn't be resizing the image to be larger in CSS pixels if the devicePixelRatio goes up. However that appears to be what it is doing.
Move to core layout. Thanks for looking into this Hallvord!
Updated•12 years ago
|
Flags: needinfo?(bugmail.mozilla)
![]() |
||
Updated•12 years ago
|
tracking-firefox25:
--- → ?
tracking-firefox26:
--- → ?
![]() |
||
Comment 10•12 years ago
|
||
This regressed before 2013-07-22 as I tested a build from that date.
![]() |
Assignee | |
Comment 11•12 years ago
|
||
![]() |
Assignee | |
Comment 12•12 years ago
|
||
I knew there would be something more to this story, so I had another look..
Wikipedia applies some CSS here that contributes to the problem, namely
.image img{width:auto!important; height:auto!important}
So, this (in Gecko) overrides the <img width="284" height="189"> attributes for this image and makes it grow when src is set to a larger graphic. To me this looks like a reasonable thing to do. It's not what the normal WebKit-based browser on Android does. However, Opera Mobile (Presto) does like Firefox - and since I personally think that's correct behaviour (without being deeply familiar with the CSS spec here) I'll grab this for Tech Evang again..
Component: Layout: Images → Mobile
Product: Core → Tech Evangelism
![]() |
Assignee | |
Comment 13•12 years ago
|
||
Ryan, a (newly added?) script for faking @srcset support is causing trouble here. Known?
Flags: needinfo?(rlane)
Whiteboard: [sitewait][country-all]
![]() |
Assignee | |
Updated•12 years ago
|
Blocks: wikipedia.org
![]() |
||
Comment 14•12 years ago
|
||
> So, this (in Gecko) overrides the <img width="284" height="189"> attributes
That's what the CSS spec requires it to do, yes.
![]() |
||
Comment 15•12 years ago
|
||
And thank you very much for digging into this!
Comment 16•12 years ago
|
||
I believe this is https://bugzilla.wikimedia.org/show_bug.cgi?id=49440
![]() |
||
Updated•12 years ago
|
![]() |
||
Comment 17•12 years ago
|
||
Not tracking given low criticality and the fact that this is now a well-owned TE issue. Hallvord, seems like you've got this?
Assignee: nobody → hsteen
![]() |
Assignee | |
Comment 18•12 years ago
|
||
Yes, I'll handle it.
Clearing the needinfo for Ryan because there is a known bug over there.
Status: NEW → ASSIGNED
Flags: needinfo?(rlane)
Comment 19•12 years ago
|
||
This blog post seems to be describing this issue: http://blog.room34.com/archives/5042
![]() |
Assignee | |
Comment 20•12 years ago
|
||
They are fixing the problem: https://gerrit.wikimedia.org/r/#/c/84544/3/stylesheets/common/hacks.css
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Tech Evangelism → Web Compatibility
Updated•1 year ago
|
Component: Mobile → Site Reports
You need to log in
before you can comment on or make changes to this bug.
Description
•