Closed Bug 1640223 Opened 11 months ago Closed 11 months ago

setDynamicToolbarMaxHeight causes incorrect viewport clipping on PennyArcade

Categories

(Core :: Graphics: WebRender, defect)

Unspecified
All
defect

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: sblatz, Assigned: hiro)

References

()

Details

Attachments

(2 files)

From Fenix issue: https://github.com/mozilla-mobile/fenix/issues/10780.

Christian did some investigation on this ticket and it looks like when we setDynamicToolbarMaxHeight to any non-zero value, the viewport for this site breaks.

Any ideas what's going on here?

Flags: needinfo?(snorp)

I think we need a Hiro :)

Flags: needinfo?(snorp) → needinfo?(hikezoe.birchill)

This is somewhat related to WebRender (it's hard to believe though). Initially I don't see any difference on the rendering between Fenix and Chrome. But I happened to realize that I did disable WebRender on my Pixel3.
(Keep NI to me)

Component: General → Graphics: WebRender
Product: GeckoView → Core

CCing Timothy.

Flags: needinfo?(hikezoe.birchill)
Flags: needinfo?(hikezoe.birchill)

Probably this is another variant of bug 1619169. (I need to build Fenix)

See Also: → 1619169

Looks like nsPresContext::mSizeForViewportUnits is something wrong.

Assignee: nobody → hikezoe.birchill
Status: NEW → ASSIGNED
Flags: needinfo?(hikezoe.birchill)

The site is a case that window.innerHeight is affected by the minimum scale size.

See Also: → 1598487
Attached file A simplified test case

The viewport units size doesn't match the aspect ratio of the screen size in
some cases.

For example, in the case of the reftest in this commit, the meta viewport is
"width=1600, height=device-height" and the screen size during reftest is
"800x1000". Thus the viewport units size will be "1600x1000". In such cases
with the old way ExnapdHeightForViewportUnits shrinks the given size
"1600x1800" to "1600x1000" with 100px dynamic toolbar max height (and the
MOZ_ASSERT in the function happens on debug builds).

Pushed by hikezoe.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bc9732b590eb
Expand the given size in ExpandHeightForViewportUnits by multiplying the 'vh value / visible area height'. r=botond
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.