Bug 39306

Summary: vertical-align is ignored for inline-blocks containing line-boxes
Product: WebKit Reporter: sean-webkit
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: bfulgham, drew.covi
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.6   
URL: http://arther.net/lab/webkit-vertical-align-test.html#test

Description sean-webkit 2010-05-18 12:08:38 PDT
When Webkit encounters an inline-block where...

   1. the line-height height is explicitly specified
   2. the content is rendered using multiple line-boxes

...the inline-block element ignores the specified vertical-align.  I've linked to my test case to help illustrate the problem.
http://arther.net/lab/webkit-vertical-align-test.html#test



To Reproduce:

   1. Create a block-level element
   2. Create a inline-block element as a child of the block created in Step 1.
   3. Set the `vertical-align` of the inline-block to "middle"
   4. Fill the inline-block with enough content so that the inline-box for that content extends horizontally beyond bounds of the containing block-level element
   5. Set the `line-height` of the inline-block.  Use a value smaller than the `line-height` value of the containing block.



Actual Results:

   The vertical-align property of the inline-block is ignored.



Expected Results:

   The inline-block treats `vertical-align` in the same manner as other inline elements


Tested on 2010-05-18 in Mac OS 10.6 using Safari 4.0.5 (6531.22.7) and Google Chrome 5.0.375.38 beta
Comment 1 drew 2010-12-03 14:36:27 PST
just ran into this bug, and can confirm that it does happen as described. ironically, adding a single non-breaking space as a sibling to the inline-block item will correct this behavior.
Comment 2 Brent Fulgham 2022-07-11 17:14:38 PDT
The relevant website no longer exists.