[Webkit-unassigned] [Bug 170272] MathML: Extra left space for arrows inside <mo>

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 3 01:25:50 PDT 2017


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

--- Comment #6 from Alejandro G. Castro <alex at igalia.com> ---
(In reply to Minsheng Liu from comment #4)
> I believe I have found the issue, but since I am not familiar with the code,
> I am not sure what is the right way to fix it. In RenderMathMLOpeartor.cpp,
> line 290 - 311:
> 
> > void RenderMathMLOperator::paint(PaintInfo& info, const LayoutPoint& paintOffset)
> > {
> >     RenderMathMLToken::paint(info, paintOffset);
> >     if (!useMathOperator())
> >         return;
> > 
> >     LayoutPoint operatorTopLeft = paintOffset + location();
> >     operatorTopLeft.move(style().isLeftToRightDirection() ? leadingSpace() : trailingSpace(), 0);
> > 
> >     // Center horizontal operators.
> >     if (!isVertical())
> >         operatorTopLeft.move(-(m_mathOperator.width() - width()) / 2, 0);
> >

I also wonder why are we doing this part of the layout in the paint method, probably we should try to move to the layout if we don't find any real limitation. This could be also the problem, as you found leadingSpace is a calculation already centered and we are centering again in the paint. Maybe just try to move that to the layout and see if that is already done. As Fred said run the tests because there are a lot of cases to consider in this code.

-- 
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/20170403/a7254d6a/attachment-0001.html>


More information about the webkit-unassigned mailing list