Title: [282512] releases/WebKitGTK/webkit-2.32
Revision
282512
Author
[email protected]
Date
2021-09-16 01:51:23 -0700 (Thu, 16 Sep 2021)

Log Message

Merge r276630 - [MathML] Assertion failure in RenderTreeNeedsLayoutChecker
https://bugs.webkit.org/show_bug.cgi?id=224903

Patch by Frédéric Wang <[email protected]> on 2021-04-27
Reviewed by Alan Bujtas.

Source/WebCore:

After r226180, RenderMathMLRow no longer performs layout of its "embellished operator"
children only its core <mo> descendant, which is causing dirty layout.

Test: mathml/vertical-embellished-op-dirty-layout.html

* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::stretchVerticalOperatorsAndLayoutChildren): always layout the
"embellished operator" child, after its core <mo>.

LayoutTests:

Add regression test with all vertical embellished operators (other than <mo>) supported
by WebKit.

* mathml/vertical-embellished-op-dirty-layout-expected.txt: Added.
* mathml/vertical-embellished-op-dirty-layout.html: Added.

Modified Paths

Added Paths

Diff

Modified: releases/WebKitGTK/webkit-2.32/LayoutTests/ChangeLog (282511 => 282512)


--- releases/WebKitGTK/webkit-2.32/LayoutTests/ChangeLog	2021-09-16 08:51:15 UTC (rev 282511)
+++ releases/WebKitGTK/webkit-2.32/LayoutTests/ChangeLog	2021-09-16 08:51:23 UTC (rev 282512)
@@ -1,3 +1,16 @@
+2021-04-27  Frédéric Wang  <[email protected]>
+
+        [MathML] Assertion failure in RenderTreeNeedsLayoutChecker
+        https://bugs.webkit.org/show_bug.cgi?id=224903
+
+        Reviewed by Alan Bujtas.
+
+        Add regression test with all vertical embellished operators (other than <mo>) supported
+        by WebKit.
+
+        * mathml/vertical-embellished-op-dirty-layout-expected.txt: Added.
+        * mathml/vertical-embellished-op-dirty-layout.html: Added.
+
 2021-04-19  Darin Adler  <[email protected]>
 
         Nullptr crash in CSSCalcValue::category() via HTMLConverterCaches::floatPropertyValueForNode

Added: releases/WebKitGTK/webkit-2.32/LayoutTests/mathml/vertical-embellished-op-dirty-layout-expected.txt (0 => 282512)


--- releases/WebKitGTK/webkit-2.32/LayoutTests/mathml/vertical-embellished-op-dirty-layout-expected.txt	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.32/LayoutTests/mathml/vertical-embellished-op-dirty-layout-expected.txt	2021-09-16 08:51:23 UTC (rev 282512)
@@ -0,0 +1,30 @@
+This test passes if it does not crash.
+|
+1
+
+|
+1
+
+|
+1
+
+|
+1
+2
+
+|
+1
+
+|
+1
+
+|
+1
+2
+
+|
+1
+2
+3
+4
+

Added: releases/WebKitGTK/webkit-2.32/LayoutTests/mathml/vertical-embellished-op-dirty-layout.html (0 => 282512)


--- releases/WebKitGTK/webkit-2.32/LayoutTests/mathml/vertical-embellished-op-dirty-layout.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.32/LayoutTests/mathml/vertical-embellished-op-dirty-layout.html	2021-09-16 08:51:23 UTC (rev 282512)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <script>
+      if (window.testRunner)
+          testRunner.dumpAsText();
+    </script>
+  </head>
+  <body>
+    <div>This test passes if it does not crash.</div>
+    <math><mfrac><mo>|</mo><mn>1</mn></mfrac></math>
+    <math><munder><mo>|</mo><mn>1</mn></munder></math>
+    <math><mover><mo>|</mo><mn>1</mn></mover></math>
+    <math><munderover><mo>|</mo><mn>1</mn><mn>2</mn></munderover></math>
+    <math><msub><mo>|</mo><mn>1</mn></msub></math>
+    <math><msup><mo>|</mo><mn>1</mn></msup></math>
+    <math><msubsup><mo>|</mo><mn>1</mn><mn>2</mn></msubsup></math>
+    <math><mmultiscripts><mo>|</mo><mn>1</mn><mn>2</mn><mprescripts/><mn>3</mn><mn>4</mn></mmultiscripts></math>
+  </body>
+</html>

Modified: releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog (282511 => 282512)


--- releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog	2021-09-16 08:51:15 UTC (rev 282511)
+++ releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog	2021-09-16 08:51:23 UTC (rev 282512)
@@ -1,3 +1,19 @@
+2021-04-27  Frédéric Wang  <[email protected]>
+
+        [MathML] Assertion failure in RenderTreeNeedsLayoutChecker
+        https://bugs.webkit.org/show_bug.cgi?id=224903
+
+        Reviewed by Alan Bujtas.
+
+        After r226180, RenderMathMLRow no longer performs layout of its "embellished operator"
+        children only its core <mo> descendant, which is causing dirty layout.
+
+        Test: mathml/vertical-embellished-op-dirty-layout.html
+
+        * rendering/mathml/RenderMathMLRow.cpp:
+        (WebCore::RenderMathMLRow::stretchVerticalOperatorsAndLayoutChildren): always layout the
+        "embellished operator" child, after its core <mo>.
+
 2021-04-23  Ian Gilbert  <[email protected]>
 
         Crash in IndentOutdentCommand::outdentParagraph attempting to move a paragraph

Modified: releases/WebKitGTK/webkit-2.32/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp (282511 => 282512)


--- releases/WebKitGTK/webkit-2.32/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp	2021-09-16 08:51:15 UTC (rev 282511)
+++ releases/WebKitGTK/webkit-2.32/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp	2021-09-16 08:51:23 UTC (rev 282512)
@@ -101,6 +101,7 @@
         if (auto renderOperator = toVerticalStretchyOperator(child)) {
             renderOperator->stretchTo(stretchAscent, stretchDescent);
             renderOperator->layoutIfNeeded();
+            child->layoutIfNeeded();
         }
     }
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to