[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
eric at webkit.org
eric at webkit.org
Wed Mar 17 18:34:55 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 49e403db4f404f169ec2e65ab48add34c63761d6
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Mar 12 01:37:33 2010 +0000
2010-03-11 Jungshik Shin <jshin at chromium.org>
[Chromium]: Plane 2 characters are rendered "blank"
(not even empty boxes) on Windows even when there are fonts to
cover them.
https://bugs.webkit.org/show_bug.cgi?id=35605
Test:LayoutTests/fast/text/international/plane2.html
* platform/graphics/chromium/FontCacheChromiumWin.cpp:
(WebCore::LookupAltName): Add two ExtB fonts to the array (namePairs) that are used for Plane 2 character rendering.
(WebCore::FontCache::getFontDataForCharacters): Add two more fonts to the fallback font list
* platform/graphics/chromium/FontUtilsChromiumWin.cpp:
(WebCore::getFallbackFamily): Fix the fallback font lookup to cover Plane 2 (CJK ExtB).
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/fast/text/international/plane2.html b/LayoutTests/fast/text/international/plane2.html
new file mode 100644
index 0000000..00d491f
--- /dev/null
+++ b/LayoutTests/fast/text/international/plane2.html
@@ -0,0 +1,16 @@
+<html>
+ <head>
+ <title>Bug 35605: Plane 2 characters: CJK Ext B</title>
+ </head>
+ <body>
+ <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=35605">bug 35605</a>: Two lines below have one character from CJK Ideograph, one from CJK Ext A (both in BMP) and three characters from CJK Ext B (plane 2). The last group of characters are covered by Japanese fonts on Mac as well as two Chinese fonts for Ext B shipped with Windows.</p>
+ <div style="font-size: 2em;">
+ <div>
+ 一 㐀 𩺊𩹉𩻛
+ </div>
+ <div style="font-family: serif;">
+ 一 㐀 𩺊𩹉𩻛
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/LayoutTests/platform/mac/fast/text/international/plane2-expected.checksum b/LayoutTests/platform/mac/fast/text/international/plane2-expected.checksum
new file mode 100644
index 0000000..c818c7a
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/text/international/plane2-expected.checksum
@@ -0,0 +1 @@
+0aa49db1edbc36aaa6be719c80575ec5
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/text/international/plane2-expected.png b/LayoutTests/platform/mac/fast/text/international/plane2-expected.png
new file mode 100644
index 0000000..ba32390
Binary files /dev/null and b/LayoutTests/platform/mac/fast/text/international/plane2-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/text/international/plane2-expected.txt b/LayoutTests/platform/mac/fast/text/international/plane2-expected.txt
new file mode 100644
index 0000000..176b0aa
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/text/international/plane2-expected.txt
@@ -0,0 +1,22 @@
+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 {P} at (0,0) size 784x54
+ RenderText {#text} at (0,0) size 53x18
+ text run at (0,0) width 53: "Test for "
+ RenderInline {A} at (0,0) size 68x18 [color=#0000EE]
+ RenderText {#text} at (53,0) size 68x18
+ text run at (53,0) width 68: "bug 35605"
+ RenderText {#text} at (121,0) size 758x54
+ text run at (121,0) width 634: ": Two lines below have one character from CJK Ideograph, one from CJK Ext A (both in BMP) and"
+ text run at (0,18) width 758: "three characters from CJK Ext B (plane 2). The last group of characters are covered by Japanese fonts on Mac as well as"
+ text run at (0,36) width 331: "two Chinese fonts for Ext B shipped with Windows."
+ RenderBlock {DIV} at (0,70) size 784x88
+ RenderBlock {DIV} at (0,0) size 784x44
+ RenderText {#text} at (0,7) size 176x37
+ text run at (0,7) width 176: "\x{4E00} \x{3400} \x{D867}\x{DE8A}\x{D867}\x{DE49}\x{D867}\x{DEDB}"
+ RenderBlock {DIV} at (0,44) size 784x44
+ RenderText {#text} at (0,7) size 176x37
+ text run at (0,7) width 176: "\x{4E00} \x{3400} \x{D867}\x{DE8A}\x{D867}\x{DE49}\x{D867}\x{DEDB}"
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index 9eb46c8..efaafbc 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -792,3 +792,6 @@ fast/forms/multiple-form-submission-protection-mouse.html
# mouseScrollBy() is not yet implemented in the Windows EventSender API.
fast/events/remove-child-onscroll.html
+
+# Windows port doesn't yet support rendering of non-BMP characters even though there's a font available.
+fast/text/international/plane2.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index aead5ef..7450ed0 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-03-11 Jungshik Shin <jshin at chromium.org>
+
+ [Chromium]: Plane 2 characters are rendered "blank"
+ (not even empty boxes) on Windows even when there are fonts to
+ cover them.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35605
+
+ Test:LayoutTests/fast/text/international/plane2.html
+
+ * platform/graphics/chromium/FontCacheChromiumWin.cpp:
+ (WebCore::LookupAltName): Add two ExtB fonts to the array (namePairs) that are used for Plane 2 character rendering.
+ (WebCore::FontCache::getFontDataForCharacters): Add two more fonts to the fallback font list
+ * platform/graphics/chromium/FontUtilsChromiumWin.cpp:
+ (WebCore::getFallbackFamily): Fix the fallback font lookup to cover Plane 2 (CJK ExtB).
+
2010-03-11 Leandro Pereira <leandro at profusion.mobi>
Reviewed by Holger Freyther.
diff --git a/WebCore/platform/graphics/chromium/FontCacheChromiumWin.cpp b/WebCore/platform/graphics/chromium/FontCacheChromiumWin.cpp
index 8dac612..6f46f7e 100644
--- a/WebCore/platform/graphics/chromium/FontCacheChromiumWin.cpp
+++ b/WebCore/platform/graphics/chromium/FontCacheChromiumWin.cpp
@@ -140,6 +140,9 @@ static bool LookupAltName(const String& name, String& altName)
// 宋体, SimSun
{L"\x5B8B\x4F53", {L"SimSun", simplifiedChineseCodepage}},
{L"simsun", {L"\x5B8B\x4F53", simplifiedChineseCodepage}},
+ // 宋体-ExtB, SimSun-ExtB
+ {L"\x5B8B\x4F53-ExtB", {L"SimSun-ExtB", simplifiedChineseCodepage}},
+ {L"simsun-extb", {L"\x5B8B\x4F53-extb", simplifiedChineseCodepage}},
// 黑体, SimHei
{L"\x9ED1\x4F53", {L"SimHei", simplifiedChineseCodepage}},
{L"simhei", {L"\x9ED1\x4F53", simplifiedChineseCodepage}},
@@ -164,9 +167,15 @@ static bool LookupAltName(const String& name, String& altName)
// 新細明體, PMingLiu
{L"\x65B0\x7D30\x660E\x9AD4", {L"PMingLiu", traditionalChineseCodepage}},
{L"pmingliu", {L"\x65B0\x7D30\x660E\x9AD4", traditionalChineseCodepage}},
+ // 新細明體-ExtB, PMingLiu-ExtB
+ {L"\x65B0\x7D30\x660E\x9AD4-ExtB", {L"PMingLiu-ExtB", traditionalChineseCodepage}},
+ {L"pmingliu-extb", {L"\x65B0\x7D30\x660E\x9AD4-extb", traditionalChineseCodepage}},
// 細明體, MingLiu
{L"\x7D30\x660E\x9AD4", {L"MingLiu", traditionalChineseCodepage}},
{L"mingliu", {L"\x7D30\x660E\x9AD4", traditionalChineseCodepage}},
+ // 細明體-ExtB, MingLiu-ExtB
+ {L"\x7D30\x660E\x9AD4-ExtB", {L"MingLiu-ExtB", traditionalChineseCodepage}},
+ {L"mingliu-extb", {L"x65B0\x7D30\x660E\x9AD4-extb", traditionalChineseCodepage}},
// 微軟正黑體, Microsoft JhengHei
{L"\x5FAE\x8EDF\x6B63\x9ED1\x9AD4", {L"Microsoft JhengHei", traditionalChineseCodepage}},
{L"microsoft jhengHei", {L"\x5FAE\x8EDF\x6B63\x9ED1\x9AD4", traditionalChineseCodepage}},
@@ -363,8 +372,10 @@ const SimpleFontData* FontCache::getFontDataForCharacters(const Font& font, cons
L"lucida sans unicode",
L"microsoft sans serif",
L"palatino linotype",
- // Four fonts below (and code2000 at the end) are not from MS, but
+ // Six fonts below (and code2000 at the end) are not from MS, but
// once installed, cover a very wide range of characters.
+ L"dejavu serif",
+ L"dejavu sasns",
L"freeserif",
L"freesans",
L"gentium",
diff --git a/WebCore/platform/graphics/chromium/FontUtilsChromiumWin.cpp b/WebCore/platform/graphics/chromium/FontUtilsChromiumWin.cpp
index 324262b..8dba49e 100644
--- a/WebCore/platform/graphics/chromium/FontUtilsChromiumWin.cpp
+++ b/WebCore/platform/graphics/chromium/FontUtilsChromiumWin.cpp
@@ -267,16 +267,27 @@ const UChar* getFallbackFamily(const UChar* characters,
if (script == USCRIPT_COMMON)
script = getScriptBasedOnUnicodeBlock(ucs4);
- // Another lame work-around to cover non-BMP characters.
const UChar* family = getFontFamilyForScript(script, generic);
- if (!family) {
+ // Another lame work-around to cover non-BMP characters.
+ // If the font family for script is not found or the character is
+ // not in BMP (> U+FFFF), we resort to the hard-coded list of
+ // fallback fonts for now.
+ if (!family || ucs4 > 0xFFFF) {
int plane = ucs4 >> 16;
switch (plane) {
case 1:
family = L"code2001";
break;
case 2:
- family = L"simsun-extb";
+ // Use a Traditional Chinese ExtB font if in Traditional Chinese locale.
+ // Otherwise, use a Simplified Chinese ExtB font. Windows Japanese
+ // fonts do support a small subset of ExtB (that are included in JIS X 0213),
+ // but its coverage is rather sparse.
+ // Eventually, this should be controlled by lang/xml:lang.
+ if (icu::Locale::getDefault() == icu::Locale::getTraditionalChinese())
+ family = L"pmingliu-extb";
+ else
+ family = L"simsun-extb";
break;
default:
family = L"lucida sans unicode";
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list