<?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>139956</bug_id>
          
          <creation_ts>2014-12-26 11:44:12 -0800</creation_ts>
          <short_desc>Vertical % or viewport sized units render a bit too small</short_desc>
          <delta_ts>2023-07-03 06:39:37 -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>525.x (Safari 3.2)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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>
          <dependson>132010</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Eads">davideads</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>benjamin</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1057917</commentid>
    <comment_count>0</comment_count>
    <who name="David Eads">davideads</who>
    <bug_when>2014-12-26 11:44:12 -0800</bug_when>
    <thetext>Hopefully I can describe this effectively:

For a recent project I made a stacked bar chart using pure CSS and percentage units. Each section of the bar has a percentage based height. All the sections heights add up to 100%. However, unless the container height is such that the percentage based heights map to an exact integer pixel size (e.g. 9% of 500px is 45px, but 9% of 380px is 34.199px), the total height of the boxes is consistently less than the total height of the container. I made a demo:

http://apps.npr.org/lookatthis/posts/publichousing-webkit-bug-demo/ (actual in-the-wild project here: http://apps.npr.org/lookatthis/posts/publichousing)

The percent heights add up to 100%, but the boxes themselves occupy a few pixels less than 100%.

The same behavior can be seen using viewport-relative units like vh.

I was able to replicate in Safari (OS X, iOS) and Chrome (on OS X, Android, iOS). It doesn&apos;t show up in Firefox.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1057921</commentid>
    <comment_count>1</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2014-12-26 13:28:17 -0800</bug_when>
    <thetext>It looks like percent sizes do not get subpixel layout.

There is a block of 380px split in 33%, 33%, 34%. The computed size of each block is 125px,  125px, 129px. It should ideally be 125.4, 124.4px, 129.2px.

Zalan would know why we don&apos;t get subpixel layout in that case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1057957</commentid>
    <comment_count>2</comment_count>
      <attachid>243775</attachid>
    <who name="alan">zalan</who>
    <bug_when>2014-12-26 21:57:01 -0800</bug_when>
    <thetext>Created attachment 243775
Test reduction.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1964713</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-07-02 16:08:02 -0700</bug_when>
    <thetext>I am not able to reproduce this bug using attached test reduction on STP173 and it matches Chrome Canary 117.

@Alan - I think we can close this, appreciate if you can confirm.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>243775</attachid>
            <date>2014-12-26 21:57:01 -0800</date>
            <delta_ts>2014-12-26 21:57:01 -0800</delta_ts>
            <desc>Test reduction.</desc>
            <filename>table-div.html</filename>
            <type>text/html</type>
            <size>929</size>
            <attacher name="alan">zalan</attacher>
            
              <data encoding="base64">PGh0bWw+CjxzdHlsZT4KLmNvbnRhaW5lcnsKICBoZWlnaHQ6IDEwMnB4OyAKICBib3JkZXI6IDJw
eCBzb2xpZCBibGFjazsKfQouaW5uZXJ7CiAgZGlzcGxheTogd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