The logic assumes we just have two state of screen status.

See in the http://mxr.mozilla.org/mozilla-central/source/dom/base/nsScreen.cpp#322,
we could have seven states of that as portrait, portrait-primary, portrait-secondary, landscape, landscape-primary, landscape-secondary, default.

Don't we need to consider the other states here?