<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>229687</bug_id>
          
          <creation_ts>2021-08-30 14:05:02 -0700</creation_ts>
          <short_desc>Lazyload does not work properly with negative margins</short_desc>
          <delta_ts>2021-08-31 07:05:11 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Images</component>
          <version>Safari 14</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dominic Farolino">domfarolino</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>rbuis</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1788650</commentid>
    <comment_count>0</comment_count>
    <who name="Dominic Farolino">domfarolino</who>
    <bug_when>2021-08-30 14:05:02 -0700</bug_when>
    <thetext>I&apos;m a Chromium engineer, and while looking into a lazyload bug report on Chromium (crbug.com/994329#c14) I found that WebKit&apos;s lazyload implementation did not behave properly on a site using `loading=lazy` images. Specifically, there is a discrepancy between whether the IntersectionObserver API sees an image as &quot;intersecting&quot; vs whether the lazyload implementation sees an image as &quot;intersection. See https://lazyload-study.glitch.me/crbug-994329.html for an example.

I think the IntersectionObserver API results should be the same as the lazyload implementation results, since LL is spec&apos;d based off of IntersectionObserver: https://html.spec.whatwg.org/multipage/urls-and-fetching.html#start-intersection-observing-a-lazy-loading-element.

This works correctly in Chrome and Firefox.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1788810</commentid>
    <comment_count>1</comment_count>
    <who name="Rob Buis">rbuis</who>
    <bug_when>2021-08-31 01:11:28 -0700</bug_when>
    <thetext>Hi Dom, did you assume here lazy load is enabled in Safari releases? It is not.
I checked with a local build though, and using the mini browser the test case behaves as expected, i.e. the image does not load and IO status is false. Indeed we use IO internally so we should always pass this test case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1788883</commentid>
    <comment_count>2</comment_count>
    <who name="Dominic Farolino">domfarolino</who>
    <bug_when>2021-08-31 06:27:59 -0700</bug_when>
    <thetext>Oh wow, I didn&apos;t realize it was not enabled yet, I just assumed all modern browsers supported it. Thanks, looks like this can be closed</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1788888</commentid>
    <comment_count>3</comment_count>
    <who name="Rob Buis">rbuis</who>
    <bug_when>2021-08-31 07:05:11 -0700</bug_when>
    <thetext>(In reply to Dominic Farolino from comment #2)
&gt; Oh wow, I didn&apos;t realize it was not enabled yet, I just assumed all modern
&gt; browsers supported it. Thanks, looks like this can be closed

Well, the test is still nice, I&apos;ll keep it in mind, thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>