[webkit-changes] [WebKit/WebKit] 3b73b0: Move code for computing Intersection Observations ...

Simon Fraser noreply at github.com
Thu Jul 13 08:53:54 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3b73b01fe3892fc3f882a4f545aa6a4e25a73210
      https://github.com/WebKit/WebKit/commit/3b73b01fe3892fc3f882a4f545aa6a4e25a73210
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2023-07-13 (Thu, 13 Jul 2023)

  Changed paths:
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/html/LazyLoadFrameObserver.cpp
    M Source/WebCore/page/IntersectionObserver.cpp
    M Source/WebCore/page/IntersectionObserver.h

  Log Message:
  -----------
  Move code for computing Intersection Observations from document to IntersectionObserver
https://bugs.webkit.org/show_bug.cgi?id=259173
rdar://112176104

Reviewed by Cameron McCormack.

Move most the Intersetion Observer-related code in Document into IntersectionObserver.cpp
for better encapsulation.

The only behavior change is to keep RefPtr to the IntersectionObserver while running the code.

* Source/WebCore/dom/Document.cpp:
(WebCore::Document::updateIntersectionObservations):
(WebCore::expandRootBoundsWithRootMargin): Deleted.
(WebCore::computeClippedRectInRootContentsSpace): Deleted.
(WebCore::computeIntersectionState): Deleted.
* Source/WebCore/html/LazyLoadFrameObserver.cpp:
* Source/WebCore/page/IntersectionObserver.cpp:
(WebCore::expandRootBoundsWithRootMargin):
(WebCore::computeClippedRectInRootContentsSpace):
(WebCore::computeIntersectionState):
(WebCore::IntersectionObserver::updateObservations):
* Source/WebCore/page/IntersectionObserver.h:

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




More information about the webkit-changes mailing list