<?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>226725</bug_id>
          
          <creation_ts>2021-06-07 04:47:08 -0700</creation_ts>
          <short_desc>MouseEvent.constructor misses checking if the param value is non-infinite or not</short_desc>
          <delta_ts>2021-06-16 10:59:38 -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 Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="zyscoder@gmail.com">zyscoder</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>graouts</cc>
    
    <cc>sam</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1767409</commentid>
    <comment_count>0</comment_count>
    <who name="zyscoder@gmail.com">zyscoder</who>
    <bug_when>2021-06-07 04:47:08 -0700</bug_when>
    <thetext>Steps to reproduce:

(1) Open a tab and navigate to any URL;
(2) Run the following code in the Console of Devtools:
```
new MouseEvent(&apos;&apos;,{screenX: NaN});
```
(3) This code would be evaluated successfully without any exceptions thrown.

Actual results:

This code would be evaluated successfully without any exceptions thrown.

Expected results:

In Chome, this code would throw an exception: `Uncaught TypeError: Failed to construct &apos;MouseEvent&apos;: The provided double value is non-finite.`.
It seems reasonable to throw such an exception since the type of the screenX param is double.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1767639</commentid>
    <comment_count>1</comment_count>
    <who name="zyscoder@gmail.com">zyscoder</who>
    <bug_when>2021-06-07 19:35:02 -0700</bug_when>
    <thetext>As https://docs.w3cub.com/dom/mouseevent/screenx says, screenX is `A double floating point value. Early versions of the spec defined this as an integer referring to the number of pixels`.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1767847</commentid>
    <comment_count>2</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2021-06-08 11:57:05 -0700</bug_when>
    <thetext>Looks like the latest version of UIEvents still has this as a long:

https://w3c.github.io/uievents/#idl-mouseeventinit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1768035</commentid>
    <comment_count>3</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2021-06-08 20:09:33 -0700</bug_when>
    <thetext>(In reply to Sam Weinig from comment #2)
&gt; Looks like the latest version of UIEvents still has this as a long:
&gt; 
&gt; https://w3c.github.io/uievents/#idl-mouseeventinit.

Indeed, we are matching the specification and Firefox. Maybe this a bug should be filed against Chrome? They are the only ones not aligned here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1769353</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-06-14 04:48:20 -0700</bug_when>
    <thetext>&lt;rdar://problem/79282818&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1770276</commentid>
    <comment_count>5</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2021-06-16 10:59:38 -0700</bug_when>
    <thetext>We are aligned with Firefox and the specification here. I don&apos;t think we should make this change for now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>