Closed Bug 1503616 Opened 6 years ago Closed 6 years ago

Android: zooming out on a page clips the content

Categories

(Core :: Graphics: WebRender, defect, P1)

Other Branch
Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: kats, Assigned: kats)

References

(Blocks 1 open bug)

Details

(Whiteboard: [gfx-noted])

Attachments

(3 files)

If you're on a page like hg.mozilla.org the default rendering is in "desktop mode" (i.e. zoomed out). In this view only the top-left corner of the page is visible, the rest is black.
I finally tracked down the bug in my WIP that addressed this. It was a silly mistake. I'll clean up the patches and put them up for review today.

The basic problem here is that the SetPinchZoom API that we're currently using applies to everything, including stuff from the chrome document. When actually the semantics of APZ zoom is that they're meant to apply to the root content process document. Rather than doing a bunch of changes inside WR to change the SetPinchZoom API implementation, I'm going with the approach Markus suggested, which is putting an animated transform in the display list and then updating the scale transform on it to reflect the pinch zoom. This seems to work well, and is similar to how we move the scrollbars asynchronously with WR. There will be additional followup changes needed to fine-tune behaviour but this approach gets us much better behaviour and is worth landing.
This sets a placeholder transform on the root stacking context for the
content display list, and allows us to modify that transform directly in
the compositor. This is similar to what
nsDisplayOwnLayer::CreateWebRenderCommands does for scroll thumb layers,
which are similarly manipulated by APZ for async scrolling.
This allows us to apply a zoom on a subset of the WR display list (the part
that is inside the stacking context with the animation property), rather
than applying globally to everything. Since the semantics of APZ zooming
is that it applies to the root content document, this results in more
correct behaviour, particularly with respect to clips from the
chrome-process document which now don't get zoomed but did before.

Depends on D11181
Priority: -- → P1
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/025172a6f7f5
Set a animatable transform property on the root content WR stacking context. r=mstange
https://hg.mozilla.org/integration/autoland/rev/7c91c5d04470
Propagate the zoom animation id over to the APZ code. r=botond
https://hg.mozilla.org/integration/autoland/rev/ba461450c817
Use the zoom animation instead of the PinchZoom API to implement async zooming. r=botond
Regressions: 1736960
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: