<?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>147136</bug_id>
          
          <creation_ts>2015-07-20 19:12:09 -0700</creation_ts>
          <short_desc>offsetWidth for fractionally positioned elements returns different values depending on left position</short_desc>
          <delta_ts>2015-08-05 08:38:10 -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>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.10</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc>http://jsfiddle.net/sbel/sykrLf2u/6/</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="Chad von Nau">chad</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>hyatt</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1110868</commentid>
    <comment_count>0</comment_count>
    <who name="Chad von Nau">chad</who>
    <bug_when>2015-07-20 19:12:09 -0700</bug_when>
    <thetext>Demo here:
http://jsfiddle.net/sbel/sykrLf2u/6/

Steps to reproduce the problem:
1. Create an absolutely positioned element at left: 0.
2. Get offsetWidth of element.
2. Move element to left: .1px
3. Get offsetWidth of element.

What is the expected behavior?
The offsetWidths should match.

What went wrong?
When the element is positioned at .1px, it&apos;s offsetWidth is 1px larger.

Notes:
The demo comes from this SO post about the issue: http://stackoverflow.com/q/26124678

This bug is also present in Chrome, but not Firefox or IE.

This bug will likely resolve itself if offsetWidth gains support for subpixel values. The Chrome team seems to be working on this, not sure if you guys are as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1110869</commentid>
    <comment_count>1</comment_count>
    <who name="Chad von Nau">chad</who>
    <bug_when>2015-07-20 19:16:49 -0700</bug_when>
    <thetext>Also reported to Chromium: https://code.google.com/p/chromium/issues/detail?id=512307</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1111027</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2015-07-21 13:13:55 -0700</bug_when>
    <thetext>Having offsetWidth return non-integral values (bug 132895) was a web-breaking change (bug 134651).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1115000</commentid>
    <comment_count>3</comment_count>
    <who name="Chad von Nau">chad</who>
    <bug_when>2015-08-05 02:18:29 -0700</bug_when>
    <thetext>The chromium team has marked their version of this issue as a Won&apos;t Fix:

    https://code.google.com/p/chromium/issues/detail?id=512307#c5
    eae@chromium.org:
    This is intentional as we snap elements to the pixel grid. The offset*
    properties return the snapped values and as such are dependent on the
    rendered size, and by extension, position.

I don&apos;t like offsetWidth changing based on position, but their logic seems sound to me. Maybe it&apos;s best to bury the issue here as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1115014</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2015-08-05 08:38:10 -0700</bug_when>
    <thetext>Yes, agreed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>