Closed Bug 780999 Opened 12 years ago Closed 12 years ago

Viewport meta tag problems

Categories

(Firefox for Android Graveyard :: Toolbar, defect)

x86
Windows 7
defect
Not set
major

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 779527

People

(Reporter: nekr, Unassigned)

References

Details

Attachments

(1 file)

Attached file responsive.html
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/17.0 Firefox/17.0
Build ID: 20120805030518

Steps to reproduce:

I made some little test case for mobile browsers about viewport and zooming. At most browsers all is ok. On my Galaxy Nexus with Android 4.0.3 Chrome/Opera/AndroidBrowser has same behavior -- when passing into meta tag content like this "width=device-width, user-scalable=no, initial-scale=1.0" user agent scales page fit into screen, aspect viewport changes to 320-360 virtual pixels and pass this value to JavaScript env properties like innerWidth of window. 


Actual results:

Firefox on Android does something same but with some small exception: it does not changes JavaScript env properties to new actual sizes of viewport. So on Chrome we have ~360 pixels width of aspect viewport, but on Firefox fox we still have 780 pixels like a physical pixel size of device (Galaxy Nexus). This problem is on Firefox latest stable release. On latest release from Nightly problem is more. Nigthly also has not real css properties of device. So media queries in Nightly on Android matches 90dpi (may by 96) screen resolution and 780 pixels screen width, like a standard desktop monitor (probably default value?).


Expected results:

All should be ok and window.innerWidth should be ~360 pixels like on other browsers on xhdpi devices (Opera has 320 and more zoom). Also media queries should match real dimension of device.
Test case in attach.
Severity: normal → major
I wonder if this is partly caused by bug 771575.
Ok, after page load innerWidth/Height gives correct values. But that about Nightly media queries bug?
That could be the same issue as bug 779527
Yep, it's look like my post is just a duplicate..
Thanks for reporting it though! I'm going to mark this a dupe of 779527 with a dependency on 771575 so that it's linked to both of those bugs.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Depends on: 771575
Resolution: --- → DUPLICATE
Although the devicePixelRatio bug has been fixed, I'm pretty sure the window.innerWidth is still wrong (tested on Nexus 10 Firefox 25 beta). I've reported this as bug 919437.
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: