<?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>14722</bug_id>
          
          <creation_ts>2007-07-23 07:51:46 -0700</creation_ts>
          <short_desc>REGRESSION: border is not taken in account with offsetLeft (and probally offsetTop)</short_desc>
          <delta_ts>2007-08-02 13:45:06 -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>Layout and Rendering</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction, InRadar, Regression</keywords>
          <priority>P1</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sjoerd Mulder">sjoerdmulder</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bdakin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>3969</commentid>
    <comment_count>0</comment_count>
    <who name="Sjoerd Mulder">sjoerdmulder</who>
    <bug_when>2007-07-23 07:51:46 -0700</bug_when>
    <thetext>See attached testcase where it should set the offsetLeft value with the size of the 50px border of the parent it does not take this in account. 

In Safari 2.0.4 it works correctly,

tested on Windows XP, Mac OSX 10.4.10 and Mac OSX 10.5</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3968</commentid>
    <comment_count>1</comment_count>
      <attachid>15649</attachid>
    <who name="Sjoerd Mulder">sjoerdmulder</who>
    <bug_when>2007-07-23 07:53:21 -0700</bug_when>
    <thetext>Created attachment 15649
Testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3865</commentid>
    <comment_count>2</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-07-23 23:04:46 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; Created an attachment (id=15649) [edit]
&gt; Testcase

So the test case passes if &quot;border - left:78&quot; is printed, but fails if &quot;border - left:28&quot; is printed?

Firefox 2.0.0.5 and Safari 3.0 (522.12) + WebKit r24534 print &quot;border - left:28&quot;.

Opera 9.21 and Safari 2.0.4 (419.3) + original WebKit print &quot;border -left:78&quot;.

What does MSIE 6/7 print?

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3861</commentid>
    <comment_count>3</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-07-23 23:05:55 -0700</bug_when>
    <thetext>Confirming difference between Safari 2.0 and Safari 3.0 + ToT WebKit, but I&apos;m not sure if this is a regression or not.  (Assuming it is for now.)

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3852</commentid>
    <comment_count>4</comment_count>
    <who name="Sjoerd Mulder">sjoerdmulder</who>
    <bug_when>2007-07-24 00:53:34 -0700</bug_when>
    <thetext>I Agree that the change isnt a regression if this was intented. The problem is part of a bigger issue: measurement of layout,

- IE has getBoundingClientRect() (offsetTop / offsetLeft is not reliable)
- Gecko has getBoxObjectFor() (offsetTop / offsetLeft is not reliable)
- Opera / Webkit have offsetTop / offsetLeft / offsetParent working reliable.

In Safari 2 and Opera 9 the behavior is like expected, the &apos;offsetLeft&apos; of the elements summed together is the value in pixels the element is positioned from the left side of the screen (78px).

In Safari 3 this changed, sure their can be an exception added for Safari 3 but it would be quite annoying if in Safari 3.0.1. the behavior is different again,.

That&apos;s why i reporting this bug as a regression, a lot of frameworks / toolkits which use &apos;offset&apos; properties to measure position need to implement specific Safari 3 code
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3827</commentid>
    <comment_count>5</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-07-24 07:09:49 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; So the test case passes if &quot;border - left:78&quot; is printed, but fails if &quot;border
&gt; - left:28&quot; is printed?

Yes, per Comment #4.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3825</commentid>
    <comment_count>6</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-07-24 07:10:56 -0700</bug_when>
    <thetext>&lt;rdar://problem/5356797&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3822</commentid>
    <comment_count>7</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-07-24 07:36:53 -0700</bug_when>
    <thetext>Bug 13237, Comment #10:

Comment #10 From Dave Hyatt 2007-07-24 04:08 PDT [reply]

offsetLeft/Top are relative to your offsetParent.  I would guess we had
offsetParent wrong.  The goal here is to match IE.  What does IE return here?

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3813</commentid>
    <comment_count>8</comment_count>
    <who name="Sjoerd Mulder">sjoerdmulder</who>
    <bug_when>2007-07-24 08:56:51 -0700</bug_when>
    <thetext>I think the behavior of IE should not be matched with offsetParent / left / top. IE is complete buggy concerning to offsetParent / Left / Top (e.g. when mixing border / padding / margin / box-model / position / overflow) and though not reliable.

Better would be to keep matching Safari 2.0.4 (was working fine except for TR elements but that is solved) and Opera 9.x (i remember a discussion on the Opera lists a while ago, see: http://dump.testsuite.org/2006/dom/style/offset/spec)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3132</commentid>
    <comment_count>9</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2007-08-02 10:56:20 -0700</bug_when>
    <thetext>In Safari 3.0 we are matching Firefox offset behavior on purpose, see bug 12687. I think this should be changed now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3131</commentid>
    <comment_count>10</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2007-08-02 10:57:08 -0700</bug_when>
    <thetext>I meant to say that this should _not_ be changed now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3120</commentid>
    <comment_count>11</comment_count>
    <who name="John Sullivan">sullivan</who>
    <bug_when>2007-08-02 13:45:06 -0700</bug_when>
    <thetext>In Radar, Dave Hyatt agrees that this should not be changed. Setting to WONTFIX</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>15649</attachid>
            <date>2007-07-23 07:53:21 -0700</date>
            <delta_ts>2007-07-23 07:53:21 -0700</delta_ts>
            <desc>Testcase</desc>
            <filename>index.html</filename>
            <type>text/html</type>
            <size>883</size>
            <attacher name="Sjoerd Mulder">sjoerdmulder</attacher>
            
              <data encoding="base64">PCEtLSAtLT4KPCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjEvL0VO
IiAiaHR0cDovL3d3dy53My5vcmcvVFIveGh0bWwxMS9EVEQveGh0bWwxMS5kdGQiPgo8aHRtbCB4
bWxucz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94aHRtbCI+Cgk8aGVhZD4KCQk8dGl0bGU+YnVn
IDAwMDA8L3RpdGxlPgoJCTxzY3JpcHQgdHlwZT0idGV4dC9qYXZhc2NyaXB0Ij4KCQkJZnVuY3Rp
b24gZWxvYWQoKXsKCQkJCXZhciBvYmogPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgndGVzdCcp
OwoJCQkJb2JqLmFwcGVuZENoaWxkKCBkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZSgnYm9yZGVyIC0g
bGVmdDonICsgZ2V0TGVmdChvYmopICkpOwoJCQl9CgkJCWZ1bmN0aW9uIGdldExlZnQob0VsbSl7
CgkJCQl2YXIgaUxlZnQgPSAwOwoJCQkJd2hpbGUob0VsbSl7CgkJCQkJ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