Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 19ed0f7d93d1f3cb7b43c38642f4e78c68dcf3f7
      
https://github.com/WebKit/WebKit/commit/19ed0f7d93d1f3cb7b43c38642f4e78c68dcf3f7
  Author: Johannes Odland <johannes.odl...@gmail.com>
  Date:   2025-04-10 (Thu, 10 Apr 2025)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-horizontal-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-nested-2-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-nested-3-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-nested-4-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-nested-5-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-nested-expected.txt
    M Source/WebCore/html/LazyLoadImageObserver.cpp

  Log Message:
  -----------
  Use scrollMargin for lazy load intersection observer
https://bugs.webkit.org/show_bug.cgi?id=264864

Reviewed by Tim Nguyen.

Update to follow step 2 (options) in "start intersection-observing a lazy 
loading element":
- switch from using rootMargin to using scrollMargin in the 
IntersectionObserverInit dictionary.
- remove document from the IntersectionObserverInit dictionary

https://html.spec.whatwg.org/#start-intersection-observing-a-lazy-loading-element

This will allow images in scroll containers to load when they are near the 
viewport,
in stead of when they are intersecting the viewport.

This PR does not change the lazy load scroll margin, that will stay at 100%.

* Source/WebCore/html/LazyLoadImageObserver.cpp:
(WebCore::LazyLoadImageObserver::intersectionObserver):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to