Closed Bug 1563717 Opened 5 years ago Closed 5 years ago

Viewport is clipped on bugzilla.mozilla.org on geckoview webrender

Categories

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

Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- disabled
firefox68 --- wontfix
firefox69 --- wontfix
firefox70 --- fixed

People

(Reporter: jnicol, Assigned: botond)

References

(Regression)

Details

(Keywords: regression)

Attachments

(4 files)

Running the geckoview example app with webrender enabled, on bugzilla.mozilla.org only the top-left quarter (not actually exactly a quarter) of the page is visible to begin with. The rest of the screen just shows the background color.

As you zoom in, the visible area of the page increases slightly faster than the rate of zooming, revealing more of the page.

This seems to be a regression from bug 1521644, so I'm a wee bit surprised I haven't ran in to it before.

Attached image Screenshot_20190705-131312.png (deleted) —

Similar looking bugs:

To me, looks pretty much same as bug 1561215, but interestingly different regressions...

Kats and I looked into this. The problem is that we have a clip in the WebRender display list that's scaled by the resolution but shouldn't be.

Assignee: nobody → botond

(The effect of bug 1521644 is largely incidental. It just shuffled around what display items have what clips in a way that exposed this scaling issue.)

The clip rect is derived from the composition bounds, which is in units that
are outside the resolution, but it's applied to the ScrollFrame item which is
inside the resolution.

Hooray! Confirmed the patch in comment 6 fixes all failure reftests on WebRender for viewport meta (bug 1520096).

Blocks: 1520096

Unfortunately, the patch regresses pinch-zoom-position-sticky.html on desktop (with WebRender): https://treeherder.mozilla.org/#/jobs?repo=try&tier=1&revision=60f3e16e5ba43910ee776de1fb8bc9f2a09ed3a8

Blocks: wr-android-nightly
No longer blocks: wr-android-mvp

The priority flag is not set for this bug.
:jbonisteel, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jbonisteel)
Flags: needinfo?(jbonisteel)
Priority: -- → P2

(In reply to Botond Ballo [:botond] from comment #8)

Unfortunately, the patch regresses pinch-zoom-position-sticky.html on desktop (with WebRender)

The change to the clip somehow results in us calculating a sticky offset of -333 where before it was 0.

(In reply to Botond Ballo [:botond] from comment #10)

The change to the clip somehow results in us calculating a sticky offset of -333 where before it was 0.

I debugged this a bit, but I don't want to go too deep down the rabbit hole here. In broad strokes, code for handling sticky elements in WebRender (or possibly code that populates its inputs in nsDisplayStickyPosition::CreateWebRenderCommands()) is confusing coordinates outside the zoom and coordinates inside the zoom.

This is a pre-existing bug that's uncovered by our clip change, and it appears to be specific to position: sticky. I suggest we mark the position: sticky test as failing for now on WR, and spin off a new bug for investigating this further, so we can go ahead and land this fix here, which unbreaks a much broader swathe of scenarios with WR + zooming.

WebRender handling of position:sticky is buggy in the presence of zooming.
The fix for bug 1563717 exposes this bug in pinch-zoom-position-sticky.html.

(In reply to Botond Ballo [:botond] from comment #11)

This is a pre-existing bug that's uncovered by our clip change, and it appears to be specific to position: sticky. I suggest we mark the position: sticky test as failing for now on WR, and spin off a new bug for investigating this further, so we can go ahead and land this fix here, which unbreaks a much broader swathe of scenarios with WR + zooming.

Filed bug 1569339 for the position:sticky issue.

Pushed by bballo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5907e3987aff
Divide the RCD-RSF ScrollFrame item's clip rect by the resolution. r=kats
https://hg.mozilla.org/integration/autoland/rev/0dd8f624159e
Mark pinch-zoom-position-sticky.html as failing on webrender. r=tnikkel
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70

Hi guys, this issue still occurs in Nightly 70.0a1 (2019-07-28) only now it happens when the user Exits RDM mode, Please see the attached file. Should we log a new issue for it ?

Flags: needinfo?(botond)
Attached image 2019-07-29_10h51_36.png (deleted) —

Clearing needinfo as the issue described in comment 16 is tracked in bug 1569626.

Flags: needinfo?(botond)

I would recommend not uplifting this to 69 unless bug 1569626 is also fixed on 69.

Given where we are in the cycle, probably best to just let this fix bake and ride with 70.

This seems to be fixed now in the steady state which is great, but whilst zooming there still seems to be problems: it looks as if the correct value is calculated during painting but it doesn't get updated for the async zoom. You can reproduce this by zooming in to bugzilla.mozilla.org, then while you zoom back out again the bottom right of the screen is clipped and the clip "jumps around". It is also apparent if you are zoomed out then tap on the search box, then the bottom-right section gets clipped out as the page automatically zooms in.

Is that caused by bug 1569339, or should I file a new issue for that as well?

Flags: needinfo?(botond)

The issue you describe sounds unrelated to bug 1569339, which affects position:sticky elements only. Please do file a new issue - thanks!

Flags: needinfo?(botond)
Regressions: 1576923
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: