<?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>26097</bug_id>
          
          <creation_ts>2014-06-15 06:46:28 +0000</creation_ts>
          <short_desc>Bounds of DOMQuad not computed correctly</short_desc>
          <delta_ts>2014-06-15 07:33:20 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>FXTF</product>
          <component>Geometry</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</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 name="Dirk Schulze">dschulze</reporter>
          <assigned_to name="Simon Pieters">zcorpan</assigned_to>
          <cc>mike</cc>
          
          <qa_contact>sideshowbarker+geometry</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>107828</commentid>
    <comment_count>0</comment_count>
    <who name="Dirk Schulze">dschulze</who>
    <bug_when>2014-06-15 06:46:28 +0000</bug_when>
    <thetext>The bounds for

    new DOMQuad(new DOMRect(0,0,-100,-100))

are not computed correctly. IMO there is no reason why the width and height should be negative for the example above.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107829</commentid>
    <comment_count>1</comment_count>
    <who name="Dirk Schulze">dschulze</who>
    <bug_when>2014-06-15 07:19:56 +0000</bug_when>
    <thetext>With the old description, bounds would have returned a DOMRectReadOnly with (0,0,-100,-100).

I added an algorithm how to compute the associate bounding rect. All constructors and the bounds attribute itself reference this algorithm now:

1. Let bounds be a new DOMRectReadOnly object.
2. Let left of bounds be the minimum of p1.x, p2.x, p3.x and p4.x.
3. Let top of bounds be the minimum of p1.y, p2.y, p3.y and p4.y.
4. Let right of bounds be the maximum of p1.x, p2.x, p3.x and p4.x.
5. Let bottom of bounds be the maximum of p1.y, p2.y, p3.y and p4.y.
6. Set x of bounds to left, y of bounds to top, width of bounds to right - left and height of bounds to bottom - top.

http://dev.w3.org/fxtf/geometry/#associated-bounding-rectangle</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>