Bug 78087 - Implement the 'resolution' media query
Summary: Implement the 'resolution' media query
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 99077 100231 100382
Blocks: 16832 93304
  Show dependency treegraph
 
Reported: 2012-02-08 01:26 PST by Simon Fraser (smfr)
Modified: 2016-04-19 17:22 PDT (History)
13 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2012-02-08 01:26:57 PST
Need to implement
http://dev.w3.org/csswg/css3-mediaqueries/#resolution0

See FIXME in MediaQueryEvaluator.cpp:
FIXME: following media features are not implemented: color_index, scan, resolution
Comment 1 Simon Fraser (smfr) 2012-02-08 01:28:11 PST
This should do the right thing when printing too (report printer output resolution).
Comment 2 Simon Fraser (smfr) 2012-02-08 01:43:21 PST
Also need to match what other browsers do when pageScale changes.
Comment 3 Radar WebKit Bug Importer 2012-02-08 12:03:32 PST
<rdar://problem/10829378>
Comment 4 Eric Meyer 2012-04-17 07:14:09 PDT
If you want a quick initial test, http://meyerweb.com/eric/css/tests/mq-valueless.html includes valueless, iPhone 4S value (I think), and min/max queries.  See test 11.  If not, no harm done.
Comment 5 Theresa O'Connor 2012-06-27 10:20:59 PDT
General comment: It's not clear to me why we would implement the resolution media query, considering how broken it is.

Eric, that isn't the correct iPhone 4S value per the spec, because the CSS dpi unit is "physical pixels per CSS inch" and a CSS inch is 96 CSS pixels. So "resolution: 192dpi" should match on an iPhone 4S.
Comment 6 Seo Sanghyeon 2012-06-27 21:46:32 PDT
How does this relate to bug 85262?
Comment 7 Simon Fraser (smfr) 2012-06-27 21:59:37 PDT
(In reply to comment #6)
> How does this relate to bug 85262?

That is about a new CSS property based on the resolution of image resources. This is about a media query based on screen resolution.
Comment 8 Adele Peterson 2012-10-23 10:01:19 PDT
Should we dupe this to https://bugs.webkit.org/show_bug.cgi?id=99077?
Comment 9 Kenneth Rohde Christiansen 2012-10-23 10:05:06 PDT
(In reply to comment #8)
> Should we dupe this to https://bugs.webkit.org/show_bug.cgi?id=99077?

It still need some special handling when printing as smfr pointed out, but maybe that is another bug
Comment 10 Kenneth Rohde Christiansen 2012-10-24 05:12:04 PDT
(In reply to comment #2)
> Also need to match what other browsers do when pageScale changes.

According to https://bugzilla.mozilla.org/show_bug.cgi?id=662061 zooming ( and I assume pageScale) should not affect the resolution values.

It currently does in Firefox 16, at least full page zoom, though not text size zoom.
Comment 11 Simon Fraser (smfr) 2013-09-09 14:04:01 PDT
Support for the 'resolution'  media query was added behind ENABLE(RESOLUTION_MEDIA_QUERY) via bug 99077.
Comment 12 Albert Scheiner 2014-12-13 20:26:10 PST
Are there any plans to enable it by default any time soon? Once dppx support lands in IE (it's currently in preview built) all other major browser have added full support.

http://dabblet.com/gist/7166616
https://status.modern.ie/dppxunitfortheresolutionmediaquery?term=dppx
Comment 13 Chris Rebert 2015-10-05 12:39:13 PDT
MS Edge has shipped this (see http://caniuse.com/#feat=css-media-resolution ), so now only WebKit doesn't support this.