Closed Bug 1189879 Opened 7 years ago Closed 7 years ago

Fennec desktop mode temporarily uses a 480px viewport height


(Firefox for Android Graveyard :: Toolbar, defect)

Not set


(firefox42 fixed)

Firefox 42
Tracking Status
firefox42 --- fixed


(Reporter: kats, Assigned: kats)




(1 file)

If desktop mode is enabled in Fennec, and updateViewportSize gets called in browser.js, then there are two calls to setBrowserSize. The first call at [1] sets a viewport height of 480 (which comes from [2]), and the second call at [3] sets a more correct viewport height (which is based on the screen dimensions and maintains the right aspect ratio). The first viewport height is just bogus and we shouldn't be doing that. It causes an unnecessary reflow and introduces a potential for the scroll position to get incorrectly clamped for no good reason.

Attached patch PatchSplinter Review
Setting it to -1 causes updateViewportSize to recompute it based on the screen aspect ratio, which is what we want here.
Attachment #8641794 - Flags: review?(snorp)
Attachment #8641794 - Flags: review?(snorp) → review+
purely fyi / not directly related here, I'd suspected this codepath causing issues in my initial implementation of a test for the new Gecko SelectionCarets ...

On-the-fly zoomContraints calcs during tab/page loads seemed to cause (random orange) event coords to be scaled wrong if the tests ran early.

Structuring the test as [0] allowed for stability.

I'd find it strange if this patch fixed your test issues. Although yes, in general the initial load of pages causes pretty bad thrashing of the zoom constraints and and viewports and such. All that should be fixed by the move to APZ and the C++ counterparts to this code.
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.