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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 14 11:09:02 PST 2017


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

--- Comment #26 from Frédéric Wang (:fredw) <fred.wang at free.fr> ---
(In reply to Minsheng Liu from comment #25)
> > So this patch fixes your initial test case, right? What about the centering, do we still need it? I actually wonder whether it was because the actual size of the stretched operator does not necessarily match the target size (so it would still be more beautiful to do a centering... but ignoring lspace/rspace to avoid this bug)?
> 
> The updated computeOperatorHorizontalStretch(), plus the fix in stretchTo()
> that updates the logical width, should match the actual size of the
> stretched operator with the target size, rendering centering unnecessary. I
> think our general aim should to match these two sizes as they give better
> bounds in the Inspector. Therefore, removing the center code once and for
> all should be fine, and if we find any further issue on those, we could fix
> them independently.

So my point is that we have non-streching elements providing a target size, then we stretch the operator to be *at least* that target size. We use the base size, size variants or glyph assembly but we can not necessarily match the target size. I think the logical width should match the stretched size, though.

> 
> By the way, I think the patch, if accepted, would not get into mainstream
> Safari until next September, so we have plenty of time to catch them…I am
> unsure about other platforms. 😂

Well, I think we can't say anything per https://trac.webkit.org/wiki/FAQ#WillfeatureXXXbeincludedinthenextreleaseofSafari

> Ok, my plan will be handle them in three steps:
> 
> 1. Cleanup layout code in RenderMathMLUnderOver.cpp.
> 2. Rework stretchHorizontalOperatorsAndLayoutChildren() so that it gives
> correct bounds. This one requires some test using getBoundingClientRect().
> 3. Remove the center code and closes this issue.

Sounds good to me, thanks.

> By the way, is there any other environment where an operator might be
> stretched? If so, I could look at them manually.

Yes, for example vertical operators in <mrow>. Search for "stretchTo" in rendering/mathml

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


More information about the webkit-unassigned mailing list