Closed Bug 936355 Opened 11 years ago Closed 11 years ago

[fugu][hamachi]homescreen display nothing when booting phone with 180 degree rotating

Categories

(Firefox OS Graveyard :: General, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 934556

People

(Reporter: ying.xu, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17 Steps to reproduce: rotating phone with 180 and power on the phone homescreen didplayed nothing. Actual results: In Bug 908601 , some code was added in window.js var isDefaultPortrait = (ScreenLayout.defaultOrientation === 'portrait-primary'); var OrientationRotationArray = [ 'portrait-primary', 'portrait-secondary', 'portrait', 'landscape-primary', 'landscape-secondary', 'landscape', 'default']; var OrientationRotationTable = { 'portrait-primary': [0, 180, 0, 90, 270, 90, isDefaultPortrait ? 0 : 90], 'landscape-primary': [270, 90, 270, 0, 180, 0, isDefaultPortrait ? 0 : 270] }; AppWindow.prototype.determineRotationDegree = function aw__determineRotationDegree() { if (!this.manifest) return 0; var appOrientation = this.manifest.orientation; var orientation = this.determineOrientation(appOrientation); //ScreenLayout.defaultOrientation may have other values that not handled in OrientationRotationTable. and casue table == null var table = OrientationRotationTable[ScreenLayout.defaultOrientation]; //here, casuing table == null, the code was broken. var degree = table[OrientationRotationArray.indexOf(orientation)]; this.rotatingDegree = degree; if (degree == 90 || degree == 270) { this.frame.classList.add('perpendicular'); } return degree; };
all the values defined in nsScreen.cpp 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: aOrientation.AssignLiteral("landscape-primary"); break; case eScreenOrientation_LandscapeSecondary: aOrientation.AssignLiteral("landscape-secondary"); break; case eScreenOrientation_None: default: MOZ_CRASH("Unacceptable mOrientation value"); } }
Summary: [fugu][hamachi]homescreen display nothing when booting phone with 180 degree rotating → [fugu]homescreen display nothing when booting phone with 180 degree rotating
Severity: normal → critical
OS: All → Gonk (Firefox OS)
Priority: -- → P1
Hardware: All → ARM
Summary: [fugu]homescreen display nothing when booting phone with 180 degree rotating → [fugu][hamachi]homescreen display nothing when booting phone with 180 degree rotating
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
blocking-b2g: --- → koi?
Please follow the activity in the dupe of this bug - removing nom. It's already a koi+.
blocking-b2g: koi? → ---
ok (In reply to Jason Smith [:jsmith] from comment #3) > Please follow the activity in the dupe of this bug - removing nom. It's > already a koi+.
You need to log in before you can comment on or make changes to this bug.