[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser/tor-browser-31.1.1esr-4.x-1] Bug 13025: Lie about screen orientation.
commit 58b604e6fc832bf4044c9ab951eba6cf9767ad67
Author: Georg Koppen <gk@xxxxxxxxxxxxxx>
Date: Tue Oct 7 11:37:12 2014 +0000
Bug 13025: Lie about screen orientation.
In a non-chrome context we give 'landscape-primary' back if asked about
the screen orientation.
---
dom/base/nsScreen.cpp | 34 +++++++++++++++++++---------------
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/dom/base/nsScreen.cpp b/dom/base/nsScreen.cpp
index 76674da..7b80f8e 100644
--- a/dom/base/nsScreen.cpp
+++ b/dom/base/nsScreen.cpp
@@ -174,22 +174,26 @@ nsScreen::Notify(const hal::ScreenConfiguration& aConfiguration)
void
nsScreen::GetMozOrientation(nsString& aOrientation)
{
- switch (mOrientation) {
- case eScreenOrientation_PortraitPrimary:
- aOrientation.AssignLiteral("portrait-primary");
- break;
- case eScreenOrientation_PortraitSecondary:
- aOrientation.AssignLiteral("portrait-secondary");
- break;
- case eScreenOrientation_LandscapePrimary:
+ if (!IsChrome()) {
aOrientation.AssignLiteral("landscape-primary");
- break;
- case eScreenOrientation_LandscapeSecondary:
- aOrientation.AssignLiteral("landscape-secondary");
- break;
- case eScreenOrientation_None:
- default:
- MOZ_CRASH("Unacceptable mOrientation value");
+ } else {
+ switch (mOrientation) {
+ case eScreenOrientation_PortraitPrimary:
+ aOrientation.AssignLiteral("portrait-primary");
+ break;
+ case eScreenOrientation_PortraitSecondary:
+ aOrientation.AssignLiteral("portrait-secondary");
+ break;
+ case eScreenOrientation_LandscapePrimary:
+ aOrientation.AssignLiteral("landscape-primary");
+ break;
+ case eScreenOrientation_LandscapeSecondary:
+ aOrientation.AssignLiteral("landscape-secondary");
+ break;
+ case eScreenOrientation_None:
+ default:
+ MOZ_CRASH("Unacceptable mOrientation value");
+ }
}
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits