Title: [215756] trunk
Revision
215756
Author
mmaxfi...@apple.com
Date
2017-04-25 13:58:38 -0700 (Tue, 25 Apr 2017)

Log Message

Supplementary Multilingual Plane Complex Scripts Rendered Incorrectly
https://bugs.webkit.org/show_bug.cgi?id=171272
<rdar://problem/30966764>

Reviewed by Zalan Bujtas.

Source/WebCore:

These scripts need to take the complex text codepath.

Test: fast/text/kaithi.html

* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::characterRangeCodePath):

LayoutTests:

* fast/text/kaithi-expected.html: Added.
* fast/text/kaithi.html: Added.
* platform/ios/TestExpectations:
* platform/mac/TestExpectations:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (215755 => 215756)


--- trunk/LayoutTests/ChangeLog	2017-04-25 20:38:00 UTC (rev 215755)
+++ trunk/LayoutTests/ChangeLog	2017-04-25 20:58:38 UTC (rev 215756)
@@ -1,3 +1,16 @@
+2017-04-25  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        Supplementary Multilingual Plane Complex Scripts Rendered Incorrectly
+        https://bugs.webkit.org/show_bug.cgi?id=171272
+        <rdar://problem/30966764>
+
+        Reviewed by Zalan Bujtas.
+
+        * fast/text/kaithi-expected.html: Added.
+        * fast/text/kaithi.html: Added.
+        * platform/ios/TestExpectations:
+        * platform/mac/TestExpectations:
+
 2017-04-25  Daniel Bates  <daba...@apple.com>
 
         [Cocoa][Win] Enable of X-Content-Type-Options: nosniff header

Added: trunk/LayoutTests/fast/text/kaithi-expected.html (0 => 215756)


--- trunk/LayoutTests/fast/text/kaithi-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/kaithi-expected.html	2017-04-25 20:58:38 UTC (rev 215756)
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+<p>This font makes sure that text using the Kaithi unicode block gets shaped correctly. The test passes if the element's layout rect completely covers its paint rect (which would cause the entire page below to be white).</p>
+</body>
+</html>
+

Added: trunk/LayoutTests/fast/text/kaithi.html (0 => 215756)


--- trunk/LayoutTests/fast/text/kaithi.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/kaithi.html	2017-04-25 20:58:38 UTC (rev 215756)
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+<p>This font makes sure that text using the Kaithi unicode block gets shaped correctly. The test passes if the element's layout rect completely covers its paint rect (which would cause the entire page below to be white).</p>
+<p id="container" style="font-size: 48px; overflow: hidden;"><span id="test">&#x1108d;&#x110b9;&#x1108d;&#x110b9;&#x1108e;&#x110b1;</span></p>
+<script>
+var container = document.getElementById("container");
+var test = document.getElementById("test");
+var clientRects = test.getClientRects();
+for (var i = 0; i < clientRects.length; ++i) {
+    var clientRect = clientRects[i];
+    var cover = document.createElement("div");
+    cover.style.position = "absolute";
+    cover.style.top = clientRect.top.toString() + "px";
+    cover.style.left = clientRect.left.toString() + "px";
+    cover.style.width = clientRect.width.toString() + "px";
+    cover.style.height = container.getClientRects()[0].height.toString() + "px";
+    cover.style.backgroundColor = "white";
+    container.appendChild(cover);
+}
+
+</script>
+</body>
+</html>
+

Modified: trunk/LayoutTests/platform/ios/TestExpectations (215755 => 215756)


--- trunk/LayoutTests/platform/ios/TestExpectations	2017-04-25 20:38:00 UTC (rev 215755)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2017-04-25 20:58:38 UTC (rev 215756)
@@ -2942,3 +2942,5 @@
 # <rdar://problem/25780035> CSP does not ignore paths for media redirects
 http/tests/security/contentSecurityPolicy/audio-redirect-allowed2.html [ Skip ]
 http/tests/security/contentSecurityPolicy/video-redirect-allowed2.html [ Skip ]
+
+webkit.org/b/171272 fast/text/kaithi.html [ ImageOnlyFailure ]

Modified: trunk/LayoutTests/platform/mac/TestExpectations (215755 => 215756)


