Commit e4cbd27e authored by Frédéric Wang's avatar Frédéric Wang Committed by Commit Bot

[mathml] Disable multicol for MathML layout

This CL disables multicol for MathML, since it has been causing issue
and is not needed for math layout. This is consistent with flexbox,
grid, table or custom layout for example. In particular, this fixes
an assertion failure when multicol is used on MathML token elements.

Bug: 6606, 1128267
Change-Id: I9bb365b7af25e11b994dfc8f2470b3fa4ea2adeb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2410131Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Commit-Queue: Frédéric Wang <fwang@igalia.com>
Cr-Commit-Position: refs/heads/master@{#807361}
parent 8a825ae4
...@@ -4407,6 +4407,10 @@ void LayoutBlockFlow::CreateOrDestroyMultiColumnFlowThreadIfNeeded( ...@@ -4407,6 +4407,10 @@ void LayoutBlockFlow::CreateOrDestroyMultiColumnFlowThreadIfNeeded(
if (IsLayoutNGCustom()) if (IsLayoutNGCustom())
return; return;
// MathML layout objects don't support multicol.
if (IsMathML())
return;
auto* flow_thread = LayoutMultiColumnFlowThread::CreateAnonymous( auto* flow_thread = LayoutMultiColumnFlowThread::CreateAnonymous(
GetDocument(), StyleRef(), !CanTraversePhysicalFragments()); GetDocument(), StyleRef(), !CanTraversePhysicalFragments());
AddChild(flow_thread); AddChild(flow_thread);
......
<!DOCTYPE html>
<math><mi style="column-count: 10">mi</mi></math>
<math><mi style="column-width: 10px">mi</mi></math>
<math><mn style="column-count: 10">mn</mn></math>
<math><mn style="column-width: 10px">mn</mn></math>
<math><mo style="column-count: 10">mo</mo></math>
<math><mo style="column-width: 10px">mo</mo></math>
<math><ms style="column-count: 10">ms</ms></math>
<math><ms style="column-width: 10px">ms</ms></math>
<math><mtext style="column-count: 10">mtext</mtext></math>
<math><mtext style="column-width: 10px">mtext</mtext></math>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment