Bug 68100

Summary: REGRESSION (r78846): Text misaligned vertically within table cell with valign="top" attribute and <sup> tags
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ahmad.saleem792, ap, bfulgham, flangeway, hyatt, mitz, rluna, rniwa, simon.fraser, tom239, zalan
Priority: P2 Keywords: HasReduction, InRadar, Regression
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 54244    
Bug Blocks:    
Attachments:
Description Flags
Test case
none
Expected results
none
Actual results
none
screenshot attached none

Description David Kilzer (:ddkilzer) 2011-09-14 12:05:46 PDT
* SUMMARY
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.

* STEPS TO REPRODUCE
1. Load attached test case.

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

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

* REGRESSION
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.

* NOTES
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
<rdar://problem/10117982>
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 
 https://code.google.com/p/chromium/issues/detail?id=135657
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
Comment 10 Ahmad Saleem 2022-08-29 04:50:08 PDT
I am unable to reproduce this bug in Safari 15.6.1 and Safari Technology Preview 152 using attached test case and it shows similar behavior as "EXPECTED RESULT" and matching both Chrome Canary 107 and Firefox Nightly 106. It seems to be something fixed along the way.

I am going to mark this as "RESOLVED CONFIGURATION CHANGED". Please reopen with updated test case in case if it is still present. Thanks!