Closed Bug 1024834 Opened 10 years ago Closed 6 years ago

Window and document sizes are reported as 0x0 when a packaged app is launched programmatically and display power is turned off.

Categories

(Firefox OS Graveyard :: Gaia::System::Window Mgmt, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jujjyl, Unassigned)

Details

1. Connect your FFOS device via USB, make sure ADB and DevTools debugging options are enabled.
2. Run the following commands on the command line:

wget https://raw.githubusercontent.com/kripken/emscripten/incoming/tools/ffdb.py
chmod +x ffdb.py
wget http://clb.demon.fi/bugs/dip.zip
./ffdb.py hide-prompt

3. Wait for the phone to reboot. (note: The above permanently sets the pref devtools.debugger.prompt-connection to false on your phone. Call ffdb.py restore-prompt later to permanently undo this step)

4. Once the phone has rebooted, disable the lock screen from settings.
5. Navigate to home menu, and power off the screen.
6. Run the following command on the command line:

./ffdb.py install dip.zip --run --log

Observed: The log reads

I/@dip.html:10: window.devicePixelRatio: 1.5
E/@dip.html:11: screen.width/height: 320x569
E/@dip.html:12: screen.availWidth/height: 320x569
E/@dip.html:13: window.innerWidth/height: 0x0
E/@dip.html:14: window.outerWidth/height: 0x0
E/@dip.html:15: document.body.clientWidth/height: 0x0
E/@dip.html:16: document.body.offsetWidth/height: 0x0
E/@dip.html:17: document.body.scrollWidth/height: 0x0
E/@dip.html:18: document.documentElement.clientWidth/height: 0x0
E/@dip.html:19: document.documentElement.offsetWidth/height: 0x0
E/@dip.html:20: document.documentElement.scrollWidth/height: 0x0
I/@dip.html:21: document.documentElement.getBoundingClientRect().width/height: 0x0

Expected: The log should read

I/@dip.html:10: window.devicePixelRatio: 1.5
E/@dip.html:11: screen.width/height: 320x569
E/@dip.html:12: screen.availWidth/height: 320x569
E/@dip.html:13: window.innerWidth/height: 320x569
E/@dip.html:14: window.outerWidth/height: 320x569
E/@dip.html:15: document.body.clientWidth/height: 320x569
E/@dip.html:16: document.body.offsetWidth/height: 320x569
E/@dip.html:17: document.body.scrollWidth/height: 320x569
E/@dip.html:18: document.documentElement.clientWidth/height: 320x569
E/@dip.html:19: document.documentElement.offsetWidth/height: 320x569
E/@dip.html:20: document.documentElement.scrollWidth/height: 320x569
I/@dip.html:21: document.documentElement.getBoundingClientRect().width/height: 320x569.3333129882812
While the STR uses ffdb, I checked that the same behavior exists when launching the app with the 'Debug' button interactively in App Manager.
(In reply to Jukka Jylänki from comment #1)
> While the STR uses ffdb, I checked that the same behavior exists when
> launching the app with the 'Debug' button interactively in App Manager.

I cannot reproduce.
1. Connect to device
2. Screen off
3. Launch a never-being-launched-app
4. Debug the app and type window.innerWidth / screen.width
Both of them are not 0.
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.