target-densitydpi meta-viewport property is not supported

RESOLVED WONTFIX

Status

()

Firefox for Android
General
RESOLVED WONTFIX
6 years ago
10 months ago

People

(Reporter: kats, Unassigned)

Tracking

(Blocks: 1 bug)

unspecified
All
Android
Points:
---

Firefox Tracking Flags

(fennec-)

Details

See http://sunpig.com/martin/archives/2012/03/18/goldilocks-and-the-three-device-pixel-ratios.html

Presumably this property is in the HTML5 spec somewhere, we should implement support for it (in browser.js, somewhere around getViewportMetadata/getScaleRatio/updateViewportMeatadata).
See also bug 564814 which makes the same request for XUL Fennec.

The draft spec for this is here, though the target-densityDpi property is marked "at risk" in the latest Editor's Draft:
http://dev.w3.org/csswg/css-device-adapt/#meta-properties

Updated

5 years ago
tracking-fennec: --- → ?
What should we do here?  We kind of need this to allow web apps to create 1:1 mobile apps (e.g. apps that are just a canvas and want 1:1 pixels), because otherwise on high dpi displays they'll end up getting 2:1 with no way to specify they want device dpi.  I see it's not in the CSS spec any more, but it's supported by Mobile Safari, Android Browser, and Chrome on Android.
(In reply to Vladimir Vukicevic [:vlad] [:vladv] from comment #2)
> What should we do here?  We kind of need this to allow web apps to create
> 1:1 mobile apps (e.g. apps that are just a canvas and want 1:1 pixels),
> because otherwise on high dpi displays they'll end up getting 2:1 with no
> way to specify they want device dpi.  I see it's not in the CSS spec any
> more, but it's supported by Mobile Safari, Android Browser, and Chrome on
> Android.

Do we know why this is no longer in the CSS Device Adaptation spec?  If we think it is an important property, should we suggest restoring it to the spec?

Could we solve your use case with resolution media queries, perhaps combined with @viewport (also not implemented in Gecko yet; see bug 242646)?
(In reply to Matt Brubeck (:mbrubeck) from comment #3)
> Do we know why this is no longer in the CSS Device Adaptation spec?  If we
> think it is an important property, should we suggest restoring it to the
> spec?

This was apparently discussed in the CSS WG telcon on 2012-07-18, though the discussion isn't clear to me:
http://lists.w3.org/Archives/Public/www-style/2012Jul/0442.html
http://dvcs.w3.org/hg/csswg/rev/27fd3f9a5c11

(In reply to Vladimir Vukicevic [:vlad] [:vladv] from comment #2)
> I see it's not in the CSS spec any more, but it's supported by Mobile Safari,
> Android Browser, and Chrome on Android.

Is it supported in Mobile Safari now?  I know it was Android-only when I first looked into it, and the spec text said that was not supported by Safari.  If that has changed, it might alter the editor's decision...
Hm, I'm wrong -- it's not in Mobile Safari; I was looking at a Nokia page and was confused.  Still, I don't see how to get this behaviour on Mobile Safari, and it seems like it has a pretty solid use case.
(In reply to Vladimir Vukicevic [:vlad] [:vladv] from comment #5)
> Hm, I'm wrong -- it's not in Mobile Safari; I was looking at a Nokia page
> and was confused.  Still, I don't see how to get this behaviour on Mobile
> Safari, and it seems like it has a pretty solid use case.

While it might be a little more clunky in some ways, I think you can address your use case by checking window.devicePixelRatio (or some equivalent CSS media queries) and then scaling the canvas to match -- just like the techniques that are becoming widespread for adapting images to high-density displays.
Should this bug be closed?
tracking-fennec: ? → -
Duplicate of this bug: 564814
Based on https://bugs.webkit.org/show_bug.cgi?id=88047 I think this is a WONTFIX.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WONTFIX
Blocks: 677989

Updated

4 years ago
Blocks: 936906
(Reporter)

Updated

10 months ago
No longer blocks: 936906
Duplicate of this bug: 936906
You need to log in before you can comment on or make changes to this bug.