New issue
Advanced search Search tips

Issue 627123 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Jul 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

window.innerHeight is sometimes greater than window.outerHeight

Project Member Reported by u...@chromium.org, Jul 11 2016

Issue description

In a telemetry benchmark that navigates between pages and scrolls pages, I observe window.innerHeight being greater than window.outerHeight, which leads to assertion failure in synthetic gesture scroll.

Steps to reproduce

1. Apply https://codereview.chromium.org/2118293002 (in case it is not already landed)
2. Build Chrome for android
3. time tools/perf/run_benchmark news_mobile --browser=android-chromium --story-filter=qq

The benchmark sometimes fails with

Abort message: '[FATAL:synthetic_gesture_target_base.cc(65)] Check failed: web_touch.touches[i].state != WebTouchPoint::StatePressed || PointIsWithinContents(web_touch.touches[i].position.x, web_touch.touches[i].position.y)

which is caused by incorrect window.innerHeight in

https://cs.chromium.org/chromium/src/third_party/catapult/telemetry/telemetry/internal/actions/repeatable_scroll.py?rcl=0&l=26

 

Comment 1 by u...@chromium.org, Jul 11 2016

Owner: bokan@chromium.org
Status: Assigned (was: Untriaged)
bokan@, this seems related to  crbug.com/466718 

Could you please suggest the right owner for this?

The test navigates to page and then goes back and queries innerWidth, innerHeight.

The normal values are 412x604.
But sometimes we get 981x1437 and crash.

Comment 2 by bokan@chromium.org, Jul 11 2016

This might actually be expected. As the page loads, the layout size might change. If there's no viewport meta tag, we default to 980px layout width (probably rounded due to a weird device pixel ratio). In general, innerWidth/Height depend on pinch-zoom. If you're comparing it against touch coordinates, you likely want to use outerWidth/Height which don't change with pinch zoom.

Comment 3 by u...@chromium.org, Jul 11 2016

Thank you for super quick response and for the explanation :) 
Feel free to close as WAI.

Just to clarify, even if page is loaded and layout is completed, innerHeight can still be larger outerHeight with pinch zoom, right?
So innerHeight <= outerHeight is not a valid invariant.

Comment 4 by bokan@chromium.org, Jul 11 2016

Status: WontFix (was: Assigned)
That's correct. innerHeight will actually be larger if we zoom out. So on a page with no viewport <meta> tag, the default layout width will be 980px. So if the phone has a screen width of 320px, as the page lays out, the browser will zoom out to about 0.3 page scale (320/980) so innerWidth and innerHeight will get scaled by 1/0.3.
Labels: Hotlist-Input-Dev

Sign in to add a comment