Closed
Bug 810399
Opened 12 years ago
Closed 12 years ago
Add a CSS Media Query for Windows 8 Desktop theme
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
FIXED
mozilla25
People
(Reporter: Paenglab, Assigned: jimm)
References
Details
(Keywords: dev-doc-complete)
Attachments
(3 files, 3 obsolete files)
7.96 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
6.61 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
981 bytes,
text/html
|
Details |
For the Mozilla desktop applications it would be helpful when a Media Query would exist that detects the Windows 8 standard theme. Now it uses also -moz-windows-compositor which is optimized for Vista/Win7 with gradients, transparency etc.
![]() |
Assignee | |
Comment 2•12 years ago
|
||
I'm not adding a theme related metric since the default theme in Win8 is aero, despite the differences between aero on win7 and win8. So I'm going to add a -moz-windows-version selector/query instead to help clear up the ambiguity.
Comment 3•12 years ago
|
||
Aero was removed in Windows 8. The only resemblance is semi-transparent taskbar, but that's pretty much everything. The design was changed to the point where every app designed for Aero Glass doesn't fit the rest of the system in Win8.
![]() |
Assignee | |
Comment 4•12 years ago
|
||
(In reply to Peter Henkel [:Terepin] from comment #3)
> Aero was removed in Windows 8. The only resemblance is semi-transparent
> taskbar, but that's pretty much everything. The design was changed to the
> point where every app designed for Aero Glass doesn't fit the rest of the
> system in Win8.
The desktop renders differently but the theme is still stored in aero.msstyles. We use the theme name for theme detection, so -moz-windows-theme on win8 is still aero.
Reporter | ||
Comment 5•12 years ago
|
||
In Bug 855998 I used this media query construct to apply only on default Win8 theme:
@media (-moz-windows-compositor) {
@media not all and (-moz-windows-glass) {
}
}
A simpler solution would be helpful.
![]() |
Assignee | |
Comment 6•12 years ago
|
||
like -
@media (-moz-windows-version: xp,vista,win7,win8, ..) {
..
}
in addition we still have the theme selectors for xp, default theme detection for all win os, and the recently added glass detection.
We're also going to try to get bug 578780 fixed too.
![]() |
Assignee | |
Comment 7•12 years ago
|
||
Assignee: nobody → jmathies
![]() |
Assignee | |
Comment 8•12 years ago
|
||
![]() |
Assignee | |
Comment 9•12 years ago
|
||
![]() |
Assignee | |
Comment 10•12 years ago
|
||
Attachment #750648 -
Attachment is obsolete: true
Attachment #751599 -
Flags: review?(dbaron)
![]() |
Assignee | |
Comment 11•12 years ago
|
||
Comment 12•12 years ago
|
||
Comment on attachment 751599 [details] [diff] [review]
csspatch v.1
Review of attachment 751599 [details] [diff] [review]:
-----------------------------------------------------------------
Have we considered implementing this as a cross-platform selector (e.g. -moz-os-version) that we could also use for OS X or Linux in the future?
::: layout/style/nsMediaFeatures.cpp
@@ +53,5 @@
> +// Windows version identities used in the -moz-windows-version media query.
> +const WindowsVersionName winVersionStrings[] = {
> + { LookAndFeel::eWindowsVersion_XP, L"xp" },
> + { LookAndFeel::eWindowsVersion_Vista, L"vista" },
> + { LookAndFeel::eWindowsVersion_Win7, L"win7" },
Driveby naming nit: I would prefer that we used "windows" as the prefix instead of "win" as it's more descriptive and more common in for existing Windows selectors.
I also think that we should use the prefix consistently instead of leaving the prefix off of xp and vista especially with a cross-platform selector. e.g. windows-xp, windows-vista, windows-7.
![]() |
Assignee | |
Comment 13•12 years ago
|
||
(In reply to Matthew N. [:MattN] from comment #12)
> Comment on attachment 751599 [details] [diff] [review]
> csspatch v.1
>
> Review of attachment 751599 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Have we considered implementing this as a cross-platform selector (e.g.
> -moz-os-version) that we could also use for OS X or Linux in the future?
Not sure how useful that would be on Linux. On OSX we already have the theme
selectors, from my understanding those are specific to os versions.
We could make the name more generic if you like so that we can add versions on other platforms down the road.
![]() |
Assignee | |
Updated•12 years ago
|
Attachment #751599 -
Flags: review?(dbaron) → review?(bzbarsky)
![]() |
||
Comment 14•12 years ago
|
||
Do we end up exposing these to untrusted content? If so, do we want to?
![]() |
Assignee | |
Comment 15•12 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #14)
> Do we end up exposing these to untrusted content?
Yes.
> If so, do we want to?
Interesting question. I'm not sure what the right answer is here. My personal preference would be that all os specific css that we want in chrome should not since it might be useful to someone for malicious purposes.
On the flip side of this we currently expose other os specific queries to content, including glass, win and osx theme info, and theme related os configuration. So it seems we are not too worried about this in general.
If it's easy to flip these so they are chrome only, maybe we should file a bug on itemizing everything we currently expose (including these) and flip the switch on anything we don't feel content should know about.
![]() |
||
Comment 16•12 years ago
|
||
The question is whether we're ok with the fingerprinting aspects of this....
Flags: needinfo?(dbaron)
![]() |
||
Comment 17•12 years ago
|
||
Comment on attachment 751599 [details] [diff] [review]
csspatch v.1
OK, I guess while waiting on dbaron here...
Why did we need to add these to sSystemMetrics?
So what's the fingerprinting information that would be gained? If there's data here that's not already detectable by the sizes of form controls, what is it? Which version of the OS the user is running (I think it's probably pointless to even try protecting that)? Or configuration choices that they've made? (Merely default vs. non-default, or more than that?)
My inclination is probably not to worry about fingerprinting aspects here, though that might depend on answers to the above.
Flags: needinfo?(dbaron)
![]() |
Assignee | |
Comment 19•12 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #17)
> Comment on attachment 751599 [details] [diff] [review]
> csspatch v.1
>
> OK, I guess while waiting on dbaron here...
>
> Why did we need to add these to sSystemMetrics?
So that these work with moz-system-metric support.
![]() |
Assignee | |
Comment 20•12 years ago
|
||
(In reply to David Baron [:dbaron] (don't cc:, use needinfo? instead) from comment #18)
> So what's the fingerprinting information that would be gained? If there's
> data here that's not already detectable by the sizes of form controls, what
> is it? Which version of the OS the user is running (I think it's probably
> pointless to even try protecting that)? Or configuration choices that
> they've made? (Merely default vs. non-default, or more than that?)
General os version (xp, win7, win8, ..) without any guesswork. That's it.
![]() |
||
Comment 21•12 years ago
|
||
Comment on attachment 751599 [details] [diff] [review]
csspatch v.1
Ah, you want both that _and_ the media query?
OK, I guess that works. r=me modulo the fingerprinting concerns, which you should discuss with dbaron.
Attachment #751599 -
Flags: review?(bzbarsky) → review+
![]() |
Assignee | |
Comment 22•12 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #21)
> Comment on attachment 751599 [details] [diff] [review]
> csspatch v.1
>
> Ah, you want both that _and_ the media query?
That seems to be standard practice with these? I'll default to your judgement on this.
![]() |
Assignee | |
Updated•12 years ago
|
Attachment #751600 -
Flags: review?(neil)
![]() |
||
Comment 23•12 years ago
|
||
Makes sense to do the thing other cases are already doing, yeah.
Comment 24•12 years ago
|
||
Gentle review ping on Neil.
![]() |
Assignee | |
Updated•12 years ago
|
Attachment #751600 -
Flags: review?(neil) → review?(roc)
Attachment #751600 -
Flags: review?(roc) → review+
![]() |
Assignee | |
Comment 25•12 years ago
|
||
Updated test page to use more generalized media query constants requested in comment 12.
Attachment #750674 -
Attachment is obsolete: true
![]() |
Assignee | |
Comment 26•12 years ago
|
||
Comment 27•12 years ago
|
||
(In reply to Mike Conley from comment #24)
> Gentle review ping on Neil.
So gentle that I never noticed the ping.
I did get the usual Bugzilla nag of course, but I was fighting a weird build error in NSS which is why I hadn't got around to doing the review. Sorry about that.
Comment 28•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/31f741b111e0
https://hg.mozilla.org/mozilla-central/rev/87b5a0591aff
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Updated•12 years ago
|
Keywords: dev-doc-needed
Comment 29•12 years ago
|
||
Added documentation:
https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries#-moz-windows-version
and
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/25
Keywords: dev-doc-needed → dev-doc-complete
Comment 30•12 years ago
|
||
(In reply to Jean-Yves Perrier [:teoli] from comment #29)
I corrected the property name (-moz-os-version) and values:
https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries#-moz-os-version
and
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/25#CSS
Comment 31•12 years ago
|
||
The media query doesn't work on Windows 8.1. I'll fill a seperate bug soon.
Updated•11 years ago
|
Attachment #769699 -
Attachment is patch: false
Attachment #769699 -
Attachment mime type: text/plain → text/html
![]() |
Assignee | |
Comment 32•11 years ago
|
||
Attachment #769699 -
Attachment is obsolete: true
You need to log in
before you can comment on or make changes to this bug.
Description
•