The reporter of the webcompat bug observed that we seem to be able to work around this by adjusting the `.x` member to `0` here: https://searchfox.org/firefox-main/rev/c2e3c0aea49fb45082efdc129e79f84df7a07f48/layout/generic/nsIFrame.cpp#2760-2762,2796-2801,2803 ```cpp bool nsIFrame::ComputeOverflowClipRectRelativeToSelf( const PhysicalAxes aClipAxes, nsRect& aOutRect, nsRectCornerRadii& aOutRadii) const { ... if (MOZ_UNLIKELY(!aClipAxes.contains(PhysicalAxis::Horizontal))) { // NOTE(mats) We shouldn't be clipping at all in this dimension really, // but clipping in just one axis isn't supported by our GFX APIs so we // clip to our visual overflow rect instead. nsRect o = InkOverflowRect(); aOutRect.x = o.x; ... } ``` That's likely not the right solution exactly, but it's a good clue about where to explore here. Also, I'll move this to Layout given that that^ code is involved (in `ComputeOverflowClipRectRelativeToSelf`) which puts this probably more in the layout bucket than the web-painting bucket.
Bug 1990292 Comment 2 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
The reporter of the webcompat bug observed that we seem to be able to work around this by adjusting the `aOutRect.x` member to `0` here: https://searchfox.org/firefox-main/rev/c2e3c0aea49fb45082efdc129e79f84df7a07f48/layout/generic/nsIFrame.cpp#2760-2762,2796-2801,2803 ```cpp bool nsIFrame::ComputeOverflowClipRectRelativeToSelf( const PhysicalAxes aClipAxes, nsRect& aOutRect, nsRectCornerRadii& aOutRadii) const { ... if (MOZ_UNLIKELY(!aClipAxes.contains(PhysicalAxis::Horizontal))) { // NOTE(mats) We shouldn't be clipping at all in this dimension really, // but clipping in just one axis isn't supported by our GFX APIs so we // clip to our visual overflow rect instead. nsRect o = InkOverflowRect(); aOutRect.x = o.x; ... } ``` That's likely not the right solution exactly, but it's a good clue about where to explore here. Also, I'll move this to Layout given that that^ code is involved (in `ComputeOverflowClipRectRelativeToSelf`) which puts this probably more in the layout bucket than the web-painting bucket.