Bug 97239 - Baseline alignment with inline <table> is broken when margin-top is applied
Summary: Baseline alignment with inline <table> is broken when margin-top is applied
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All Linux
: P2 Normal
Assignee: Sammy Gill
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-09-20 11:14 PDT by Daniel Holbert
Modified: 2022-10-10 11:15 PDT (History)
6 users (show)

See Also:


Attachments
testcase 1 (1.25 KB, application/xhtml+xml)
2012-09-20 11:14 PDT, Daniel Holbert
no flags Details
screenshot (w/ red showing where "aaa" should be) (54.24 KB, image/png)
2012-09-20 11:31 PDT, Daniel Holbert
no flags Details
reference case 1 (with inline-block instead of inline-table) (1.07 KB, application/xhtml+xml)
2012-09-20 11:44 PDT, Daniel Holbert
no flags Details
Patch (5.01 KB, patch)
2013-06-20 23:59 PDT, Yuki Sekiguchi
beidson: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.