Closed Bug 1503616 Opened 2 years ago Closed 2 years ago

Android: zooming out on a page clips the content


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

Other Branch



Tracking Status
firefox65 --- fixed


(Reporter: kats, Assigned: kats)


(Blocks 1 open bug)


(Whiteboard: [gfx-noted])


(3 files)

If you're on a page like 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
Set a animatable transform property on the root content WR stacking context. r=mstange
Propagate the zoom animation id over to the APZ code. r=botond
Use the zoom animation instead of the PinchZoom API to implement async zooming. r=botond
You need to log in before you can comment on or make changes to this bug.