<?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>28918</bug_id>
          
          <creation_ts>2015-07-06 19:17:53 +0000</creation_ts>
          <short_desc>getClientRects() and getBoundingClientRect() need to be clearer about when the returned DOMRect might contain -0 anywhere</short_desc>
          <delta_ts>2015-07-07 09:42:38 +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>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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="Jeff Walden (remove +w3 to email)">jwalden+w3</reporter>
          <assigned_to name="Simon Pieters">zcorpan</assigned_to>
          <cc>annevk</cc>
          
          <qa_contact>public-css-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>121831</commentid>
    <comment_count>0</comment_count>
    <who name="Jeff Walden (remove +w3 to email)">jwalden+w3</who>
    <bug_when>2015-07-06 19:17:53 +0000</bug_when>
    <thetext>The CSSOM spec is unclear about what the sign of getBoundingClientRect().top is, when that value is zero.  Is -0 a possibility, or is +0 the only permitted value?  Could it be either, and if so, when should the different signs be observed?

This issue applies to all the other fields of DOMRect, as well.  The DOMRect spec is clear that width/height can be negative, but that could just as easily be because |new DOMRect| lets you create a rect with arbitrary numeric components, as because of any real-world reason.  And one could imagine that &quot;negative&quot; observation to be motivated by &quot;real&quot; negative numbers, not -0.

This issue is pretty nitpickery, of course.  But I raise it because I stumbled across a Gecko test that inadvertently compared gBCR().top with -0.  It passes because it ignores the sign on zero, but I&apos;m changing the (general) comparison mechanism to only equate same-signed zeroes, and it&apos;s not clear that the test&apos;s comparison is exactly right or wrong.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>