Closed
Bug 930306
Opened 11 years ago
Closed 11 years ago
[Flatfish][Homescreen] grid icons shift to wrong page
Categories
(Firefox OS Graveyard :: Gaia::Homescreen, defect)
Tracking
(blocking-b2g:1.3+)
RESOLVED
FIXED
blocking-b2g | 1.3+ |
People
(Reporter: gasolin, Assigned: gasolin)
References
Details
(Whiteboard: [Flatfish only] [developer+])
Attachments
(3 files)
followup bug 921327 (Screenshot attached) while test on real device I found the strange behavior that after swipe right then left to the first screen, the icons are not hidden correctly. (it not happens on nightly) it's only for flatfish. With or without bug 921327 applied
Assignee | ||
Updated•11 years ago
|
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → gasolin
Comment 1•11 years ago
|
||
We use below value to translate each page; however, the value currently is actually portrait's windowWidth in the beginning when we unlock the screen .. https://github.com/mozilla-b2g/gaia/blob/master/apps/homescreen/js/grid.js#L28
Assignee | ||
Comment 2•11 years ago
|
||
while boot on real device, homescreen's width&height value are mixed window.innerWidth got 800, (should be 1260) window.innerHeight got 1260, (should be 800) Both reproducible in 1.2 or master. Not sure is it related to handle default in gaia system or in gecko. @alive, @viral, any thought?
Flags: needinfo?(vwang)
Flags: needinfo?(alive)
Assignee | ||
Comment 3•11 years ago
|
||
sorry, window.innerWidth should be 1280, window.innerHeight should be 780 in landscape
blocking-b2g: --- → koi?
Assignee | ||
Comment 5•11 years ago
|
||
1st kind of issue is https://bug921327.bugzilla.mozilla.org/attachment.cgi?id=820862 It caused by wrong window.innerWidth. change variable that use this value to 1280 could fix this issue. 2nd issue could be found after restart the device. The screen will be 'cut' and the screen only react within 800px width region. Open any app then back to homescreen could back to normal.
Assignee | ||
Updated•11 years ago
|
Summary: [Flatfish][Homescreen] after swipe page, icons not hide correctly in first page & 3rd page in real device → [Flatfish][Homescreen] get wrong window.innerWidth/window.innerHeight that cause grid icons shift to wrong page
Assignee | ||
Updated•11 years ago
|
Summary: [Flatfish][Homescreen] get wrong window.innerWidth/window.innerHeight that cause grid icons shift to wrong page → [Flatfish][Homescreen] get wrong window.innerWidth/.innerHeight which cause grid icons shift to wrong page
Assignee | ||
Updated•11 years ago
|
Assignee: gasolin → nobody
Comment 8•11 years ago
|
||
I check the data from nsGlobalWindow.cpp, it looks like the information is correct. In homescreen, window.innerWidth is 1280 and window.innerHeight is 800. I've check the code in homescreen, sometimes it will used the variable "windowWidth" which assigned once. https://github.com/mozilla-b2g/gaia/blob/master/apps/homescreen/js/grid.js#L40 I'm not sure if it needs consider the orientation change case. I try to replace all the "windowWidth" to "window.innerWidth" to make sure we can have the updated data, it looks more likely as our expect. Attached the picture as below: https://www.dropbox.com/s/jymdo2yn2ak61mu/IMAG0532.jpg
Flags: needinfo?(vwang)
Assignee | ||
Comment 9•11 years ago
|
||
viral, thanks for check this issue. in 2nd issue, if we restart the device, the screen will only react within 800px width region. It happens even if We replaced all windowWidth to 1280. Do you have any idea for it?
Flags: needinfo?(vwang)
Comment 10•11 years ago
|
||
Thanks for your demo again for 2nd issue. I didn't have any of idea so far but can only found TWCI server didn't have this issue which is really weird. Try to make the same commit with TWCI to see what we can do next.
Flags: needinfo?(vwang)
Assignee | ||
Comment 11•11 years ago
|
||
Hi viral, I just flashed with 11/5 gecko/gaia and can reproduced the 2nd issue...
Comment 12•11 years ago
|
||
Gaia: 51e80edcfb40082793e1f3219fc1fe2729f338f9 Gecko: b6a4edc4e3778d3844752c8998debb930890eb20 BuildID 20131105100731 Version 28.0a1
Comment 13•11 years ago
|
||
Also, the dock is gone.
Assignee | ||
Comment 14•11 years ago
|
||
dive into system and found some clue, (O) in system/js/orientation_manager.js:31 it reports w:1280 h:800 and landscape-primary (O) in system/js/screenshot.js:19 it reports w:1280 h:800 (x) in system/js/window.js AppWindow resize it reports *w:800 h:1280* w/h denotes window.innerWidth/.innerHeight Not sure which factor change the width/height in AppWindow.prototype.resize
Depends on: 908601
Flags: needinfo?(alive)
Assignee | ||
Comment 15•11 years ago
|
||
update: at start time, AppWindow.resize will report *w:800 h:1280* at first time, then change back to w:1280 h:800 logcat result: I/GeckoDump( 2714): XXX FIXME : Got a mozContentEvent: force-update-check E/GeckoConsole( 2714): Content JS LOG at app://system.gaiamobile.org/js/window.js:607 in aw_resize: XXX resize w:800 h:1280 E/GeckoConsole( 2714): Content JS LOG at app://system.gaiamobile.org/js/window.js:607 in aw_resize: XXX resize w:1280 h:800 E/GeckoConsole( 2714): Content JS LOG at app://system.gaiamobile.org/js/window.js:607 in aw_resize: XXX resize w:1280 h:800 E/GeckoConsole( 2714): Content JS LOG at app://system.gaiamobile.org/js/window.js:607 in aw_resize: XXX resize w:1280 h:800 E/GeckoConsole( 2714): Content JS LOG at app://system.gaiamobile.org/js/window.js:607 in aw_resize: XXX resize w:1280 h:800
Assignee | ||
Comment 16•11 years ago
|
||
2nd issue still spotted even provide fixed width/height in homescreen. I think it's gecko bug. could be discussed in bug 934906
Comment 17•11 years ago
|
||
I also try to lock orientation in apps/homescreen/js/homescreen.js with this api: window.screen.mozLockOrientation("default"); and remove the "orientation": "default" in apps/homescreen/manifest.webapp It looks like the 2nd kind of issue is gone.
No longer depends on: 934906
Comment 18•11 years ago
|
||
Does this mean ScreenLayout.defaultOrientation or OrientationManager.defaultOrientation is not landscape? Does https://github.com/mozilla-b2g/gaia/blob/v1.2/apps/system/js/window.js#L450 is called on launching homescreen?
Flags: needinfo?(alive)
Assignee | ||
Comment 19•11 years ago
|
||
OrientationManager.defaultOrientation is landscape-primary AppWindow.setOrientation is called once and the value is 'default'. after change via Comment 17, the 2nd issue is mitigated (but still can be spot at very short time). But many side effect happens (the orientation lock not work perperly...)
Updated•11 years ago
|
Whiteboard: [Flatfish only] [developer+]
Assignee | ||
Updated•11 years ago
|
Summary: [Flatfish][Homescreen] get wrong window.innerWidth/.innerHeight which cause grid icons shift to wrong page → [Flatfish][Homescreen] grid icons shift to wrong page
Assignee | ||
Comment 21•11 years ago
|
||
Seems the reason is system in 'globalorientationchanged' stat change the orientation to portrait-primary, which cause homescreen grid get wrong width
Attachment #828489 -
Flags: review?(alive)
Comment 22•11 years ago
|
||
clear blocking flag until we have clarity for flatfish
blocking-b2g: koi? → ---
Comment 23•11 years ago
|
||
Comment on attachment 828489 [details] [review] pull request redirect to github See github
Attachment #828489 -
Flags: review?(alive) → review+
Assignee | ||
Comment 24•11 years ago
|
||
update & merged to gaia-master https://github.com/mozilla-b2g/gaia/commit/27386c08848c3420f496d652da15d46225788144 thanks!
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(bhuang)
Resolution: --- → FIXED
Updated•11 years ago
|
blocking-b2g: --- → 1.3+
Updated•10 years ago
|
Assignee: nobody → gasolin
You need to log in
before you can comment on or make changes to this bug.
Description
•