Bug 619019 - Use -moz-device-orientation when needed [r=mbrubeck]

This commit is contained in:
Mark Finkle 2010-12-15 14:15:42 -05:00
parent 5a714fdd36
commit fc38d3fc56
2 changed files with 18 additions and 4 deletions

View File

@ -167,7 +167,13 @@ let Util = {
},
isPortrait: function isPortrait() {
return (window.innerWidth < 500);
#ifdef MOZ_PLATFORM_MAEMO
return (screen.width <= screen.height);
#elifdef ANDROID
return (screen.width <= screen.height);
#else
return (window.innerWidth <= window.innerHeight);
#endif
}
};

View File

@ -35,6 +35,14 @@
*
* ***** END LICENSE BLOCK ***** */
%ifdef MOZ_PLATFORM_MAEMO
%define ORIENTATION -moz-device-orientation
%elifdef ANDROID
%define ORIENTATION -moz-device-orientation
%else
%define ORIENTATION orientation
%endif
/* main toolbar (URL bar) -------------------------------------------------- */
#toolbar-main {
-moz-appearance: none;
@ -456,14 +464,14 @@ toolbarbutton.choice-remotetabs {
}
/* addons panel UI ------------------------------------------------------- */
@media (min-width: 500px) {
%expand @media (__ORIENTATION__: landscape) {
#addons-repo {
-moz-box-orient: horizontal;
-moz-box-align: center;
}
}
@media (max-width: 499px) {
%expand @media (__ORIENTATION__: portrait) {
#addons-repo {
-moz-box-orient: vertical;
-moz-box-pack: center;
@ -1207,7 +1215,7 @@ pageaction:not([image]) > hbox >.pageaction-image {
}
/* Put setting textboxes on a separate row in portrait */
@media (max-width: 499px) {
%expand @media (__ORIENTATION__: portrait) {
.setting-integer,
.setting-string {
-moz-box-align: start;