Bug 97239

Summary: Baseline alignment with inline <table> is broken when margin-top is applied
Product: WebKit Reporter: Daniel Holbert <dholbert>
Component: Layout and RenderingAssignee: Sammy Gill <sgill26>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, sgill26, webkit-bug-importer, yuki.sekiguchi
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: Linux   
Attachments:
Description Flags
testcase 1
none
screenshot (w/ red showing where "aaa" should be)
none
reference case 1 (with inline-block instead of inline-table)
none
Patch beidson: review-

Description Daniel Holbert 2012-09-20 11:14:17 PDT
Created attachment 164952 [details]
testcase 1

STEPS TO REPRODUCE:
 1. Load attached testcase. (with inline-block "aaa" and inline-table "bbb")

EXPECTED RESULTS:
 "aaa" and "bbb" are baseline-aligned.

ACTUAL RESULTS:
 They're misaligned.  "aaa" ends up baseline-aligned with where "bbb" *would* be, if it weren't for the margin-top.

So basically, it looks like Webkit's not taking the margin into consideration when doing baseline-alignment here.

Reproduced with latest Chrome build from google repo's "Dev Channel" on Ubuntu.
Version 23.0.1270.0 dev
Comment 1 Daniel Holbert 2012-09-20 11:31:10 PDT
Created attachment 164955 [details]
screenshot (w/ red showing where "aaa" should be)

Here's a screenshot of the rendering, with red arrow & line showing where "aaa" _should_ be.
Comment 2 Daniel Holbert 2012-09-20 11:44:10 PDT
Created attachment 164957 [details]
reference case 1 (with inline-block instead of inline-table)

Here's a reference case, using an inline-block for "bbb" instead of an inline-table. My chrome dev channel build gets this one right. ("aaa" and "bbb" are aligned)

testcase 1 should render just like this reference case.

In Opera 12.02 and Firefox 15.0.1, the testcase & reference case render identically. (aside from the explanatory text)
Comment 3 Yuki Sekiguchi 2013-06-20 23:59:26 PDT
Created attachment 205153 [details]
Patch
Comment 4 Brady Eidson 2016-05-24 22:01:11 PDT
Comment on attachment 205153 [details]
Patch

Assuming that patches for review since 2013 are stale, r-
Comment 5 Radar WebKit Bug Importer 2022-10-07 13:32:46 PDT
<rdar://problem/100910532>
Comment 6 Sammy Gill 2022-10-07 13:54:41 PDT
Pull request: https://github.com/WebKit/WebKit/pull/5153
Comment 7 EWS 2022-10-10 11:15:45 PDT
Committed 255357@main (c0048e83eb23): <https://commits.webkit.org/255357@main>

Reviewed commits have been landed. Closing PR #5153 and removing active labels.