Bug 68100 - REGRESSION (r78846): Text misaligned vertically within table cell with valign="top" attribute and <sup> tags
Summary: REGRESSION (r78846): Text misaligned vertically within table cell with valign...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Keywords: HasReduction, InRadar, Regression
Depends on: 54244
  Show dependency treegraph
Reported: 2011-09-14 12:05 PDT by David Kilzer (:ddkilzer)
Modified: 2015-11-25 15:44 PST (History)
5 users (show)

See Also:

Test case (158 bytes, text/html)
2011-09-14 12:07 PDT, David Kilzer (:ddkilzer)
no flags Details
Expected results (9.13 KB, image/png)
2011-09-14 12:08 PDT, David Kilzer (:ddkilzer)
no flags Details
Actual results (9.51 KB, image/png)
2011-09-14 12:08 PDT, David Kilzer (:ddkilzer)
no flags Details
screenshot attached (29.19 KB, image/png)
2013-10-23 10:11 PDT, flangeway
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2011-09-14 12:05:46 PDT
Commit r78846 for Bug 54244 caused a regression when a table cell has a valign="top" attribute, the superscript tag (<sup></sup>) is used in the text in the cell, and other text in the cell has any other kind of tag.

1. Load attached test case.

The text (with the exception of the &reg; symbol) should all have the same baseline.

The text that's outside of any tag (except <TD></TD> tags) has the wrong baseline.

This is a regression from r78846.  The autospade script said r78842 worked and r78846 failed, but the only commit in that range that makes sense is r78846.

Compare attached screenshots by switching between tabs to see which text should be lower.  (The text of the test case is a bit misleading.)
Comment 1 David Kilzer (:ddkilzer) 2011-09-14 12:06:55 PDT
Comment 2 David Kilzer (:ddkilzer) 2011-09-14 12:07:17 PDT
Created attachment 107367 [details]
Test case
Comment 3 mitz 2011-09-14 12:08:17 PDT
The changes to InlineFlowBox::adjustMaxAscentAndDescent() (consulting verticalAlign() instead of logicalTop()) are possiblly at fault here.
Comment 4 David Kilzer (:ddkilzer) 2011-09-14 12:08:21 PDT
Created attachment 107368 [details]
Expected results
Comment 5 David Kilzer (:ddkilzer) 2011-09-14 12:08:38 PDT
Created attachment 107369 [details]
Actual results
Comment 6 Tom Ace 2013-04-27 18:28:50 PDT
This is still unfixed two years later.
It was recently reported at 
and I've added a comment there linking to this page.
Comment 7 flangeway 2013-10-23 10:11:47 PDT
Created attachment 214973 [details]
screenshot attached

There seem to be two bugs present:

- the incorrect baseline rendering of the majority of fonts in a table td with vertically-aligned bold or italic content;

- the amplification of such baseline errors, for any font, when superscript tags are used.

The bug is not apparent in Internet Explorer, Opera or Firefox, but does occur in Safari 5.1. The bug is partially present in Safari 6 on Mac and Chrome 30 on Unix. The bug appears to be dependent on operating system.

I attach a screenshot.
Comment 8 rick luna 2013-10-23 19:38:56 PDT
just adding a note that I run into this on occasion as i do a lot of html emails using table-based layouts for use in exact target, campaigner, etc.
Comment 9 flangeway 2015-11-25 15:44:22 PST
This bug now seems to be fully resolved with Chrome 46. See https://code.google.com/p/chromium/issues/detail?id=135657