>
>
> Thanks, that sounds like a strict improvement.
>
Yes.

ExplainerNone
>>>>
>>>
> A short (inline) explainer would help reviewers to understand e.g. if this
> involves changes to the API surface that developers need to care about.
> Can you write a few words on the impact on developers?
>
Here's a link to the explainer I extracted out of the motivation section:
https://gist.github.com/tcaptan-cr/bf0ac25f77cb6b6c58c916e6577d91c3
I added it to the "Doc link(s)" section in Chrome Platform Status tool
since I didn't see a specific place label "Explainer".
This change is internal to how we set up the intersection observer for lazy
loaded images and no new API surface is exposed.
Developers only need to add the `loading="lazy"` attribute to the out of
viewport images like they did before, the only difference being that the
images now will load when near the viewport like expected instead of
loading late, when at least one pixel is intersecting the viewport.

Specificationhttps://html.spec.whatwg.org/#lazy-load-root-margin
>>>>
>>>
> The spec doesn't mention anything specific around root margins or scroll
> margins (other than the algorithm name).
> Are these concepts interoperable?
>
 It is mentioned in the intersection observer setup options:
"The options is an IntersectionObserverInit
<https://w3c.github.io/IntersectionObserver/#dictdef-intersectionobserverinit>
dictionary
with the following dictionary members: «[ "scrollMargin" → lazy load scroll
margin <https://html.spec.whatwg.org/#lazy-load-root-margin> ]»"
As for interoperability between them, you can think of scrollMargin as a
superset of rootMargin. In cases without nested scrollers, initializing an
intersection observer with either scroll or root margin will behave the
same. However, in cases with nested scrollers, using root margin will cause
images to load late while using scroll margin will cause them to load as
expected.


On Tue, Nov 21, 2023 at 9:37 PM Yoav Weiss <yoavwe...@chromium.org> wrote:

> Thanks, that sounds like a strict improvement.
>
> On Wed, Nov 22, 2023 at 6:25 AM Traian Captan <tcap...@chromium.org>
> wrote:
>
>> Yes, that's correct.
>>
>>
>> On Tue, Nov 21, 2023 at 9:18 PM Yoav Weiss <yoavwe...@chromium.org>
>> wrote:
>>
>>> Do I understand correctly that currently lazy-loaded images in CSS
>>> scrollers have suboptimal behavior and this would improve that without
>>> potentially harming other cases?
>>>
>>> On Wed, Nov 22, 2023 at 1:55 AM Traian Captan <tcap...@chromium.org>
>>> wrote:
>>>
>>>> Contact emailstcap...@chromium.org
>>>>
>>>> ExplainerNone
>>>>
>>>
> A short (inline) explainer would help reviewers to understand e.g. if this
> involves changes to the API surface that developers need to care about.
> Can you write a few words on the impact on developers?
>
>
>>>>
>>>> Specificationhttps://html.spec.whatwg.org/#lazy-load-root-margin
>>>>
>>>
> The spec doesn't mention anything specific around root margins or scroll
> margins (other than the algorithm name).
> Are these concepts interoperable?
>
>
>>
>>>>
>>>> Summary
>>>>
>>>> Changes the lazy load intersection observer's init dictionary to use a
>>>> scrollMargin instead of a rootMargin. This allows lazy loading images
>>>> contained inside CSS scrollers, like carousels, to load as expected when
>>>> near the viewport instead of the current behavior where these images load
>>>> when at least one pixel is intersecting the viewport.
>>>>
>>>>
>>>> Blink componentBlink>Image
>>>> <https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3EImage>
>>>>
>>>> Search tagslazyload <https://chromestatus.com/features#tags:lazyload>,
>>>> scrollmargin <https://chromestatus.com/features#tags:scrollmargin>
>>>>
>>>> TAG reviewNone
>>>>
>>>> TAG review statusNot applicable
>>>>
>>>> Risks
>>>>
>>>>
>>>> Interoperability and Compatibility
>>>>
>>>> Overall low as scroll margin also applies to the root element thus not
>>>> affecting lazy loading images that are currently loading with just a root
>>>> margin.
>>>>
>>>>
>>>> *Gecko*: Positive (
>>>> https://github.com/w3c/IntersectionObserver/issues/431)
>>>> https://bugzilla.mozilla.org/show_bug.cgi?id=1864794
>>>>
>>>> *WebKit*: Positive (
>>>> https://github.com/w3c/IntersectionObserver/issues/431#issuecomment-930602435
>>>> ) https://bugs.webkit.org/show_bug.cgi?id=264864
>>>>
>>>> *Web developers*: Positive (
>>>> https://bugs.chromium.org/p/chromium/issues/detail?id=1391989)
>>>>
>>>> *Other signals*:
>>>>
>>>> WebView application risks
>>>>
>>>> Does this intent deprecate or change behavior of existing APIs, such
>>>> that it has potentially high risk for Android WebView-based applications?
>>>>
>>>> None
>>>>
>>>>
>>>> Debuggability
>>>>
>>>> None
>>>>
>>>>
>>>> Will this feature be supported on all six Blink platforms (Windows,
>>>> Mac, Linux, Chrome OS, Android, and Android WebView)?Yes
>>>>
>>>> Is this feature fully tested by web-platform-tests
>>>> <https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md>
>>>> ?Yes
>>>>
>>>>
>>>> https://wpt.fyi/results/html/semantics/embedded-content/the-img-element?label=master&label=experimental&aligned&q=image-loading-lazy-in-
>>>>
>>>>
>>>> Flag name on chrome://flagsLazyLoadScrollMargin
>>>>
>>>> Finch feature nameNone
>>>>
>>>> Non-finch justification
>>>>
>>>> This feature is behind an enabled-by-default flag that can be disabled
>>>> if needed.
>>>>
>>>>
>>>> Requires code in //chrome?False
>>>>
>>>> Tracking bug
>>>> https://bugs.chromium.org/p/chromium/issues/detail?id=1391989
>>>>
>>>> Estimated milestones
>>>> Shipping on desktop 121
>>>> DevTrial on desktop 121
>>>> Shipping on Android 121
>>>> DevTrial on Android 121
>>>> Shipping on WebView 121
>>>>
>>>> Anticipated spec changes
>>>>
>>>> Open questions about a feature may be a source of future web compat or
>>>> interop issues. Please list open issues (e.g. links to known github issues
>>>> in the project for the feature specification) whose resolution may
>>>> introduce web compat/interop risk (e.g., changing to naming or structure of
>>>> the API in a non-backward-compatible way).
>>>> None
>>>>
>>>> Link to entry on the Chrome Platform Status
>>>> https://chromestatus.com/feature/5106926245642240
>>>>
>>>> Links to previous Intent discussionsIntent to prototype:
>>>> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFxahvtrmHkoOpTuD2eZYVOyFuAhP8ZFVoTuNBS8zYTVY%3DTaaQ%40mail.gmail.com
>>>>
>>>> This intent message was generated by Chrome Platform Status
>>>> <https://chromestatus.com/>.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "blink-dev" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to blink-dev+unsubscr...@chromium.org.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFxahvsUb0GEG9WNWRN7Akkowjm03gLj%2Biiq5rG8%2BzdAWMBTNA%40mail.gmail.com
>>>> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFxahvsUb0GEG9WNWRN7Akkowjm03gLj%2Biiq5rG8%2BzdAWMBTNA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to blink-dev+unsubscr...@chromium.org.
To view this discussion on the web visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFxahvvx7%3D9Ky%3DAzJXvVFCiL23vT5fY8k3Fi7imbuhKiz3LQcg%40mail.gmail.com.

Reply via email to