<?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>80010</bug_id>
          
          <creation_ts>2012-02-29 23:53:48 -0800</creation_ts>
          <short_desc>CSS 2.1: height of inline boxes incorrectly excludes line gap</short_desc>
          <delta_ts>2014-05-31 22:19:38 -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>CSS</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc>test.csswg.org/suites/css2.1/nightly-unstable/html4/block-in-inline-001.htm</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>47141</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Robert Hogan">robert</reporter>
          <assigned_to name="Robert Hogan">robert</assigned_to>
          <cc>browserbugs2</cc>
    
    <cc>hyatt</cc>
    
    <cc>ian</cc>
    
    <cc>jchaffraix</cc>
    
    <cc>max.hong.shen</cc>
    
    <cc>mitz</cc>
    
    <cc>robert</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>yael</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>568401</commentid>
    <comment_count>0</comment_count>
    <who name="Robert Hogan">robert</who>
    <bug_when>2012-02-29 23:53:48 -0800</bug_when>
    <thetext>This bug has been around forever and shows up in the linked test from the CSS 2.1 test suite - the red background from the table cell shouldn&apos;t show through. InlineBox::logicalHeight() uses FontMetrics::height() to establish the height of the line box, but that is only the height of the text and excludes the spacing below it - resulting in a line box 1 px shorter than it should be. So it looks like it should use FontMetrics::lineSpacing() instead.

Fixing this will require an enormous number of test results to be rebaselined so may not be worth the overhead.

What do you think?
#</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>574635</commentid>
    <comment_count>1</comment_count>
    <who name="Robert Hogan">robert</who>
    <bug_when>2012-03-08 22:19:58 -0800</bug_when>
    <thetext>*** Bug 80270 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>574902</commentid>
    <comment_count>2</comment_count>
    <who name="Yi Shen">max.hong.shen</who>
    <bug_when>2012-03-09 08:25:09 -0800</bug_when>
    <thetext>Robert, I spent some time on investigating the bug 80270, and I agree that the FontMetrics::lineSpacing() should be used instead as the logical height of the inline box. In addition, the issue only happens when the lineSpacing &gt; ascent + descent for some fonts.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>578663</commentid>
    <comment_count>3</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2012-03-14 12:42:06 -0700</bug_when>
    <thetext>The test looks invalid to me. Line boxes should not include line gaps. The test is making the assumption that the height of the line box will equal the height of the block, and that&apos;s a bogus assumption if the font has a line gap.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>578718</commentid>
    <comment_count>4</comment_count>
    <who name="Robert Hogan">robert</who>
    <bug_when>2012-03-14 13:34:24 -0700</bug_when>
    <thetext>Filed a comment at http://test.csswg.org/shepherd/testcase/block-in-inline-001/

Not sure if that will do anything!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>579484</commentid>
    <comment_count>5</comment_count>
    <who name="Gérard Talbot (no longer involved)">browserbugs2</who>
    <bug_when>2012-03-15 10:27:04 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; The test looks invalid to me. Line boxes should not include line gaps.

Hello,

I need to be extra-sure of what all of you mean by &quot;line gaps&quot;.

A rule that uses 
table {font-size: 16px; line-height: 20px;}
will have a top-half-leading of 2px and a bottom-half-leading of 2px. 
And the line box will normally be 20px in height.

(Btw, I do see red when I add and use the above rule in Chrome 17 and then more red for topmost and bottommost cells and then more red when I increase line-height. By default, vertical-align is middle for table cells. So, by increasing the line-height value, I should see and I do see more red at the top and below &quot;Line 1&quot; and &quot;Line 3&quot;)


&gt; The test is making the assumption that the height of the line box will equal 
&gt; the height of the block, and that&apos;s a bogus assumption if the font has a line &gt; gap.

The inline boxes (identified with the text &quot;Line 1&quot; and &quot;Line 3&quot;) may not fill the line box but the block box background (&lt;span class=&quot;block&quot;&gt;Line 2&lt;/span&gt;) will.


&gt; Filed a comment at http://test.csswg.org/shepherd/testcase/block-in-inline-001/

&gt;Not sure if that will do anything!

I think I do understand the problem and I will propose a code correction to the test with regards to taking into consideration line-height. I have something in mind...

Gérard</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>579636</commentid>
    <comment_count>6</comment_count>
    <who name="Robert Hogan">robert</who>
    <bug_when>2012-03-15 12:26:32 -0700</bug_when>
    <thetext>Thanks Gerard!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>581150</commentid>
    <comment_count>7</comment_count>
    <who name="Gérard Talbot (no longer involved)">browserbugs2</who>
    <bug_when>2012-03-16 17:42:02 -0700</bug_when>
    <thetext>Okay. This is what I am proposing as a replacement for the test:

http://www.gtalbot.org/BrowserBugsSection/css21testsuite/block-in-inline-001-ahemGT.html

Gérard</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1012795</commentid>
    <comment_count>8</comment_count>
    <who name="Gérard Talbot (no longer involved)">browserbugs2</who>
    <bug_when>2014-05-31 22:19:38 -0700</bug_when>
    <thetext>Hello all,

This test

http://test.csswg.org/suites/css2.1/20110323/html4/block-in-inline-001.htm

was indeed imprecise.

I have proposed

http://www.gtalbot.org/BrowserBugsSection/css21testsuite/block-in-inline-001-ahemGT.html

and then proposed

http://www.gtalbot.org/BrowserBugsSection/css21testsuite/block-in-inline-001.xht

as replacement. 

Somehow, the 2012-02-22 19:52:44 PST Changeset: 2772:c2fb265f7707 commit

http://hg.csswg.org/test/diff/2e6c9009b95a/approved/css2.1/src/box-display/block-in-inline-001.xht

mishandled this.

Gérard</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>