<?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>141331</bug_id>
          
          <creation_ts>2015-02-06 05:38:31 -0800</creation_ts>
          <short_desc>getBoundingClientRect() returns wrong values while CSS transform is transitioned or animated</short_desc>
          <delta_ts>2023-05-10 01:17:24 -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>Animations</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Windows 7</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</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="Tigran">buddha-1</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dino</cc>
    
    <cc>graouts</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1067344</commentid>
    <comment_count>0</comment_count>
      <attachid>246161</attachid>
    <who name="Tigran">buddha-1</who>
    <bug_when>2015-02-06 05:38:31 -0800</bug_when>
    <thetext>Created attachment 246161
A page to reproduce an aspect of the bug

Element.getBoundingClientRect() returns wrong values when CSS transition or animation is running on the element, and the animated property is &quot;transform&quot;.

Steps:
1. Open the attached file.
2. Open console.
3. See wrong values for &quot;getBoundingClientRect().left&quot; being logged as the element slides horizontally on the screen.

Tested in Firefox 35 and IE 11. Their consoles are reporting the right offsets.

Webkit based browsers (Chrome, Opera) log the same (incorrect) value several times.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1067989</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2015-02-09 21:35:30 -0800</bug_when>
    <thetext>Your testcase doesn&apos;t work in Safari (transform is still prefixed).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1068011</commentid>
    <comment_count>2</comment_count>
      <attachid>246161</attachid>
    <who name="Tigran">buddha-1</who>
    <bug_when>2015-02-10 02:06:57 -0800</bug_when>
    <thetext>Comment on attachment 246161
A page to reproduce an aspect of the bug

&gt;&lt;!DOCTYPE html&gt;
&gt;&lt;html&gt;
&gt;&lt;head&gt;
&gt;	&lt;meta charset=&quot;utf-8&quot;&gt;
&gt;
&gt;	&lt;title&gt;getBoundingClientRect WebKit Bug&lt;/title&gt;
&gt;
&gt;	&lt;style&gt;
&gt;		body {
&gt;			margin: 0;
&gt;		}
&gt;		#test {
&gt;			display: inline-block;
&gt;			background: green;
&gt;			-webkit-animation: slide 10s linear infinite alternate;
&gt;			animation: slide 10s linear infinite alternate;
&gt;		}
&gt;
&gt;		@-webkit-keyframes slide {
&gt;			to {
				-webkit-transform: translate(1000px, 0);
&gt;				transform: translate(1000px, 0);
&gt;			}
&gt;		}
&gt;
&gt;		@keyframes slide {
&gt;			to {
				-webkit-transform: translate(1000px, 0);
&gt;				transform: translate(1000px, 0);
&gt;			}
&gt;		}
&gt;	&lt;/style&gt;
&gt;&lt;/head&gt;
&gt;&lt;body&gt;
&gt;	&lt;div id=&quot;test&quot;&gt;Test&lt;/div&gt;
&gt;
&gt;	&lt;script&gt;
&gt;	var testEl = document.getElementById(&apos;test&apos;);
&gt;
&gt;	setInterval(function() {
&gt;		console.log(&apos;Left is: &apos; + testEl.getBoundingClientRect().left);
&gt;	}, 1000);
&gt;	&lt;/script&gt;
&gt;&lt;/body&gt;
&gt;&lt;/html&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1068013</commentid>
    <comment_count>3</comment_count>
      <attachid>246317</attachid>
    <who name="Tigran">buddha-1</who>
    <bug_when>2015-02-10 02:12:28 -0800</bug_when>
    <thetext>Created attachment 246317
A page to reproduce an aspect of the bug - v2

Added &quot;-webkit-&quot; to &quot;transform&quot; CSS property for Safari.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1068014</commentid>
    <comment_count>4</comment_count>
    <who name="Tigran">buddha-1</who>
    <bug_when>2015-02-10 02:14:02 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; Your testcase doesn&apos;t work in Safari (transform is still prefixed).

Couldn&apos;t test Safari &apos;cause I&apos;m on Windows.
Added the prefix in patch now. Should work.
Thank you.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1954275</commentid>
    <comment_count>5</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2023-05-10 01:17:24 -0700</bug_when>
    <thetext>The test behaves correctly now: I can see a different value logged each time, incrementing by roughly 100.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>246161</attachid>
            <date>2015-02-06 05:38:31 -0800</date>
            <delta_ts>2015-02-10 02:12:28 -0800</delta_ts>
            <desc>A page to reproduce an aspect of the bug</desc>
            <filename>webkit-getBouncingClientRect-with-transitions.html</filename>
            <type>text/plain</type>
            <size>713</size>
            <attacher name="Tigran">buddha-1</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KCTxtZXRhIGNoYXJzZXQ9InV0Zi04Ij4KCgk8
dGl0bGU+Z2V0Qm91bmRpbmdDbGllbnRSZWN0IFdlYktpdCBCdWc8L3RpdGxlPgoKCTxzdHlsZT4K
CQlib2R5IHsKCQkJbWFyZ2luOiAwOwoJCX0KCQkjdGVzdCB7CgkJCWRpc3BsYXk6IGlubGluZS1i
bG9jazsKCQkJYmFja2dyb3VuZDogZ3JlZW47CgkJCS13ZWJraXQtYW5pbWF0aW9uOiBzbGlkZSAx
MHMgbGluZWFyIGluZmluaXRlIGFsdGVybmF0ZTsKCQkJYW5pbWF0aW9uOiBzbGlkZSAxMHMgbGlu
ZWFyIGluZmluaXRlIGFsdGVybmF0ZTsKCQl9CgoJCUAtd2Via2l0LWtleWZyYW1lcyBzbGlkZSB7
CgkJCXRvIHsKCQkJCXRyYW5zZm9ybTogdHJhbnNsYXRlKDEwMDBweCwgMCk7CgkJCX0KCQl9CgoJ
CUBrZXlmcmFtZXMgc2xpZGUgewoJCQl0byB7CgkJCQl0cmFuc2Zvcm06IHRyYW5zbGF0ZSgxMDAw
cHgsIDApOwoJCQl9CgkJfQoJPC9zdHlsZT4KPC9oZWFkPgo8Ym9keT4KCTxkaXYgaWQ9InRlc3Qi
PlRlc3Q8L2Rpdj4KCgk8c2NyaXB0PgoJdmFyIHRlc3RFbCA9IGRvY3VtZW50LmdldEVsZW1lbnRC
eUlkKCd0ZXN0Jyk7CgoJc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKSB7CgkJY29uc29sZS5sb2coJ0xl
ZnQgaXM6ICcgKyB0ZXN0RWwuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkubGVmdCk7Cgl9LCAxMDAw
KTsKCTwvc2NyaXB0Pgo8L2JvZHk+CjwvaHRtbD4=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>246317</attachid>
            <date>2015-02-10 02:12:28 -0800</date>
            <delta_ts>2015-02-10 08:24:06 -0800</delta_ts>
            <desc>A page to reproduce an aspect of the bug - v2</desc>
            <filename>webkit-getBouncingClientRect-with-transitions.html</filename>
            <type>text/html</type>
            <size>803</size>
            <attacher name="Tigran">buddha-1</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KCTxtZXRhIGNoYXJzZXQ9InV0Zi04Ij4KCgk8
dGl0bGU+Z2V0Qm91bmRpbmdDbGllbnRSZWN0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