[Webkit-unassigned] [Bug 160547] Overflow of formulas is hidden for display mathematics
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Jan 28 02:53:08 PST 2018
https://bugs.webkit.org/show_bug.cgi?id=160547
--- Comment #7 from Frédéric Wang (:fredw) <fred.wang at free.fr> ---
Comment on attachment 332481
--> https://bugs.webkit.org/attachment.cgi?id=332481
patch
View in context: https://bugs.webkit.org/attachment.cgi?id=332481&action=review
> LayoutTests/mathml/presentation/display-math-horizontal-overflow.html:14
> + assert_equals(inline.clientWidth, block.clientWidth);
I think this test is a bit weak (it assumes inline math already have the correct width). I would instead try the 4 combinations between inline/block math and 100px/200px mspace content and check that the math has the expected width: 100px (for inline/100px), 200px (for block/100px) or 400px (for inline/400px and block/400px). You could even test centering inside the 200px container in the case block/100px, by checking the position of the mspace.
> Source/WebCore/ChangeLog:8
> + Previously, <math> with display="block" uses its preferred width as logical width.
Is that true? I don't remember but I believe it takes the *container* width at the end? I think at some point it would be nice to check what RenderBox is doing and whether we can better handle MathML (what I had tried with the experimental patch). But I guess that would be more complex and I'm not sure I can review the RenderBox code.
> Source/WebCore/rendering/mathml/RenderMathMLRow.cpp:185
> + if (width > logicalWidth())
I would do
if (width < logicalWidth) {
// DO THE CENTERING
} else
setLogicalWidth(width);
I think we can then just do centerBlockOffset = (logicalWidth() - width) / 2;
We also need to update the comment to explain the two cases.
--
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/20180128/45c4aa88/attachment.html>
More information about the webkit-unassigned
mailing list