<?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>158441</bug_id>
          
          <creation_ts>2016-06-06 15:56:17 -0700</creation_ts>
          <short_desc>Misaligned inline-block due to fractional padding/margin/other vertical spacing</short_desc>
          <delta_ts>2024-02-08 15:26:47 -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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=261212</see_also>
          <bug_file_loc>https://jsfiddle.net/vu71job4/show</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>133932</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Han">laughinghan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>bfulgham</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1199747</commentid>
    <comment_count>0</comment_count>
    <who name="Han">laughinghan</who>
    <bug_when>2016-06-06 15:56:17 -0700</bug_when>
    <thetext>Tested on WebKit Nightly r201711

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/602.1.36+ (KHTML, like Gecko) Version/9.1.1 Safari/601.6.17

# Example URL:
http://output.jsbin.com/tivuvov

# Steps to reproduce the problem:
1. Open http://output.jsbin.com/tivuvov
2. See misaligned x and 2

# What is the expected behavior?
x and 2 should always line up, because according to the CSS 2.1 spec:

    The baseline of an &apos;inline-block&apos; is the baseline of its last line box in the normal flow

https://www.w3.org/TR/CSS21/visudet.html#propdef-vertical-align

Firefox 46 displays the correct behavior.

# What went wrong?
At certain fractional values of padding or margin, the x and 2 are misaligned, for example .3em.

# Notes

Safari 9.1.1 and Chrome 50 have the same problem, at I think all the same fractional values, but the misalignment is much more severe.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1199749</commentid>
    <comment_count>1</comment_count>
    <who name="Han">laughinghan</who>
    <bug_when>2016-06-06 15:57:02 -0700</bug_when>
    <thetext>Cross-ref: https://bugs.chromium.org/p/chromium/issues/detail?id=617763</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1199753</commentid>
    <comment_count>2</comment_count>
    <who name="Han">laughinghan</who>
    <bug_when>2016-06-06 16:00:09 -0700</bug_when>
    <thetext>Before reporting this bug I did find an existing bug that appears similar, [Subpixel layout: Inline-block is offset from dominant baseline with em based padding](136332), but unlike this bug, 136332 has been fixed in Chrome, whereas this bug is *worse* in Chrome.


[136332]: https://bugs.webkit.org/show_bug.cgi?id=136332</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1964349</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-06-29 16:17:39 -0700</bug_when>
    <thetext>Took reduced test case from Chrome bug: https://jsfiddle.net/vu71job4/show

^ I am able to reproduce using above in WebKit TOT (265630@main). Both Chrome Canary 117 and Firefox Nightly 116 have both &apos;x&apos; (xx) with proper baseline and no issue in alignment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2011944</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-02-08 15:26:47 -0800</bug_when>
    <thetext>&lt;rdar://problem/122587250&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>