Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e562a996c9cecf90a2d938878d51177265cc57ac
      
https://github.com/WebKit/WebKit/commit/e562a996c9cecf90a2d938878d51177265cc57ac
  Author: Kiet Ho <[email protected]>
  Date:   2026-07-13 (Mon, 13 Jul 2026)

  Changed paths:
    M Source/WebCore/dom/Document.cpp

  Log Message:
  -----------
  [Site Isolation] [intersection-observer] Update remote intersection observers 
in all frames, not just the main frame
rdar://181641524
https://bugs.webkit.org/show_bug.cgi?id=318827

Reviewed by Abrar Rahman Protyasha.

In a page with nested iframes (e.g main frame <= iframe 1 <= iframe 2),
and there's an implicit root intersection observer in iframe 2, when iframe
1 scrolls, the observer in iframe 2 should be updated too, as scrolling
may have scrolled the intersection target out of view.

In Site Isolation mode, Document::updateIntersectionObservers (called when
Page updates rendering) has code to trigger intersection observers in other
processes to update, but only when the Document is in the main frame. When
iframe 1 scrolls, the Page object in its process updates rendering, but
it's not the main frame, hence it doesn't update the observer in iframe 2.

Fix this by updating remote intersection observers when any frames update
its rendering. Since this is only needed in Site Isolation mode, don't
update if Site Isolation is not enabled.

No tests - I tried multiple ways to simulate scrolling, but they all
makes the main frame update its rendering, which would not reproduce
the issue.

* Source/WebCore/dom/Document.cpp:
(WebCore::Document::updateIntersectionObservers):

Canonical link: https://commits.webkit.org/317066@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to