Open Bug 1910887 Opened 2 months ago Updated 7 hours ago

OOP iframes (twitter, ads) flicker while scrolling in the page on hurriyet.com.tr

Categories

(Core :: Web Painting, defect)

Desktop
All
defect

Tracking

()

Tracking Status
firefox-esr115 --- wontfix
firefox-esr128 --- affected
firefox128 --- wontfix
firefox129 --- wontfix
firefox130 --- wontfix
firefox131 --- wontfix
firefox132 --- wontfix

People

(Reporter: bmaris, Unassigned)

References

(Depends on 1 open bug, Regression)

Details

(Keywords: regression)

Found in

  • Firefox 128.1.0esr

Affected versions

  • Firefox 128.1.0esr
  • Firefox 129.0
  • Latest nightly 130.0a1
  • Firefox 115.14.0esr

Tested platforms

  • Affected platforms: macOS 13.6, Windows 11, Ubuntu 22.04
  • Unaffected platforms: none

Preconditions

  • Not having an adblock will make the bug more visually reproducible.

Steps to reproduce

  1. Visit https://www.hurriyet.com.tr/ekonomi/bakan-simsek-olumlu-gorunum-suruyor-42497081
  2. Wait for the page to fully load
  3. Scroll the page (mouse wheel, scrollbar, trackpad)

Expected result

  • No visual glitches are seen in the page.

Actual result

  • Masive glitches for the Twitter section and vertical side ads while scrolling.

Regression range

  • Not a recent regression since multiple versions of Firefox are affected Fx115 included, will go back a bit more but I have a feeling that its not a regression.

Additional notes

Has STR: --- → yes
OS: macOS → All

:nika, since you are the author of the regressor, bug 1732358, could you take a look?

For more information, please visit BugBot documentation.

Flags: needinfo?(nika)

This being regressed by fission is unfortunately not a super useful regression window. Based on the symptoms I'm thinking this is probably some weird interaction with APZ and multiprocess, but I don't know for certain.

Component: Layout → Panning and Zooming
Flags: needinfo?(nika)

Regression window w/ fission.autostart = true :
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=0a724aa35cdbb7ceef51f7af26a6aa7b5058682f&tochange=fddc190c5af5d9844851e7790602a47b7979536f

Regressed by: 2d0db7ddd092eed08468bfa23e6774cbee1ae21b Matt Woodrow — Bug 1588484 - Disable Advanced Layers for now when using fission for the window.

Regressed by: 1588484

Probably Bug 1588484 really just made this easier to see/trigger (by making rendering a bit more async, or something along those lines), rather than being directly responsible.

I captured a profile of myself scrolling slowly down the page until the bug starts reproducing. (Notably, it only starts happening once you've scrolled far enough): https://share.firefox.dev/46WCsTJ

The first flicker happens at about t=24.98s, here: https://share.firefox.dev/3XaN1PZ

I think this might be from some frame reconstruction, if I'm reading the profile correctly.

Here's another profile where I reduced the page substantially (by adding display:none to a bunch of unnecessary content/ads, while preserving the bug), and then scrolled up and down, to get more samples of just-the-actions-that-trigger-the-bug: https://share.firefox.dev/3X6VnIa

I think I've isolated the issue; more details in next comment.

So the profiles seem to show frame reconstruction coming from restyles where the restyles are triggered by a call to DOMTokenList.add inside of a function called stickyPageSkin in the page's JS, which runs whenever I scroll.

Here are (I think) the relevant lines from that function:

n = document.querySelector('.page-wrapper'),
[...]
r + e.clientHeight + 100 < t.offsetTop + t.clientHeight ?
  (e.classList.add('fixed'),
  n.classList.add('o-visible'))
  :
  (e.classList.remove('fixed'),
  n.classList.remove('o-visible'))

The addition/removal of the o-visible class here is the key thing in that JS.

Normally this .page-wrapper element has:

.page-wrapper {
[...]
  overflow-x: hidden;

...but o-visible gets briefly added and then removed during a scroll operation, and that activates this rule:

@media screen and (min-width: 1024px) {
  .page-wrapper.o-visible {
    overflow-x: visible;
  }

So the page is toggling overflow-x between visible and hidden on a root element (back and forth), which causes frame reconstruction, which causes iframe content to flash as we rebuild the rendering constructs for the iframe.

So this is essentially the same thing discussed in bug 1764655 comment 9:

Anything that causes reconstruct of the frame of a oop iframe could lead to this flicker.

In that bug (bug 1764655), it was dynamic scrollbar-width changes, and we were able to land a patch to avoid reconstructing frames for that case.

In this bug, it's overflow changes (between visible and non-visible), where I suspect we can't avoid reconstructing frames, since the container's frame type is necessarily changing with the dynamic restyle -- it toggles between requiring/not-requiring a ScrollContainerFrame wrapper for the element.

So:

  • frame-reconstruction here is probably unavoidable.
  • But I think the flicker itself might be avoidable... Probably bug 1750189 would help with this, if I'm reading it (and bug 1764655 comment 7) correctly.
Component: Panning and Zooming → Web Painting
Depends on: 1750189
See Also: → 1764655
Summary: Glitches while scrolling in the page on hurriyet.com.tr → OOP iframes (twitter, ads) flicker while scrolling in the page on hurriyet.com.tr
You need to log in before you can comment on or make changes to this bug.