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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>20640</bug_id>
          
          <creation_ts>2013-01-11 02:46:29 +0000</creation_ts>
          <short_desc>checking for infinity and nan values in window.scroll</short_desc>
          <delta_ts>2013-08-08 13:28:45 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSS</product>
          <component>CSSOM View</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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>svitlant</reporter>
          <assigned_to name="Simon Pieters">zcorpan</assigned_to>
          <cc>zcorpan</cc>
          
          <qa_contact>public-css-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>81218</commentid>
    <comment_count>0</comment_count>
    <who name="">svitlant</who>
    <bug_when>2013-01-11 02:46:29 +0000</bug_when>
    <thetext>Hello,

Step 1 of window.scroll algorithm (http://www.w3.org/TR/cssom-view/#dom-window-scroll) is to check whether the coordinates x and y are infinite or nan. However, the signature of the scroll method indicates that the type of those variables is &quot;long&quot;, making infinite and nan values impossible.

Is it possible that the original intention was to make the coordinate values float or double? Otherwise, should this step exist at all?

The survey of the major browsers shows that this step is ignored (tested IE9, Chrome, Firefox).

Thanks,
Svitlana</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86539</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-04-23 10:44:25 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; Hello,
&gt; 
&gt; Step 1 of window.scroll algorithm
&gt; (http://www.w3.org/TR/cssom-view/#dom-window-scroll) is to check whether the
&gt; coordinates x and y are infinite or nan. However, the signature of the
&gt; scroll method indicates that the type of those variables is &quot;long&quot;, making
&gt; infinite and nan values impossible.

I think that step predated WebIDL throwing for those values. Fixed:

https://dvcs.w3.org/hg/csswg/rev/9b737ecc8598
https://dvcs.w3.org/hg/csswg/rev/d1dbf4fde303

&gt; Is it possible that the original intention was to make the coordinate values
&gt; float or double? Otherwise, should this step exist at all?

float and double also disallow NaN/infinity per WebIDL.

&gt; The survey of the major browsers shows that this step is ignored (tested
&gt; IE9, Chrome, Firefox).

Opera implements this step. Firefox/Chrome/IE9 seem to treat NaN/-Infinity/Infinity as 0. I&apos;d like to see if throwing TypeError instead is Web-compatible before using &quot;unrestricted long&quot; in the spec.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>