Title: [197423] trunk
Revision
197423
Author
[email protected]
Date
2016-03-01 16:00:02 -0800 (Tue, 01 Mar 2016)

Log Message

ASSERT in platform/graphics/mac/ComplexTextController.cpp::capitalize()
https://bugs.webkit.org/show_bug.cgi?id=154875

Reviewed by Myles C. Maxfield.

Source/WebCore:

Change an ASSERT to verify that uper casing a character doesn't change its size.

Test: fast/text/regress-154875.html

* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::capitalized):

LayoutTests:

New test.

* fast/text/regress-154875-expected.txt: Added.
* fast/text/regress-154875.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (197422 => 197423)


--- trunk/LayoutTests/ChangeLog	2016-03-01 23:58:11 UTC (rev 197422)
+++ trunk/LayoutTests/ChangeLog	2016-03-02 00:00:02 UTC (rev 197423)
@@ -1,3 +1,15 @@
+2016-03-01  Michael Saboff  <[email protected]>
+
+        ASSERT in platform/graphics/mac/ComplexTextController.cpp::capitalize()
+        https://bugs.webkit.org/show_bug.cgi?id=154875
+
+        Reviewed by Myles C. Maxfield.
+
+        New test.
+
+        * fast/text/regress-154875-expected.txt: Added.
+        * fast/text/regress-154875.html: Added.
+
 2016-03-01  Filip Pizlo  <[email protected]>
 
         FTL should simplify StringReplace with an empty replacement string

Added: trunk/LayoutTests/fast/text/regress-154875-expected.txt (0 => 197423)


--- trunk/LayoutTests/fast/text/regress-154875-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/text/regress-154875-expected.txt	2016-03-02 00:00:02 UTC (rev 197423)
@@ -0,0 +1,23 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock (anonymous) at (0,0) size 784x0
+        RenderInline {SPAN} at (0,0) size 0x0
+          RenderText {#text} at (0,0) size 0x0
+      RenderBlock (anonymous) at (0,0) size 784x73
+        RenderBlock {P} at (0,0) size 784x18
+          RenderText {#text} at (0,0) size 348x18
+            text run at (0,0) width 180: "Regression test for 154875. "
+            text run at (179,0) width 169: "This test should not crash."
+        RenderBlock {DIV} at (0,34) size 784x21
+          RenderText {#text} at (0,1) size 215x18
+            text run at (0,1) width 168: "This is a Unicode string: \""
+            text run at (167,1) width 15: "\x{600}"
+            text run at (181,1) width 34: " \x{D801}\x{DC29}\x{D801}\x{DC2A}\x{D801}\x{DC2B}\""
+        RenderBlock {DIV} at (0,55) size 784x18
+          RenderText {#text} at (0,0) size 150x18
+            text run at (0,0) width 150: "PASS: Test didn't crash"
+      RenderBlock (anonymous) at (0,73) size 784x0
+        RenderInline {SPAN} at (0,0) size 0x0

Added: trunk/LayoutTests/fast/text/regress-154875.html (0 => 197423)


--- trunk/LayoutTests/fast/text/regress-154875.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/regress-154875.html	2016-03-02 00:00:02 UTC (rev 197423)
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+</head>
+<body>
+<span id="span">
+<p id="description">Regression test for 154875.  This test should not crash.</p>
+<div id="unicode-text" style="text-transform: small-caps;"></div>
+<div id="console"></div>
+<script>
+    document.getElementById('unicode-text').innerHTML = "This is a Unicode string: \"\u0600 \u{10429}\u{1042a}\u{1042b}\"";
+    document.getElementById('console').innerHTML = "PASS: Test didn't crash";
+</script>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (197422 => 197423)


--- trunk/Source/WebCore/ChangeLog	2016-03-01 23:58:11 UTC (rev 197422)
+++ trunk/Source/WebCore/ChangeLog	2016-03-02 00:00:02 UTC (rev 197423)
@@ -1,3 +1,17 @@
+2016-03-01  Michael Saboff  <[email protected]>
+
+        ASSERT in platform/graphics/mac/ComplexTextController.cpp::capitalize()
+        https://bugs.webkit.org/show_bug.cgi?id=154875
+
+        Reviewed by Myles C. Maxfield.
+
+        Change an ASSERT to verify that uper casing a character doesn't change its size.
+
+        Test: fast/text/regress-154875.html
+
+        * platform/graphics/mac/ComplexTextController.cpp:
+        (WebCore::capitalized):
+
 2016-03-01  Gavin Barraclough  <[email protected]>
 
         Timer alignment in separate web processes should not all sync up to the same point.

Modified: trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp (197422 => 197423)


--- trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp	2016-03-01 23:58:11 UTC (rev 197422)
+++ trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp	2016-03-02 00:00:02 UTC (rev 197423)
@@ -298,7 +298,7 @@
         return Nullopt;
 
     UChar32 uppercaseCharacter = u_toupper(baseCharacter);
-    ASSERT(uppercaseCharacter == baseCharacter || uppercaseCharacter <= 0xFFFF);
+    ASSERT(uppercaseCharacter == baseCharacter || (U_IS_BMP(baseCharacter) == U_IS_BMP(uppercaseCharacter)));
     if (uppercaseCharacter != baseCharacter)
         return uppercaseCharacter;
     return Nullopt;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to