[Webkit-unassigned] [Bug 158866] New: MathOperator: Improve alignment for vertical size variant

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 16 23:04:22 PDT 2016


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

            Bug ID: 158866
           Summary: MathOperator: Improve alignment for vertical size
                    variant
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: MathML
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: fred.wang at free.fr
                CC: rego at igalia.com
        Depends on: 124827, 152244

Follow-up of bug 152244 comment 32.

Currently, MathOperator::stretchTo is called with the desired ascent/descent. When m_stretchType == StretchType::GlyphAssembly, this is used to set the desired vertical position of the operator. However, when m_stretchType == StretchType::SizeVariant the actual ascent/descent of the glyph is used for painting, and this may not correspond at all to the original MathOperator::stretchTo request.

One easy way to fix that is to make MathOperator::stretchTo calculate a parameter m_verticalOffset when m_stretchType != StretchType::GlyphAssembly which would measure the difference between targetCenter = (-ascent + descent) / 2 and glyphCenter = (-m_ascent + m_descent) / 2. Then that parameter can be used to apply a shift during MathOperator::paint.

Or maybe MathOperator::stretchTo should only take the target height as the parameter and it will be up to the MathOperator::paint caller to adjust the vertical offset (although that would probably mean that the shift will be stored in the caller's class).

There is a test from the MathML in HTML5 test suite but it does not work well in WebKit yet:
http://tests.mathml-association.org/mathml/presentation-markup/operators/mo-axis-height-1.html

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160617/8da1f7c5/attachment.html>


More information about the webkit-unassigned mailing list