-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Use scrollMargin for lazy load intersection observer #43712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use scrollMargin for lazy load intersection observer #43712
Conversation
|
EWS run on previous version of this PR (hash 99b8c96) |
|
@johannesodland - I am syncing Ref - #43713 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a test that shows the behavior difference that would fail with the previous code?
Hopefully the image-loading-lazy-in-scroller-* tests that @Ahmad-S792 is importing in #43713 will show the difference. |
|
@johannesodland - I just merged tests after green EWS, you can now rebase and see if it progresses any test case. :-) |
Thanks 🙏 I've rebased locally, but it's not passing the tests the way I expected, so I'll investigate before I push an update. |
99b8c96 to
49ceac5
Compare
|
EWS run on current version of this PR (hash 49ceac5) |
|
@johannesodland - Thanks! Good to see some WPT progressions. @nt1m - now it is up for your review or Simon. |
|
Safe-Merge-Queue: Build #54084. |
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
49ceac5 to
19ed0f7
Compare
|
Committed 293552@main (19ed0f7): https://commits.webkit.org/293552@main Reviewed commits have been landed. Closing PR #43712 and removing active labels. |
19ed0f7
49ceac5
🛠 playstation