[Webkit-unassigned] [Bug 79274] Fix <msubsup> formatting

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 22 22:43:13 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=79274





--- Comment #4 from Dave Barton <dbarton at mathscribe.com>  2012-02-22 22:43:13 PST ---
I may write more tomorrow, but basically Frederic Wang or anyone else could look at the 6 .png files at the bottom of the "Formatted Diff" link on the patch attachment above. These are the new results, and the old results are in
http://svn.webkit.org/repository/webkit/trunk/LayoutTests/platform/mac/mathml/presentation/
(at least until Eric or someone commits the patch and the new results). The source .xhtml and .html files are in
http://svn.webkit.org/repository/webkit/trunk/LayoutTests/mathml/presentation/
in case you want to look at them in another browser. Thanks very much for any help!

Actually I may have misled Eric with the title of this bug. I'm really still doing code clean-up - moving the layout code from stretchToHeight() to layout(), removing the custom baselinePosition() estimate so the true baseline will be computed, etc. In the process, the output becomes slightly prettier. The integral sign in mo-stretch.html is no longer scaled up by an extra 1.2, baselines are more accurate so the base is higher in msubsup-sub-changed.png, etc. The problems before were caused partly by things like wrapping the subscript and superscript in (somewhat) anonymous blocks, where the font-size in the anonymous block was still 16 while the script's was only 12, leading to extra vertical space, etc. It's these coding problems I was really after, but also here are my basic rules for the new <msubsup> layout:

    // Don't let the superscript be below the axis (half x-height), or the subscript above it.
    // Also m_scripts has setVerticalAlign(TOP), and don't let the subscript bottom be above the base bottom.

Here m_scripts is the subscript/superscript pair, so the setVerticalAlign(TOP) means the top of the superscript will equal the top of the base, perhaps with extra padding added on top of the base.

If people do want to suggest other rules to tune this <msubsup> layout now, we could come up with larger examples that show different choices more clearly.

One detail: Eric, can you set the mime-type property on mo-stretch-expected.png? I tried to in svn but maybe it didn't land because I don't actually do the commit.(??)

Thanks again to everyone for all the help. I'll send e-mail asking for some more volunteers to look at the output tomorrow.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list