--- trunk/LayoutTests/platform/mac/TestExpectations	2017-04-25 20:38:00 UTC (rev 215755)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2017-04-25 20:58:38 UTC (rev 215756)
@@ -1587,3 +1587,5 @@
 webkit.org/b/170831 media/track/track-cue-rendering-rtl.html [ Pass Timeout ]
 
 webkit.org/b/165553 media/media-controls-timeline-updates-when-hovered.html [ Pass Failure ]
+
+webkit.org/b/171272 [ Yosemite ElCapitan Sierra ] fast/text/kaithi.html [ ImageOnlyFailure ]

Modified: trunk/Source/WebCore/ChangeLog (215755 => 215756)


--- trunk/Source/WebCore/ChangeLog	2017-04-25 20:38:00 UTC (rev 215755)
+++ trunk/Source/WebCore/ChangeLog	2017-04-25 20:58:38 UTC (rev 215756)
@@ -1,3 +1,18 @@
+2017-04-25  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        Supplementary Multilingual Plane Complex Scripts Rendered Incorrectly
+        https://bugs.webkit.org/show_bug.cgi?id=171272
+        <rdar://problem/30966764>
+
+        Reviewed by Zalan Bujtas.
+
+        These scripts need to take the complex text codepath.
+
+        Test: fast/text/kaithi.html
+
+        * platform/graphics/FontCascade.cpp:
+        (WebCore::FontCascade::characterRangeCodePath):
+
 2017-04-25  Carlos Alberto Lopez Perez  <clo...@igalia.com>
 
         [GTK] Revert r215745 (especulative build fix) after r215752.

Modified: trunk/Source/WebCore/platform/graphics/FontCascade.cpp (215755 => 215756)


--- trunk/Source/WebCore/platform/graphics/FontCascade.cpp	2017-04-25 20:38:00 UTC (rev 215755)
+++ trunk/Source/WebCore/platform/graphics/FontCascade.cpp	2017-04-25 20:58:38 UTC (rev 215756)
@@ -787,6 +787,60 @@
 
             UChar32 supplementaryCharacter = U16_GET_SUPPLEMENTARY(c, next);
 
+            if (supplementaryCharacter < 0x10A00)
+                continue;
+            if (supplementaryCharacter < 0x10A60) // Kharoshthi
+                return Complex;
+            if (supplementaryCharacter < 0x11000)
+                continue;
+            if (supplementaryCharacter < 0x11080) // Brahmi
+                return Complex;
+            if (supplementaryCharacter < 0x110D0) // Kaithi
+                return Complex;
+            if (supplementaryCharacter < 0x11100)
+                continue;
+            if (supplementaryCharacter < 0x11150) // Chakma
+                return Complex;
+            if (supplementaryCharacter < 0x11180) // Mahajani
+                return Complex;
+            if (supplementaryCharacter < 0x111E0) // Sharada
+                return Complex;
+            if (supplementaryCharacter < 0x11200)
+                continue;
+            if (supplementaryCharacter < 0x11250) // Khojki
+                return Complex;
+            if (supplementaryCharacter < 0x112B0)
+                continue;
+            if (supplementaryCharacter < 0x11300) // Khudawadi
+                return Complex;
+            if (supplementaryCharacter < 0x11380) // Grantha
+                return Complex;
+            if (supplementaryCharacter < 0x11400)
+                continue;
+            if (supplementaryCharacter < 0x11480) // Newa
+                return Complex;
+            if (supplementaryCharacter < 0x114E0) // Tirhuta
+                return Complex;
+            if (supplementaryCharacter < 0x11580)
+                continue;
+            if (supplementaryCharacter < 0x11600) // Siddham
+                return Complex;
+            if (supplementaryCharacter < 0x11660) // Modi
+                return Complex;
+            if (supplementaryCharacter < 0x11680)
+                continue;
+            if (supplementaryCharacter < 0x116D0) // Takri
+                return Complex;
+            if (supplementaryCharacter < 0x11C00)
+                continue;
+            if (supplementaryCharacter < 0x11C70) // Bhaiksuki
+                return Complex;
+            if (supplementaryCharacter < 0x11CC0) // Marchen
+                return Complex;
+            if (supplementaryCharacter < 0x1E900)
+                continue;
+            if (supplementaryCharacter < 0x1E960) // Adlam
+                return Complex;
             if (supplementaryCharacter < 0x1F1E6) // U+1F1E6 through U+1F1FF Regional Indicator Symbols
                 continue;
             if (supplementaryCharacter <= 0x1F1FF)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to