Open Bug 1563842 Opened 5 years ago Updated 2 years ago

Firefox resizes the root fixedpos containing block in response to animations, while Chrome does not

Categories

(Core :: Layout: Scrolling and Overflow, defect, P3)

defect

Tracking

()

Webcompat Priority P3

People

(Reporter: dholbert, Unassigned)

References

Details

Attachments

(3 files)

Attached file testcase 1

Spinning this off of https://github.com/webcompat/web-bugs/issues/33974

STR:

  1. Load attached testcase in Firefox vs. Chrome, on Android.

EXPECTED RESULTS:
Consistent behavior

ACTUAL RESULTS:
In Firefox, the green box (at bottom-right) shifts offscreen and then back onscreen.
In Chrome, it does not.

Here's a second testcase, with a static transform on the header instead of an animation.

In this version, both Firefox and Chrome [on Android] agree that the green element runs offscreen (i.e. both Firefox and Chrome agree that the transform increases the size of the fixed-pos containing block).

To me, this demonstrates that Firefox is being internally consistent here... I don't know why Chrome would behave one way for an animated transform (disagreeing with us) vs. another way for a static transform (agreeing with us).

So maybe this is a Chrome bug... hiro, do you know if this is a compat issue that we've encountered before with mobile viewport issues?

Flags: needinfo?(hikezoe.birchill)

Also, what happens in Chrome if you trigger something that forces layout in the middle of the animation?

No, I've never seen any web compat issues related to this kind of behavior. The reason why the bottom-right box is moving is that we do periodically update scroll overflow region in the case where we have transform animations on the compositor and the animations are affecting the scroll area. Whereas, as far as I know, Chrome doesn't such things.

(In this particular case, we might want to update the visual viewport size as well)

Flags: needinfo?(hikezoe.birchill)

(In reply to David Baron :dbaron: 🏴󠁵󠁳󠁣󠁡󠁿 ⌚UTC-7 from comment #2)

Also, what happens in Chrome if you trigger something that forces layout in the middle of the animation?

Good question! Here's a testcase to exercise that behavior (with a button you can press to force layout to change).

In Chrome on Android when the animation transform is at its maximum, the button-press causes the fixedpos viewport to suddenly grow. (It grows horizontally as well as vertically -- the green element shifts rightwards and downwards. The vertical fixedpos-viewport growth [downward motion] makes no sense to me.)

In Firefox on Android, nothing special happens when you press the button.

Webcompat Priority: --- → ?
Webcompat Priority: ? → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: