Open Bug 1772273 Opened 3 years ago Updated 3 years ago

Fix edge cases in hit testing of fixed content while async scrolled

Categories

(Core :: Panning and Zooming, defect, P3)

defect

Tracking

()

People

(Reporter: botond, Unassigned)

References

Details

Attachments

(2 files)

In bug 1760368, we discovered and fixed a bug in hit testing of fixed content while async scrolled.

This bug tracks some edge cases that the fix there did not address.

"Testcase 1" is a mochitest for a case that the patches in bug 1760368 don't handle correctly.

"Testcase 2" is a mochitest for a case I thought the patches in bug 1760368 wouldn't handle correctly, but they seem to. Posting it for completeness.

A bit of description of the two test cases:

Testcase 1 contains a parent document, a child document (iframe), and an element fixed to the iframe. The test async-scrolls the parent document, and then clicks on a target inside the fixed element. The key here is that the async scroll of the parent document does affect the position of the fixed element (since it's fixed to the iframe, not to the parent doc), and therefore when querying the async transform of the parent doc, the full transform (not just the visual component) should be used. However, the patches in bug 1760368 propagate the aComponents parameter into the GetTransformToLastDispatchedPaint() call in this loop as well, thereby incorrectly restricting the parent doc's async transform to the visual component as well.

I believe testcase 1 can be fixed by simply not propagating the aComponents parameter in that loop.

Testcase 2 contains a parent document, an element fixed to the parent doc, and a scroll frame inside that fixed element. The test async-scrolls the parent document, and then clicks on a target inside the scrolled element.

My intention with testcase 2 was to demonstrate that the simple fix for testcase 1 described above is not correct, because in this case the target APZC is the child scroll frame, and it's the parent's async transform that we want to restrict to visual-component-only. However, debugging the testcase suggests that the parent doc's APZC is skipped by the loop altogether (it does not appear as the GetParent() of the child APZC). That makes things work out for this testcase, but I'm concerned it makes other things buggy...

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

However, debugging the testcase suggests that the parent doc's APZC is skipped by the loop altogether (it does not appear as the GetParent() of the child APZC). That makes things work out for this testcase, but I'm concerned it makes other things buggy...

This does make other things buggy, but not as much as I feared; bug 1773409 seems to be as bad as it gets.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: