<?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>35346</bug_id>
          
          <creation_ts>2010-02-24 08:26:52 -0800</creation_ts>
          <short_desc>Add a convenient center() method to IntRect</short_desc>
          <delta_ts>2010-04-06 02:58:09 -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>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</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>
          
          <blocked>18662</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Antonio Gomes">tonikitoo</reporter>
          <assigned_to name="Antonio Gomes">tonikitoo</assigned_to>
          <cc>hausmann</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>193370</commentid>
    <comment_count>0</comment_count>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2010-02-24 08:26:52 -0800</bug_when>
    <thetext>FloatRect has the same and according to https://bugs.webkit.org/show_bug.cgi?id=18662#c63
that is something acceptable.

&quot;to make this code more readable. You could also add IntPoint IntRect::center()
const if you like (FloatRect has one).&quot;

patch coming.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>193376</commentid>
    <comment_count>1</comment_count>
      <attachid>49399</attachid>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2010-02-24 08:39:24 -0800</bug_when>
    <thetext>Created attachment 49399
patch 0.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>193390</commentid>
    <comment_count>2</comment_count>
      <attachid>49399</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-02-24 09:23:38 -0800</bug_when>
    <thetext>Comment on attachment 49399
patch 0.1

r=me, but perhaps note in a comment that the center point suffers from rounding.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>193452</commentid>
    <comment_count>3</comment_count>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2010-02-24 12:23:41 -0800</bug_when>
    <thetext>simon, would

+    // NOTE: The result is rounded to integer values, and thus can be not the exact
+    // center point.
+    IntPoint center() const { return IntPoint(x() + width() / 2, y() + height() / 2); }


be ok ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>193459</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-02-24 12:39:03 -0800</bug_when>
    <thetext>I&apos;d change: &quot;can be not the exact center point&quot; to &quot;may not be the exact center point&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>193670</commentid>
    <comment_count>5</comment_count>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2010-02-25 03:49:44 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; I&apos;d change: &quot;can be not the exact center point&quot; to &quot;may not be the exact center
&gt; point&quot;.

landed in r55228

thx simon and kenneth</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>49399</attachid>
            <date>2010-02-24 08:39:24 -0800</date>
            <delta_ts>2010-02-24 09:23:38 -0800</delta_ts>
            <desc>patch 0.1</desc>
            <filename>0001-Add-a-convenient-center-method-to-IntRect.patch</filename>
            <type>text/plain</type>
            <size>1937</size>
            <attacher name="Antonio Gomes">tonikitoo</attacher>
            
              <data encoding="base64">RnJvbSA3MmY4NTdhYTg0ZjNj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r
MTA1LDggQEAgcHVibGljOgogICAgIGludCByaWdodCgpIGNvbnN0IHsgcmV0dXJuIHgoKSArIHdp
ZHRoKCk7IH0KICAgICBpbnQgYm90dG9tKCkgY29uc3QgeyByZXR1cm4geSgpICsgaGVpZ2h0KCk7
IH0KIAorICAgIEludFBvaW50IGNlbnRlcigpIGNvbnN0IHsgcmV0dXJuIEludFBvaW50KHgoKSAr
IHdpZHRoKCkgLyAyLCB5KCkgKyBoZWlnaHQoKSAvIDIpOyB9CisKICAgICB2b2lkIG1vdmUoY29u
c3QgSW50U2l6ZSYgcykgeyBtX2xvY2F0aW9uICs9IHM7IH0gCiAgICAgdm9pZCBtb3ZlKGludCBk
eCwgaW50IGR5KSB7IG1fbG9jYXRpb24ubW92ZShkeCwgZHkpOyB9IAogCi0tIAoxLjYuMC40Cgo=
</data>
<flag name="review"
          id="32252"
          type_id="1"
          status="+"
          setter="simon.fraser"
    />
    <flag name="commit-queue"
          id="32253"
          type_id="3"
          status="-"
          setter="tonikitoo"
    />
          </attachment>
      

    </bug>

</bugzilla>