<?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>132735</bug_id>
          
          <creation_ts>2014-05-09 03:23:29 -0700</creation_ts>
          <short_desc>WebKit computed/fitted image size differs from Blink and Gecko</short_desc>
          <delta_ts>2025-02-21 21:17:18 -0800</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 (Intel)</rep_platform>
          <op_sys>OS X 10.9</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc>http://www.roh.org.uk/events</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="Nicholas Shanks">nickshanks</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1007935</commentid>
    <comment_count>0</comment_count>
    <who name="Nicholas Shanks">nickshanks</who>
    <bug_when>2014-05-09 03:23:29 -0700</bug_when>
    <thetext>The CSS is something like:
  max-width: 100%;
  height: auto;
And the container is some non-integral width smaller than the intrinsic image size (197×131).
(It may be possible to reduce this to just {width:157.9px;height:auto} though I haven&apos;t tried)

The event images on the linked page are sized as follows in a wide window:

Safari 7.0 (9537.71): 157 × 104
Chrome 34.0.1847.131: 158 × 105 (computed at 157.984 × 105.047)
Firefox 29.0: 158 × 105

It would appear that Chrome and Firefox are computing the height from the computed width, then snapping both width and height to the nearest whole pixel.

Safari seems to be rounding the width down (i.e. floor() not round()) then computing the height from the floored width. This ends up with safari being 1px shorter and narrower than the other two. Cannot test in IE. Opera ought to be the same as Chrome.

So to fix this, two changes need to be made:

1) Compute the height from the un-rounded width.
2) Round rather than floor the dimensions to the nearest pixel.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2097019</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2025-02-21 21:17:18 -0800</bug_when>
    <thetext>Took Wayback Archive copy - https://web.archive.org/web/20140705042012/http://www.roh.org.uk/events

Width - 158px
Height - 105.0625px

So it seems like it is fixed.

Marking this as &apos;Configuration Changed&apos;. Tested using Safari 18.3.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>