Title: [221394] trunk/Source/WebCore
Revision
221394
Author
pvol...@apple.com
Date
2017-08-30 13:01:10 -0700 (Wed, 30 Aug 2017)

Log Message

[Win] Crash in MathML layout test.
https://bugs.webkit.org/show_bug.cgi?id=176109

Reviewed by Brent Fulgham.

Return early if no font can be found for code point.

No new tests, covered by existing tests.

* rendering/mathml/MathOperator.cpp:
(WebCore::MathOperator::paintVerticalGlyphAssembly):
(WebCore::MathOperator::paintHorizontalGlyphAssembly):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (221393 => 221394)


--- trunk/Source/WebCore/ChangeLog	2017-08-30 19:46:32 UTC (rev 221393)
+++ trunk/Source/WebCore/ChangeLog	2017-08-30 20:01:10 UTC (rev 221394)
@@ -1,3 +1,18 @@
+2017-08-30  Per Arne Vollan  <pvol...@apple.com>
+
+        [Win] Crash in MathML layout test.
+        https://bugs.webkit.org/show_bug.cgi?id=176109
+
+        Reviewed by Brent Fulgham.
+
+        Return early if no font can be found for code point.
+
+        No new tests, covered by existing tests. 
+
+        * rendering/mathml/MathOperator.cpp:
+        (WebCore::MathOperator::paintVerticalGlyphAssembly):
+        (WebCore::MathOperator::paintHorizontalGlyphAssembly):
+
 2017-08-30  Brady Eidson  <beid...@apple.com>
 
         Implement all of "Register" right up until where the script is fetched.

Modified: trunk/Source/WebCore/rendering/mathml/MathOperator.cpp (221393 => 221394)


--- trunk/Source/WebCore/rendering/mathml/MathOperator.cpp	2017-08-30 19:46:32 UTC (rev 221393)
+++ trunk/Source/WebCore/rendering/mathml/MathOperator.cpp	2017-08-30 20:01:10 UTC (rev 221394)
@@ -637,6 +637,10 @@
 
     ASSERT(topOrRight.font);
     ASSERT(bottomOrLeft.font);
+    if (!topOrRight.font || !bottomOrLeft.font) {
+        LOG_ERROR("MathML: no font can be found for Unicode code point.");
+        return;
+    }
 
     // We are positioning the glyphs so that the edge of the tight glyph bounds line up exactly with the edges of our paint box.
     LayoutPoint operatorTopLeft = paintOffset;
@@ -674,6 +678,10 @@
 
     ASSERT(bottomOrLeft.font);
     ASSERT(topOrRight.font);
+    if (!topOrRight.font || !bottomOrLeft.font) {
+        LOG_ERROR("MathML: no font can be found for Unicode code point.");
+        return;
+    }
 
     // We are positioning the glyphs so that the edge of the tight glyph bounds line up exactly with the edges of our paint box.
     LayoutPoint operatorTopLeft = paintOffset;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to