<?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>279011</bug_id>
          
          <creation_ts>2024-09-02 02:49:41 -0700</creation_ts>
          <short_desc>Remove shouldDispatchedSimulatedMouseEventsAssumeDefaultPrevented for amazon.*</short_desc>
          <delta_ts>2024-09-02 04:54:57 -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>WebKit Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc>https://www.amazon.com/Exclusive-Thrilling-Heroics-Firefly-Stainless/dp/B01GIJ88XC/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>199905</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Karl Dubost">karlcow</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2056969</commentid>
    <comment_count>0</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-09-02 02:49:41 -0700</bug_when>
    <thetext>This is a bug to remove a Quirk. 

To try to reproduce.
1. Plug the iPad (landscape) to a mac.
2. Open amazon.com
3. Develop Menu -&gt; Select iPad
4. Click on the top left icon for the device settings.
5. Choose Disable site-specific hacks
6. Go to https://www.amazon.com/Exclusive-Thrilling-Heroics-Firefly-Stainless/dp/B01GIJ88XC/
7. Tap on the product image
8. A window appears on the right side with a blow up of the image and a blue grid on the original image
9. move the blue grid around

Expected:
The corresponding image on the right side is moving along. 

If I didn&apos;t misunderstand the bug, it would mean that this part can be removed.
https://github.com/WebKit/WebKit/blob/8f07bf9963e1bf4e307fc0d68556df4b21d2e95d/Source/WebCore/page/Quirks.cpp#L526-L533</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2056970</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-09-02 02:50:00 -0700</bug_when>
    <thetext>&lt;rdar://problem/135134914&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2056971</commentid>
    <comment_count>2</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-09-02 02:55:13 -0700</bug_when>
    <thetext>Notes: In the original bug report it says that the page should not scroll when moving the blue grid. 

hmm maybe I can reproduce on some images.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2056983</commentid>
    <comment_count>3</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-09-02 04:54:36 -0700</bug_when>
    <thetext>Interestingly, it seems that Amazon has a special case for iPad. 


In https://m.media-amazon.com/images/I/11e6YKvz8HL._RC|61ERslxmD0L.js,614OTpIBP-L.js,11QPSzcZzFL.js,21Tlkr4uAnL.js,31e-8pJy4aL.js_.js?AUIClients/DetailPageDesktopImageBlockMetaAsset&amp;dKPSvb9N

        r = e.detailImageUrl,
        b = e.useHoverZoomIpad || 0,

which is defined in the HTML inside a string 

var obj = jQuery.parseJSON(&apos; here JSON to parse &apos;)

which includes:

  &quot;useChildVideos&quot;: true,
  &quot;useClickZoom&quot;: false,
  &quot;useHoverZoom&quot;: true,
  &quot;useHoverZoomIpad&quot;: false,
  

I wonder if developers are puzzled by the behavior of the iPad. Maybe there&apos;s an opportunity for Outreach.

The quirk is triggered for &quot;magnifierLens&quot;.

for example

&lt;div 
    id=&quot;magnifierLens&quot; 
    style=&quot;
        position: absolute; 
        background-image: url(&amp;quot;https://m.media-amazon.com/images/G/01/apparel/rcxgs/tile._CB483369110_.gif&amp;quot;); 
        cursor: pointer; 
        width: 117px; 
        height: 162px; 
        left: 102px; 
        top: 113px;&quot;&gt;
&lt;/div&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2056984</commentid>
    <comment_count>4</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-09-02 04:54:57 -0700</bug_when>
    <thetext>All of this is handled by

```
                ca = function() {
                    function b(a) {
                        var b = Math.round(Math.min(l.width(), q.rect.width / a));
                        a = Math.round(Math.min(l.height(), q.rect.height / a));
                        r.css({
                            width: b,
                            height: a
                        });
                        d = [b, a]
                    }
                    var c = this,
                        d = [0, 0],
                        n = (q.detailSize &amp;&amp; q.detailSize[0] || 5E8) / y[2],
                        f = (q.detailSize &amp;&amp; q.detailSize[1] ||
                        5E8) / y[3];
                    n = f &gt; n ? f : n;
                    a(&quot;#magnifierLens&quot;).remove();
                    var r = a(&quot;\x3cdiv id\x3d&apos;magnifierLens&apos; /\x3e&quot;).css({
                        position: &quot;absolute&quot;
                    });
                    e.generalImageUrls.zoomLensBackground &amp;&amp; r.css({
                        backgroundImage: &quot;url(&quot; + e.generalImageUrls.zoomLensBackground + &quot;)&quot;
                    });
                    D.showMagnifierOnHover ? H(r) : r.css(&quot;cursor&quot;, &quot;pointer&quot;);
                    c.updatePosition = function() {
                        var a = [y[2] - d[0], y[3] - d[1]],
                            b = 0 &gt;= a[0] ? .5 : Math.max(0, Math.min(1, (v[0] - d[0] / 2 - y[0] - c.offset.left) / a[0])),
                            n = 0 &gt;= a[1] ? .5 : Math.max(0, Math.min(1, (v[1] - d[1] / 2 - y[1] - c.offset.top) / a[1])),
                            f = y[0] +
                            Math.round(b * a[0]);
                        a = y[1] + Math.round(n * a[1]);
                        r.get(0).style.left = f + &quot;px&quot;;
                        r.get(0).style.top = a + &quot;px&quot;;
                        return [b, n]
                    };
                    c.destroy = function() {
                        r.remove()
                    };
                    c.offset = l.offsetParent().offset();
                    b(n);
                    c.updatePosition();
                    r.appendTo(l.parent());
                    q.detailImage[0].complete || q.detailImage.load(function() {
                        var a = q.detailImage.width() / y[2];
                        b(a);
                        c.updatePosition()
                    })
                };
```</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>