Skip to content

Commit 85bc0d1

Browse files
mstenshoChromium LUCI CQ
authored andcommitted
MathML: Allow a fragmentainer break *before* an mrow.
While we don't expect to do block fragmentation *inside* an mrow (it's monolithic), it's perfectly fine to break *before* it. Correct a DCHECK to allow incoming IsBreakBefore() break tokens. Fixes external/wpt/mathml/relations/css-styling/display-2.html when LayoutNGBlockFragmentation is enabled. Bug: 829028 Change-Id: Idb0e03f99112f32b3d86430dd97a88e6cb14db14 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3178984 Reviewed-by: Ian Kilpatrick <[email protected]> Commit-Queue: Morten Stenshorne <[email protected]> Cr-Commit-Position: refs/heads/main@{#924309}
1 parent a916252 commit 85bc0d1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

third_party/blink/renderer/core/layout/ng/mathml/ng_math_row_layout_algorithm.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "third_party/blink/renderer/core/layout/ng/mathml/ng_math_layout_utils.h"
99
#include "third_party/blink/renderer/core/layout/ng/ng_block_break_token.h"
1010
#include "third_party/blink/renderer/core/layout/ng/ng_box_fragment.h"
11+
#include "third_party/blink/renderer/core/layout/ng/ng_fragmentation_utils.h"
1112
#include "third_party/blink/renderer/core/layout/ng/ng_length_utils.h"
1213
#include "third_party/blink/renderer/core/layout/ng/ng_out_of_flow_layout_part.h"
1314
#include "third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.h"
@@ -183,7 +184,7 @@ void NGMathRowLayoutAlgorithm::LayoutRowItems(
183184
}
184185

185186
scoped_refptr<const NGLayoutResult> NGMathRowLayoutAlgorithm::Layout() {
186-
DCHECK(!BreakToken());
187+
DCHECK(!IsResumingLayout(BreakToken()));
187188

188189
bool is_display_block_math =
189190
Node().IsMathRoot() && (Style().Display() == EDisplay::kBlockMath);

0 commit comments

Comments
 (0)