Title: [277188] branches/safari-611-branch
Revision
277188
Author
repst...@apple.com
Date
2021-05-07 11:48:17 -0700 (Fri, 07 May 2021)

Log Message

Cherry-pick r276630. rdar://problem/77581089

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

    Patch by Frédéric Wang <fw...@igalia.com> 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.

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276630 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Added Paths

Diff

Modified: branches/safari-611-branch/LayoutTests/ChangeLog (277187 => 277188)


--- branches/safari-611-branch/LayoutTests/ChangeLog	2021-05-07 18:48:12 UTC (rev 277187)
+++ branches/safari-611-branch/LayoutTests/ChangeLog	2021-05-07 18:48:17 UTC (rev 277188)
@@ -1,5 +1,49 @@
 2021-05-06  Russell Epstein  <repst...@apple.com>
 
+        Cherry-pick r276630. rdar://problem/77581089
+
+    [MathML] Assertion failure in RenderTreeNeedsLayoutChecker
+    https://bugs.webkit.org/show_bug.cgi?id=224903
+    
+    Patch by Frédéric Wang <fw...@igalia.com> 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.
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-04-27  Frédéric Wang  <fw...@igalia.com>
+
+            [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-05-06  Russell Epstein  <repst...@apple.com>
+
         Cherry-pick r275607. rdar://problem/77581135
 
     REGRESSION (r270849): Button content fails to render on apple.com "Blood Oxygen"/"ECG"

Added: branches/safari-611-branch/LayoutTests/mathml/vertical-embellished-op-dirty-layout-expected.txt (0 => 277188)


--- branches/safari-611-branch/LayoutTests/mathml/vertical-embellished-op-dirty-layout-expected.txt	                        (rev 0)
+++ branches/safari-611-branch/LayoutTests/mathml/vertical-embellished-op-dirty-layout-expected.txt	2021-05-07 18:48:17 UTC (rev 277188)
@@ -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: branches/safari-611-branch/LayoutTests/mathml/vertical-embellished-op-dirty-layout.html (0 => 277188)


--- branches/safari-611-branch/LayoutTests/mathml/vertical-embellished-op-dirty-layout.html	                        (rev 0)
+++ branches/safari-611-branch/LayoutTests/mathml/vertical-embellished-op-dirty-layout.html	2021-05-07 18:48:17 UTC (rev 277188)
@@ -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: branches/safari-611-branch/Source/WebCore/ChangeLog (277187 => 277188)


--- branches/safari-611-branch/Source/WebCore/ChangeLog	2021-05-07 18:48:12 UTC (rev 277187)
+++ branches/safari-611-branch/Source/WebCore/ChangeLog	2021-05-07 18:48:17 UTC (rev 277188)
@@ -1,5 +1,52 @@
 2021-05-06  Russell Epstein  <repst...@apple.com>
 
+        Cherry-pick r276630. rdar://problem/77581089
+
+    [MathML] Assertion failure in RenderTreeNeedsLayoutChecker
+    https://bugs.webkit.org/show_bug.cgi?id=224903
+    
+    Patch by Frédéric Wang <fw...@igalia.com> 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.
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-04-27  Frédéric Wang  <fw...@igalia.com>
+
+            [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-05-06  Russell Epstein  <repst...@apple.com>
+
         Cherry-pick r276492. rdar://problem/77581017
 
     Do not set synchronous scrolling for layers without relevant scrolling scopes

Modified: branches/safari-611-branch/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp (277187 => 277188)


--- branches/safari-611-branch/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp	2021-05-07 18:48:12 UTC (rev 277187)
+++ branches/safari-611-branch/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp	2021-05-07 18:48:17 UTC (rev 277188)
@@ -101,6 +101,7 @@
         if (auto renderOperator = toVerticalStretchyOperator(child)) {
             renderOperator->stretchTo(stretchAscent, stretchDescent);
             renderOperator->layoutIfNeeded();
+            child->layoutIfNeeded();
         }
     }
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to