Closed
Bug 522149
Opened 14 years ago
Closed 14 years ago
Add CSS media queries for all features supported in :-moz-system-metric()
Categories
(Core :: CSS Parsing and Computation, defect, P2)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a1
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta2-fixed |
People
(Reporter: Felipe, Assigned: dbaron)
References
Details
(Keywords: dev-doc-complete)
Attachments
(5 files)
5.00 KB,
patch
|
bzbarsky
:
review+
roc
:
approval1.9.2+
|
Details | Diff | Splinter Review |
2.64 KB,
patch
|
bzbarsky
:
review+
roc
:
approval1.9.2+
|
Details | Diff | Splinter Review |
8.79 KB,
patch
|
bzbarsky
:
review+
roc
:
approval1.9.2+
|
Details | Diff | Splinter Review |
10.87 KB,
patch
|
bzbarsky
:
review+
roc
:
approval1.9.2+
|
Details | Diff | Splinter Review |
7.20 KB,
patch
|
Details | Diff | Splinter Review |
We should build a CSS media query for the touch features. We could use a simple one that just tests for the touch support or not, or more advanced queries for checking capabilities, e.g. number of touch points, type (pen vs finger), etc. I took a look at the media query spec but couldn't tell from it if the current media features list is a definitive one or if browsers are encouraged to have their own queries. Can we implement it now and then try to move it to the spec, or do we use a moz extension by now?
We are allowed to add our own -moz values. And yes, we should then propose them as additions to the spec.
Assignee | ||
Comment 2•14 years ago
|
||
I think the thing to do here is support everything we support as :-moz-system-metric() values as individual media features (much like 'grid'). I can write up a patch for this, unless you've already started.
Assignee | ||
Comment 3•14 years ago
|
||
I'm working on this.
Assignee: nobody → dbaron
Priority: -- → P2
Hardware: x86 → All
Assignee | ||
Comment 4•14 years ago
|
||
Attachment #406310 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 5•14 years ago
|
||
Attachment #406311 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 6•14 years ago
|
||
Attachment #406313 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 7•14 years ago
|
||
Attachment #406314 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 8•14 years ago
|
||
![]() |
||
Updated•14 years ago
|
Attachment #406310 -
Flags: review?(bzbarsky) → review+
![]() |
||
Updated•14 years ago
|
Attachment #406313 -
Flags: review?(bzbarsky) → review+
![]() |
||
Updated•14 years ago
|
Attachment #406311 -
Flags: review?(bzbarsky) → review+
![]() |
||
Comment 9•14 years ago
|
||
Comment on attachment 406311 [details] [diff] [review] patch 2: turn mKeywordList into more generic mData so I can reuse it I would prefer something like: union { const PRInt32* mKeywordTable; nsIAtom * const * mMetric; } mData; or something. Initialization should still work, and the consumer code can be a bit more readable... r=bzbarsky with that.
![]() |
||
Comment 10•14 years ago
|
||
Comment on attachment 406314 [details] [diff] [review] patch 4: implement -moz-prefixed media features for system metrics r=bzbarsky if you add asserts on mValueType in GetSystemMetric.
Attachment #406314 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 11•14 years ago
|
||
(In reply to comment #9) > or something. Initialization should still work, and the consumer code can be a > bit more readable... It would? I did what I did on the assumption that it wouldn't; I suppose I'll give it a try. (Do you happen to know of other code that does this?)
Assignee | ||
Comment 12•14 years ago
|
||
Luke Wagner explained it to me: brace it, and it will initialize the first member of the union. (So I'll add a void* for initialization.)
Assignee | ||
Comment 13•14 years ago
|
||
Revised patches: http://hg.mozilla.org/users/dbaron_mozilla.com/patches/raw-file/3a54173d5427/system-metrics-atom-list http://hg.mozilla.org/users/dbaron_mozilla.com/patches/raw-file/3a54173d5427/media-feature-data http://hg.mozilla.org/users/dbaron_mozilla.com/patches/raw-file/3a54173d5427/media-feature-pass-feature-to-getter http://hg.mozilla.org/users/dbaron_mozilla.com/patches/raw-file/3a54173d5427/media-queries-for-system-metrics http://hg.mozilla.org/users/dbaron_mozilla.com/patches/raw-file/3a54173d5427/media-queries-system-metrics-tests
Assignee | ||
Comment 14•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/c96a69f2907f http://hg.mozilla.org/mozilla-central/rev/e41cdf6f6fec http://hg.mozilla.org/mozilla-central/rev/ea59ebdadb1a http://hg.mozilla.org/mozilla-central/rev/0523cf3e62d3 http://hg.mozilla.org/mozilla-central/rev/05a53028f21f
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
Assignee | ||
Updated•14 years ago
|
Summary: Add a CSS media query for touch features → Add CSS media queries for all features supported in :-moz-system-metric()
Updated•14 years ago
|
Keywords: dev-doc-needed
Assignee | ||
Updated•14 years ago
|
Attachment #406310 -
Flags: approval1.9.2?
Assignee | ||
Updated•14 years ago
|
Attachment #406311 -
Flags: approval1.9.2?
Assignee | ||
Updated•14 years ago
|
Attachment #406313 -
Flags: approval1.9.2?
Assignee | ||
Updated•14 years ago
|
Attachment #406314 -
Flags: approval1.9.2?
Attachment #406310 -
Flags: approval1.9.2? → approval1.9.2+
Attachment #406311 -
Flags: approval1.9.2? → approval1.9.2+
Attachment #406313 -
Flags: approval1.9.2? → approval1.9.2+
Attachment #406314 -
Flags: approval1.9.2? → approval1.9.2+
Assignee | ||
Comment 15•14 years ago
|
||
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/dc5983ff33b0 http://hg.mozilla.org/releases/mozilla-1.9.2/rev/d49985311a9f http://hg.mozilla.org/releases/mozilla-1.9.2/rev/ae490b884c80 http://hg.mozilla.org/releases/mozilla-1.9.2/rev/90f38ea369f5 http://hg.mozilla.org/releases/mozilla-1.9.2/rev/dc4cdcc26f37 (merged to remove the images-in-buttons metric)
status1.9.2:
--- → final-fixed
Comment 16•14 years ago
|
||
What are the moz-windows-compositor, moz-windows-classic, and moz-maemo-classic queries for exactly? These metrics have not previously been documented, so I have nothing to easily reference. Also, is there a bug to add a media query for orientation? The rest of these have been added here: https://developer.mozilla.org/En/CSS/Media_queries#Mozilla-specific_media_features
Assignee | ||
Comment 17•14 years ago
|
||
(In reply to comment #16) > What are the moz-windows-compositor, moz-windows-classic, and moz-maemo-classic > queries for exactly? These metrics have not previously been documented, so I > have nothing to easily reference. Probably the best documentation for them is in: http://hg.mozilla.org/mozilla-central/annotate/a6273493eab4/widget/public/nsILookAndFeel.h#l238 (and there should be links to bugs if you follow the changeset links in the blame on the left side, too). > > Also, is there a bug to add a media query for orientation? We already support 'orientation' as defined in http://dev.w3.org/csswg/css3-mediaqueries/#orientation
Comment 18•14 years ago
|
||
Duh, I even already had orientation documented. Sheesh. OK, these are now all documented.
Keywords: dev-doc-needed → dev-doc-complete
Assignee | ||
Comment 19•14 years ago
|
||
I also landed an additional comment: http://hg.mozilla.org/mozilla-central/rev/4f3a789f3c3f
You need to log in
before you can comment on or make changes to this bug.
Description
•