[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
hamaji at chromium.org
hamaji at chromium.org
Wed Dec 22 11:25:58 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 63681cda6429c2d2c436e4f93ac47499e9f279ce
Author: hamaji at chromium.org <hamaji at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jul 23 05:39:21 2010 +0000
2010-07-22 Shinichiro Hamaji <hamaji at chromium.org>
Reviewed by Kent Tamura.
Backslash is transcoded into yen sign even when non japanese font is specified
https://bugs.webkit.org/show_bug.cgi?id=39654
* fast/text/backslash-to-yen-sign-euc.html: Added.
* platform/chromium/test_expectations.txt:
* platform/mac/fast/text/backslash-to-yen-sign-euc-expected.checksum: Added.
* platform/mac/fast/text/backslash-to-yen-sign-euc-expected.png: Added.
* platform/mac/fast/text/backslash-to-yen-sign-euc-expected.txt: Added.
2010-07-22 Shinichiro Hamaji <hamaji at chromium.org>
Reviewed by Kent Tamura.
Backslash is transcoded into yen sign even when non japanese font is specified
https://bugs.webkit.org/show_bug.cgi?id=39654
Test: fast/text/backslash-to-yen-sign-euc.html
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty): Call FontDescriptor::setIsSpecifiedFont.
* platform/graphics/Font.cpp:
(WebCore::Font::Font):
* platform/graphics/FontDescription.h: Added m_isSpecifiedFont and its accessors.
(WebCore::FontDescription::FontDescription):
(WebCore::FontDescription::isSpecifiedFont):
(WebCore::FontDescription::setIsSpecifiedFont):
(WebCore::FontDescription::operator==):
* platform/text/transcoder/FontTranscoder.cpp:
(WebCore::FontTranscoder::converterType): Don't transcode backslashes if a font family is explicitly specified.
(WebCore::FontTranscoder::convert):
(WebCore::FontTranscoder::needsTranscoding):
* platform/text/transcoder/FontTranscoder.h: Change the arguments from AtomicString fontFamily to Font.
* rendering/RenderText.cpp:
(WebCore::RenderText::updateNeedsTranscoding):
(WebCore::RenderText::setTextInternal):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63950 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 0c8b320..d3295b8 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2010-07-22 Shinichiro Hamaji <hamaji at chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ Backslash is transcoded into yen sign even when non japanese font is specified
+ https://bugs.webkit.org/show_bug.cgi?id=39654
+
+ * fast/text/backslash-to-yen-sign-euc.html: Added.
+ * platform/chromium/test_expectations.txt:
+ * platform/mac/fast/text/backslash-to-yen-sign-euc-expected.checksum: Added.
+ * platform/mac/fast/text/backslash-to-yen-sign-euc-expected.png: Added.
+ * platform/mac/fast/text/backslash-to-yen-sign-euc-expected.txt: Added.
+
2010-07-22 Kent Tamura <tkent at chromium.org>
Reviewed by Darin Adler.
diff --git a/LayoutTests/fast/text/backslash-to-yen-sign-euc.html b/LayoutTests/fast/text/backslash-to-yen-sign-euc.html
new file mode 100644
index 0000000..4607a0a
--- /dev/null
+++ b/LayoutTests/fast/text/backslash-to-yen-sign-euc.html
@@ -0,0 +1,102 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+<meta charset="EUC-JP">
+<script>
+
+function test()
+{
+ // [ fontName, expectation, isSystemFont ]
+ var FONT_AND_EXPECTATIONS = [
+ [ null, "yen sign" ],
+ [ "MS PGothic", "yen sign" ],
+ [ "MS Gothic", "yen sign" ],
+ [ "MS PMincho", "yen sign" ],
+ [ "MS Mincho", "yen sign" ],
+ [ "Meiryo", "yen sign" ],
+ [ "£Í£Ó £Ð¥´¥·¥Ã¥¯", "yen sign" ],
+ [ "£Í£Ó ¥´¥·¥Ã¥¯", "yen sign" ],
+ [ "£Í£Ó £ÐÌÀÄ«", "yen sign" ],
+ [ "£Í£Ó ÌÀÄ«", "yen sign" ],
+ [ "¥á¥¤¥ê¥ª", "yen sign" ],
+ [ "Times", "backslash" ],
+ [ "foobar", "backslash" ],
+ [ "*INVALID FONT NAME*", "yen sign" ],
+ [ "serif", "yen sign" ],
+ [ "sans-serif", "yen sign" ],
+ [ "cursive", "yen sign" ],
+ [ "fantasy", "yen sign" ],
+ [ "monospace", "yen sign" ],
+ [ "-webkit-body", "backslash" ],
+ [ "caption", "backslash", true ],
+ [ "icon", "backslash", true ],
+ [ "menu", "backslash", true ],
+ [ "message-box", "backslash", true ],
+ [ "small-caption", "backslash", true ],
+ [ "status-bar", "backslash", true ],
+ [ "-webkit-mini-control", "backslash", true ],
+ [ "-webkit-small-control", "backslash", true ],
+ [ "-webkit-control", "backslash", true ],
+ [ "MS Gothic, Times", "yen sign" ],
+ [ "Times, MS Gothic", "backslash" ],
+ [ "MS Gothic, foobar", "yen sign" ],
+ [ "foobar, MS Gothic", "backslash" ],
+ [ "serif, Times", "yen sign" ],
+ [ "Times, serif", "backslash" ],
+ [ "serif, serif", "yen sign" ],
+ [ "foobar, Times", "backslash" ],
+ [ "Times, foobar", "backslash" ]
+ ];
+
+ for (var i = 0; FONT_AND_EXPECTATIONS[i]; i++) {
+ var fontName = FONT_AND_EXPECTATIONS[i][0];
+ var expectation = FONT_AND_EXPECTATIONS[i][1];
+ var isSystemFont = FONT_AND_EXPECTATIONS[i][2];
+ var parentElement = document.createElement("div");
+
+ var element = document.createElement("span");
+ if (isSystemFont)
+ element.style.font = fontName;
+ else if (fontName)
+ element.style.font = "1em " + fontName;
+
+ if (fontName)
+ text = 'Using font "' + fontName + '". ';
+ else
+ text = 'No font is specified. ';
+ text += 'expected: ' + expectation + ', actual: ' + '\\';
+ element.innerHTML = text;
+
+ // Check inheritance with font property.
+ childElement = document.createElement("span");
+ childElement.style.font = "inherit";
+ childElement.innerText = '\\';
+ element.appendChild(childElement);
+
+ // Check inheritance with font-family property.
+ var childElement = document.createElement("span");
+ childElement.style.fontFamily = "inherit";
+ childElement.innerText = '\\';
+ element.appendChild(childElement);
+
+ parentElement.appendChild(element);
+
+ if (fontName && !isSystemFont) {
+ element = document.createElement("span");
+ element.innerText = '\\';
+ element.style.fontFamily = fontName;
+ parentElement.appendChild(element);
+ }
+
+ document.body.appendChild(parentElement);
+ }
+}
+
+</script>
+</head>
+
+<body onload="test();">
+</body>
+
+</html>
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index 4939a6d..7f7420f 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -3127,3 +3127,6 @@ BUGWK42769 : http/tests/security/401-logout/401-logout.php = TIMEOUT
// Flaky since at least chromium r52834, WebKit r63615.
BUG49970 : platform/chromium/plugins/call-as-function.html = PASS TEXT
+
+// Need rebaseline
+BUGWK24906 : fast/text/backslash-to-yen-sign-euc.html = FAIL
diff --git a/LayoutTests/platform/mac/fast/text/backslash-to-yen-sign-euc-expected.checksum b/LayoutTests/platform/mac/fast/text/backslash-to-yen-sign-euc-expected.checksum
new file mode 100644
index 0000000..a3e3476
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/text/backslash-to-yen-sign-euc-expected.checksum
@@ -0,0 +1 @@
+286a8869d5eb858feeefe72a4d4f5da7
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/text/backslash-to-yen-sign-euc-expected.png b/LayoutTests/platform/mac/fast/text/backslash-to-yen-sign-euc-expected.png
new file mode 100644
index 0000000..0a3a758
Binary files /dev/null and b/LayoutTests/platform/mac/fast/text/backslash-to-yen-sign-euc-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/text/backslash-to-yen-sign-euc-expected.txt b/LayoutTests/platform/mac/fast/text/backslash-to-yen-sign-euc-expected.txt
new file mode 100644
index 0000000..9c1a1fb
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/text/backslash-to-yen-sign-euc-expected.txt
@@ -0,0 +1,469 @@
+layer at (0,0) size 785x729
+ RenderView at (0,0) size 785x600
+layer at (0,0) size 785x729
+ RenderBlock {HTML} at (0,0) size 785x729
+ RenderBody {BODY} at (8,8) size 769x713
+ RenderBlock {DIV} at (0,0) size 769x18
+ RenderInline {SPAN} at (0,0) size 325x18
+ RenderText {#text} at (0,0) size 309x18
+ text run at (0,0) width 309: "No font is specified. expected: yen sign, actual: \x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (309,0) size 8x18
+ text run at (309,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (317,0) size 8x18
+ text run at (317,0) width 8: "\x{A5}"
+ RenderBlock {DIV} at (0,18) size 769x18
+ RenderInline {SPAN} at (0,0) size 366x18
+ RenderText {#text} at (0,0) size 350x18
+ text run at (0,0) width 350: "Using font \"MS PGothic\". expected: yen sign, actual: \x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (350,0) size 8x18
+ text run at (350,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (358,0) size 8x18
+ text run at (358,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (366,0) size 8x18
+ text run at (366,0) width 8: "\x{A5}"
+ RenderBlock {DIV} at (0,36) size 769x18
+ RenderInline {SPAN} at (0,0) size 357x18
+ RenderText {#text} at (0,0) size 341x18
+ text run at (0,0) width 341: "Using font \"MS Gothic\". expected: yen sign, actual: \x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (341,0) size 8x18
+ text run at (341,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (349,0) size 8x18
+ text run at (349,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (357,0) size 8x18
+ text run at (357,0) width 8: "\x{A5}"
+ RenderBlock {DIV} at (0,54) size 769x18
+ RenderInline {SPAN} at (0,0) size 372x18
+ RenderText {#text} at (0,0) size 356x18
+ text run at (0,0) width 356: "Using font \"MS PMincho\". expected: yen sign, actual: \x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (356,0) size 8x18
+ text run at (356,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (364,0) size 8x18
+ text run at (364,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (372,0) size 8x18
+ text run at (372,0) width 8: "\x{A5}"
+ RenderBlock {DIV} at (0,72) size 769x18
+ RenderInline {SPAN} at (0,0) size 363x18
+ RenderText {#text} at (0,0) size 347x18
+ text run at (0,0) width 347: "Using font \"MS Mincho\". expected: yen sign, actual: \x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (347,0) size 8x18
+ text run at (347,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (355,0) size 8x18
+ text run at (355,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (363,0) size 8x18
+ text run at (363,0) width 8: "\x{A5}"
+ RenderBlock {DIV} at (0,90) size 769x18
+ RenderInline {SPAN} at (0,0) size 333x18
+ RenderText {#text} at (0,0) size 317x18
+ text run at (0,0) width 317: "Using font \"Meiryo\". expected: yen sign, actual: \x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (317,0) size 8x18
+ text run at (317,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (325,0) size 8x18
+ text run at (325,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (333,0) size 8x18
+ text run at (333,0) width 8: "\x{A5}"
+ RenderBlock {DIV} at (0,108) size 769x21
+ RenderInline {SPAN} at (0,0) size 403x18
+ RenderText {#text} at (0,3) size 387x18
+ text run at (0,3) width 387: "Using font \"\x{FF2D}\x{FF33} \x{FF30}\x{30B4}\x{30B7}\x{30C3}\x{30AF}\". expected: yen sign, actual: \x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (387,3) size 8x18
+ text run at (387,3) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (395,3) size 8x18
+ text run at (395,3) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (403,3) size 8x18
+ text run at (403,3) width 8: "\x{A5}"
+ RenderBlock {DIV} at (0,129) size 769x21
+ RenderInline {SPAN} at (0,0) size 387x18
+ RenderText {#text} at (0,3) size 371x18
+ text run at (0,3) width 371: "Using font \"\x{FF2D}\x{FF33} \x{30B4}\x{30B7}\x{30C3}\x{30AF}\". expected: yen sign, actual: \x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (371,3) size 8x18
+ text run at (371,3) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (379,3) size 8x18
+ text run at (379,3) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (387,3) size 8x18
+ text run at (387,3) width 8: "\x{A5}"
+ RenderBlock {DIV} at (0,150) size 769x21
+ RenderInline {SPAN} at (0,0) size 371x18
+ RenderText {#text} at (0,3) size 355x18
+ text run at (0,3) width 355: "Using font \"\x{FF2D}\x{FF33} \x{FF30}\x{660E}\x{671D}\". expected: yen sign, actual: \x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (355,3) size 8x18
+ text run at (355,3) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (363,3) size 8x18
+ text run at (363,3) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (371,3) size 8x18
+ text run at (371,3) width 8: "\x{A5}"
+ RenderBlock {DIV} at (0,171) size 769x21
+ RenderInline {SPAN} at (0,0) size 355x18
+ RenderText {#text} at (0,3) size 339x18
+ text run at (0,3) width 339: "Using font \"\x{FF2D}\x{FF33} \x{660E}\x{671D}\". expected: yen sign, actual: \x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (339,3) size 8x18
+ text run at (339,3) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (347,3) size 8x18
+ text run at (347,3) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (355,3) size 8x18
+ text run at (355,3) width 8: "\x{A5}"
+ RenderBlock {DIV} at (0,192) size 769x21
+ RenderInline {SPAN} at (0,0) size 351x18
+ RenderText {#text} at (0,3) size 335x18
+ text run at (0,3) width 335: "Using font \"\x{30E1}\x{30A4}\x{30EA}\x{30AA}\". expected: yen sign, actual: \x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (335,3) size 8x18
+ text run at (335,3) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (343,3) size 8x18
+ text run at (343,3) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (351,3) size 8x18
+ text run at (351,3) width 8: "\x{A5}"
+ RenderBlock {DIV} at (0,213) size 769x18
+ RenderInline {SPAN} at (0,0) size 322x18
+ RenderText {#text} at (0,0) size 314x18
+ text run at (0,0) width 314: "Using font \"Times\". expected: backslash, actual: \\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (314,0) size 4x18
+ text run at (314,0) width 4: "\\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (318,0) size 4x18
+ text run at (318,0) width 4: "\\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (322,0) size 4x18
+ text run at (322,0) width 4: "\\"
+ RenderBlock {DIV} at (0,231) size 769x18
+ RenderInline {SPAN} at (0,0) size 324x18
+ RenderText {#text} at (0,0) size 316x18
+ text run at (0,0) width 316: "Using font \"foobar\". expected: backslash, actual: \\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (316,0) size 4x18
+ text run at (316,0) width 4: "\\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (320,0) size 4x18
+ text run at (320,0) width 4: "\\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (324,0) size 4x18
+ text run at (324,0) width 4: "\\"
+ RenderBlock {DIV} at (0,249) size 769x18
+ RenderInline {SPAN} at (0,0) size 470x18
+ RenderText {#text} at (0,0) size 454x18
+ text run at (0,0) width 454: "Using font \"*INVALID FONT NAME*\". expected: yen sign, actual: \x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (454,0) size 8x18
+ text run at (454,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (462,0) size 8x18
+ text run at (462,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (470,0) size 8x18
+ text run at (470,0) width 8: "\x{A5}"
+ RenderBlock {DIV} at (0,267) size 769x18
+ RenderInline {SPAN} at (0,0) size 314x18
+ RenderText {#text} at (0,0) size 298x18
+ text run at (0,0) width 298: "Using font \"serif\". expected: yen sign, actual: \x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (298,0) size 8x18
+ text run at (298,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (306,0) size 8x18
+ text run at (306,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (314,0) size 8x18
+ text run at (314,0) width 8: "\x{A5}"
+ RenderBlock {DIV} at (0,285) size 769x18
+ RenderInline {SPAN} at (0,0) size 384x18
+ RenderText {#text} at (0,0) size 366x18
+ text run at (0,0) width 366: "Using font \"sans-serif\". expected: yen sign, actual: \x{A5}"
+ RenderInline {SPAN} at (0,0) size 9x18
+ RenderText {#text} at (366,0) size 9x18
+ text run at (366,0) width 9: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 9x18
+ RenderText {#text} at (375,0) size 9x18
+ text run at (375,0) width 9: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 9x18
+ RenderText {#text} at (384,0) size 9x18
+ text run at (384,0) width 9: "\x{A5}"
+ RenderBlock {DIV} at (0,303) size 769x25
+ RenderInline {SPAN} at (0,0) size 339x25
+ RenderText {#text} at (0,0) size 321x25
+ text run at (0,0) width 321: "Using font \"cursive\". expected: yen sign, actual: \x{A5}"
+ RenderInline {SPAN} at (0,0) size 9x25
+ RenderText {#text} at (321,0) size 9x25
+ text run at (321,0) width 9: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 9x25
+ RenderText {#text} at (330,0) size 9x25
+ text run at (330,0) width 9: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 9x25
+ RenderText {#text} at (339,0) size 9x25
+ text run at (339,0) width 9: "\x{A5}"
+ RenderBlock {DIV} at (0,328) size 769x25
+ RenderInline {SPAN} at (0,0) size 382x25
+ RenderText {#text} at (0,0) size 360x25
+ text run at (0,0) width 360: "Using font \"fantasy\". expected: yen sign, actual: \x{A5}"
+ RenderInline {SPAN} at (0,0) size 11x25
+ RenderText {#text} at (360,0) size 11x25
+ text run at (360,0) width 11: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 11x25
+ RenderText {#text} at (371,0) size 11x25
+ text run at (371,0) width 11: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 11x25
+ RenderText {#text} at (382,0) size 11x25
+ text run at (382,0) width 11: "\x{A5}"
+ RenderBlock {DIV} at (0,353) size 769x18
+ RenderInline {SPAN} at (0,0) size 440x15
+ RenderText {#text} at (0,2) size 424x15
+ text run at (0,2) width 424: "Using font \"monospace\". expected: yen sign, actual: \x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x15
+ RenderText {#text} at (424,2) size 8x15
+ text run at (424,2) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x15
+ RenderText {#text} at (432,2) size 8x15
+ text run at (432,2) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x15
+ RenderText {#text} at (440,2) size 8x15
+ text run at (440,2) width 8: "\x{A5}"
+ RenderBlock {DIV} at (0,371) size 769x18
+ RenderInline {SPAN} at (0,0) size 368x18
+ RenderText {#text} at (0,0) size 360x18
+ text run at (0,0) width 360: "Using font \"-webkit-body\". expected: backslash, actual: \\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (360,0) size 4x18
+ text run at (360,0) width 4: "\\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (364,0) size 4x18
+ text run at (364,0) width 4: "\\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (368,0) size 4x18
+ text run at (368,0) width 4: "\\"
+ RenderBlock {DIV} at (0,389) size 769x18
+ RenderInline {SPAN} at (0,0) size 338x16
+ RenderText {#text} at (0,1) size 324x16
+ text run at (0,1) width 324: "Using font \"caption\". expected: backslash, actual: \\"
+ RenderInline {SPAN} at (0,0) size 7x16
+ RenderText {#text} at (324,1) size 7x16
+ text run at (324,1) width 7: "\\"
+ RenderInline {SPAN} at (0,0) size 7x16
+ RenderText {#text} at (331,1) size 7x16
+ text run at (331,1) width 7: "\\"
+ RenderBlock {DIV} at (0,407) size 769x18
+ RenderInline {SPAN} at (0,0) size 318x16
+ RenderText {#text} at (0,1) size 304x16
+ text run at (0,1) width 304: "Using font \"icon\". expected: backslash, actual: \\"
+ RenderInline {SPAN} at (0,0) size 7x16
+ RenderText {#text} at (304,1) size 7x16
+ text run at (304,1) width 7: "\\"
+ RenderInline {SPAN} at (0,0) size 7x16
+ RenderText {#text} at (311,1) size 7x16
+ text run at (311,1) width 7: "\\"
+ RenderBlock {DIV} at (0,425) size 769x18
+ RenderInline {SPAN} at (0,0) size 327x16
+ RenderText {#text} at (0,1) size 313x16
+ text run at (0,1) width 313: "Using font \"menu\". expected: backslash, actual: \\"
+ RenderInline {SPAN} at (0,0) size 7x16
+ RenderText {#text} at (313,1) size 7x16
+ text run at (313,1) width 7: "\\"
+ RenderInline {SPAN} at (0,0) size 7x16
+ RenderText {#text} at (320,1) size 7x16
+ text run at (320,1) width 7: "\\"
+ RenderBlock {DIV} at (0,443) size 769x18
+ RenderInline {SPAN} at (0,0) size 380x16
+ RenderText {#text} at (0,1) size 366x16
+ text run at (0,1) width 366: "Using font \"message-box\". expected: backslash, actual: \\"
+ RenderInline {SPAN} at (0,0) size 7x16
+ RenderText {#text} at (366,1) size 7x16
+ text run at (366,1) width 7: "\\"
+ RenderInline {SPAN} at (0,0) size 7x16
+ RenderText {#text} at (373,1) size 7x16
+ text run at (373,1) width 7: "\\"
+ RenderBlock {DIV} at (0,461) size 769x18
+ RenderInline {SPAN} at (0,0) size 322x13
+ RenderText {#text} at (0,3) size 310x13
+ text run at (0,3) width 310: "Using font \"small-caption\". expected: backslash, actual: \\"
+ RenderInline {SPAN} at (0,0) size 6x13
+ RenderText {#text} at (310,3) size 6x13
+ text run at (310,3) width 6: "\\"
+ RenderInline {SPAN} at (0,0) size 6x13
+ RenderText {#text} at (316,3) size 6x13
+ text run at (316,3) width 6: "\\"
+ RenderBlock {DIV} at (0,479) size 769x18
+ RenderInline {SPAN} at (0,0) size 279x12
+ RenderText {#text} at (0,4) size 267x12
+ text run at (0,4) width 267: "Using font \"status-bar\". expected: backslash, actual: \\"
+ RenderInline {SPAN} at (0,0) size 6x12
+ RenderText {#text} at (267,4) size 6x12
+ text run at (267,4) width 6: "\\"
+ RenderInline {SPAN} at (0,0) size 6x12
+ RenderText {#text} at (273,4) size 6x12
+ text run at (273,4) width 6: "\\"
+ RenderBlock {DIV} at (0,497) size 769x18
+ RenderInline {SPAN} at (0,0) size 303x11
+ RenderText {#text} at (0,5) size 293x11
+ text run at (0,5) width 293: "Using font \"-webkit-mini-control\". expected: backslash, actual: \\"
+ RenderInline {SPAN} at (0,0) size 5x11
+ RenderText {#text} at (293,5) size 5x11
+ text run at (293,5) width 5: "\\"
+ RenderInline {SPAN} at (0,0) size 5x11
+ RenderText {#text} at (298,5) size 5x11
+ text run at (298,5) width 5: "\\"
+ RenderBlock {DIV} at (0,515) size 769x18
+ RenderInline {SPAN} at (0,0) size 371x13
+ RenderText {#text} at (0,3) size 359x13
+ text run at (0,3) width 359: "Using font \"-webkit-small-control\". expected: backslash, actual: \\"
+ RenderInline {SPAN} at (0,0) size 6x13
+ RenderText {#text} at (359,3) size 6x13
+ text run at (359,3) width 6: "\\"
+ RenderInline {SPAN} at (0,0) size 6x13
+ RenderText {#text} at (365,3) size 6x13
+ text run at (365,3) width 6: "\\"
+ RenderBlock {DIV} at (0,533) size 769x18
+ RenderInline {SPAN} at (0,0) size 394x16
+ RenderText {#text} at (0,1) size 380x16
+ text run at (0,1) width 380: "Using font \"-webkit-control\". expected: backslash, actual: \\"
+ RenderInline {SPAN} at (0,0) size 7x16
+ RenderText {#text} at (380,1) size 7x16
+ text run at (380,1) width 7: "\\"
+ RenderInline {SPAN} at (0,0) size 7x16
+ RenderText {#text} at (387,1) size 7x16
+ text run at (387,1) width 7: "\\"
+ RenderBlock {DIV} at (0,551) size 769x18
+ RenderInline {SPAN} at (0,0) size 404x18
+ RenderText {#text} at (0,0) size 388x18
+ text run at (0,0) width 388: "Using font \"MS Gothic, Times\". expected: yen sign, actual: \x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (388,0) size 8x18
+ text run at (388,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (396,0) size 8x18
+ text run at (396,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (404,0) size 8x18
+ text run at (404,0) width 8: "\x{A5}"
+ RenderBlock {DIV} at (0,569) size 769x18
+ RenderInline {SPAN} at (0,0) size 400x18
+ RenderText {#text} at (0,0) size 392x18
+ text run at (0,0) width 392: "Using font \"Times, MS Gothic\". expected: backslash, actual: \\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (392,0) size 4x18
+ text run at (392,0) width 4: "\\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (396,0) size 4x18
+ text run at (396,0) width 4: "\\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (400,0) size 4x18
+ text run at (400,0) width 4: "\\"
+ RenderBlock {DIV} at (0,587) size 769x18
+ RenderInline {SPAN} at (0,0) size 406x18
+ RenderText {#text} at (0,0) size 390x18
+ text run at (0,0) width 390: "Using font \"MS Gothic, foobar\". expected: yen sign, actual: \x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (390,0) size 8x18
+ text run at (390,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (398,0) size 8x18
+ text run at (398,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (406,0) size 8x18
+ text run at (406,0) width 8: "\x{A5}"
+ RenderBlock {DIV} at (0,605) size 769x18
+ RenderInline {SPAN} at (0,0) size 402x18
+ RenderText {#text} at (0,0) size 394x18
+ text run at (0,0) width 394: "Using font \"foobar, MS Gothic\". expected: backslash, actual: \\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (394,0) size 4x18
+ text run at (394,0) width 4: "\\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (398,0) size 4x18
+ text run at (398,0) width 4: "\\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (402,0) size 4x18
+ text run at (402,0) width 4: "\\"
+ RenderBlock {DIV} at (0,623) size 769x18
+ RenderInline {SPAN} at (0,0) size 361x18
+ RenderText {#text} at (0,0) size 345x18
+ text run at (0,0) width 345: "Using font \"serif, Times\". expected: yen sign, actual: \x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (345,0) size 8x18
+ text run at (345,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (353,0) size 8x18
+ text run at (353,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (361,0) size 8x18
+ text run at (361,0) width 8: "\x{A5}"
+ RenderBlock {DIV} at (0,641) size 769x18
+ RenderInline {SPAN} at (0,0) size 357x18
+ RenderText {#text} at (0,0) size 349x18
+ text run at (0,0) width 349: "Using font \"Times, serif\". expected: backslash, actual: \\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (349,0) size 4x18
+ text run at (349,0) width 4: "\\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (353,0) size 4x18
+ text run at (353,0) width 4: "\\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (357,0) size 4x18
+ text run at (357,0) width 4: "\\"
+ RenderBlock {DIV} at (0,659) size 769x18
+ RenderInline {SPAN} at (0,0) size 349x18
+ RenderText {#text} at (0,0) size 333x18
+ text run at (0,0) width 333: "Using font \"serif, serif\". expected: yen sign, actual: \x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (333,0) size 8x18
+ text run at (333,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (341,0) size 8x18
+ text run at (341,0) width 8: "\x{A5}"
+ RenderInline {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (349,0) size 8x18
+ text run at (349,0) width 8: "\x{A5}"
+ RenderBlock {DIV} at (0,677) size 769x18
+ RenderInline {SPAN} at (0,0) size 371x18
+ RenderText {#text} at (0,0) size 363x18
+ text run at (0,0) width 363: "Using font \"foobar, Times\". expected: backslash, actual: \\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (363,0) size 4x18
+ text run at (363,0) width 4: "\\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (367,0) size 4x18
+ text run at (367,0) width 4: "\\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (371,0) size 4x18
+ text run at (371,0) width 4: "\\"
+ RenderBlock {DIV} at (0,695) size 769x18
+ RenderInline {SPAN} at (0,0) size 371x18
+ RenderText {#text} at (0,0) size 363x18
+ text run at (0,0) width 363: "Using font \"Times, foobar\". expected: backslash, actual: \\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (363,0) size 4x18
+ text run at (363,0) width 4: "\\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (367,0) size 4x18
+ text run at (367,0) width 4: "\\"
+ RenderInline {SPAN} at (0,0) size 4x18
+ RenderText {#text} at (371,0) size 4x18
+ text run at (371,0) width 4: "\\"
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index 7d95646..014a51f 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -954,4 +954,3 @@ fast/dom/webtiming.html
fast/dom/webtiming-navigate-within-document.html
http/tests/misc/webtiming-one-redirect.php
http/tests/misc/webtiming-two-redirects.php
-
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2a41557..4e8aead 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,30 @@
+2010-07-22 Shinichiro Hamaji <hamaji at chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ Backslash is transcoded into yen sign even when non japanese font is specified
+ https://bugs.webkit.org/show_bug.cgi?id=39654
+
+ Test: fast/text/backslash-to-yen-sign-euc.html
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty): Call FontDescriptor::setIsSpecifiedFont.
+ * platform/graphics/Font.cpp:
+ (WebCore::Font::Font):
+ * platform/graphics/FontDescription.h: Added m_isSpecifiedFont and its accessors.
+ (WebCore::FontDescription::FontDescription):
+ (WebCore::FontDescription::isSpecifiedFont):
+ (WebCore::FontDescription::setIsSpecifiedFont):
+ (WebCore::FontDescription::operator==):
+ * platform/text/transcoder/FontTranscoder.cpp:
+ (WebCore::FontTranscoder::converterType): Don't transcode backslashes if a font family is explicitly specified.
+ (WebCore::FontTranscoder::convert):
+ (WebCore::FontTranscoder::needsTranscoding):
+ * platform/text/transcoder/FontTranscoder.h: Change the arguments from AtomicString fontFamily to Font.
+ * rendering/RenderText.cpp:
+ (WebCore::RenderText::updateNeedsTranscoding):
+ (WebCore::RenderText::setTextInternal):
+
2010-07-22 Jon Honeycutt <jhoneycutt at apple.com>
Windows build fix.
diff --git a/WebCore/css/CSSStyleSelector.cpp b/WebCore/css/CSSStyleSelector.cpp
index 0184d15..e9b3b80 100644
--- a/WebCore/css/CSSStyleSelector.cpp
+++ b/WebCore/css/CSSStyleSelector.cpp
@@ -4304,6 +4304,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
FontDescription fontDescription = m_style->fontDescription();
fontDescription.setGenericFamily(parentFontDescription.genericFamily());
fontDescription.setFamily(parentFontDescription.firstFamily());
+ fontDescription.setIsSpecifiedFont(parentFontDescription.isSpecifiedFont());
if (m_style->setFontDescription(fontDescription))
m_fontDirty = true;
return;
@@ -4377,6 +4378,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
firstFamily.setFamily(face);
firstFamily.appendFamily(0); // Remove any inherited family-fallback list.
currFamily = &firstFamily;
+ fontDescription.setIsSpecifiedFont(fontDescription.genericFamily() == FontDescription::NoFamily);
} else {
RefPtr<SharedFontFamily> newFamily = SharedFontFamily::create();
newFamily->setFamily(face);
@@ -4621,6 +4623,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
FontDescription fontDescription;
RenderTheme::defaultTheme()->systemFont(primitiveValue->getIdent(), fontDescription);
+ fontDescription.setIsSpecifiedFont(true);
// Double-check and see if the theme did anything. If not, don't bother updating the font.
if (fontDescription.isAbsoluteSize()) {
diff --git a/WebCore/platform/graphics/Font.cpp b/WebCore/platform/graphics/Font.cpp
index 61f5707..0e93d4f 100644
--- a/WebCore/platform/graphics/Font.cpp
+++ b/WebCore/platform/graphics/Font.cpp
@@ -68,7 +68,7 @@ Font::Font(const FontDescription& fd, short letterSpacing, short wordSpacing)
, m_letterSpacing(letterSpacing)
, m_wordSpacing(wordSpacing)
, m_isPlatformFont(false)
- , m_needsTranscoding(fontTranscoder().needsTranscoding(family().family().string()))
+ , m_needsTranscoding(fontTranscoder().needsTranscoding(fd))
{
}
@@ -77,10 +77,10 @@ Font::Font(const FontPlatformData& fontData, bool isPrinterFont, FontSmoothingMo
, m_letterSpacing(0)
, m_wordSpacing(0)
, m_isPlatformFont(true)
- , m_needsTranscoding(fontTranscoder().needsTranscoding(family().family().string()))
{
m_fontDescription.setUsePrinterFont(isPrinterFont);
m_fontDescription.setFontSmoothing(fontSmoothingMode);
+ m_needsTranscoding = fontTranscoder().needsTranscoding(fontDescription());
m_fontList->setPlatformFont(fontData);
}
@@ -90,7 +90,7 @@ Font::Font(const Font& other)
, m_letterSpacing(other.m_letterSpacing)
, m_wordSpacing(other.m_wordSpacing)
, m_isPlatformFont(other.m_isPlatformFont)
- , m_needsTranscoding(fontTranscoder().needsTranscoding(family().family().string()))
+ , m_needsTranscoding(fontTranscoder().needsTranscoding(other.m_fontDescription))
{
}
diff --git a/WebCore/platform/graphics/FontDescription.h b/WebCore/platform/graphics/FontDescription.h
index fc63db9..86a4349 100644
--- a/WebCore/platform/graphics/FontDescription.h
+++ b/WebCore/platform/graphics/FontDescription.h
@@ -65,6 +65,7 @@ public:
, m_keywordSize(0)
, m_fontSmoothing(AutoSmoothing)
, m_textRendering(AutoTextRendering)
+ , m_isSpecifiedFont(false)
{
}
@@ -92,6 +93,7 @@ public:
TextRenderingMode textRenderingMode() const { return static_cast<TextRenderingMode>(m_textRendering); }
FontTraitsMask traitsMask() const;
+ bool isSpecifiedFont() const { return m_isSpecifiedFont; }
void setFamily(const FontFamily& family) { m_familyList = family; }
void setComputedSize(float s) { m_computedSize = s; }
@@ -106,6 +108,7 @@ public:
void setKeywordSize(unsigned s) { m_keywordSize = s; }
void setFontSmoothing(FontSmoothingMode smoothing) { m_fontSmoothing = smoothing; }
void setTextRenderingMode(TextRenderingMode rendering) { m_textRendering = rendering; }
+ void setIsSpecifiedFont(bool isSpecifiedFont) { m_isSpecifiedFont = isSpecifiedFont; }
private:
FontFamily m_familyList; // The list of font families to be used.
@@ -130,6 +133,7 @@ private:
unsigned m_fontSmoothing : 2; // FontSmoothingMode
unsigned m_textRendering : 2; // TextRenderingMode
+ bool m_isSpecifiedFont : 1; // True if a web page specifies a non-generic font family as the first font family.
};
inline bool FontDescription::operator==(const FontDescription& other) const
@@ -146,7 +150,8 @@ inline bool FontDescription::operator==(const FontDescription& other) const
&& m_renderingMode == other.m_renderingMode
&& m_keywordSize == other.m_keywordSize
&& m_fontSmoothing == other.m_fontSmoothing
- && m_textRendering == other.m_textRendering;
+ && m_textRendering == other.m_textRendering
+ && m_isSpecifiedFont == other.m_isSpecifiedFont;
}
}
diff --git a/WebCore/platform/text/transcoder/FontTranscoder.cpp b/WebCore/platform/text/transcoder/FontTranscoder.cpp
index 12678e8..8e2f33f 100644
--- a/WebCore/platform/text/transcoder/FontTranscoder.cpp
+++ b/WebCore/platform/text/transcoder/FontTranscoder.cpp
@@ -32,6 +32,7 @@
#include "FontTranscoder.h"
#include "CharacterNames.h"
+#include "FontDescription.h"
#include "TextEncoding.h"
namespace WebCore {
@@ -59,8 +60,9 @@ FontTranscoder::FontTranscoder()
m_converterTypes.add(AtomicString(unicodeNameMeiryo, sizeof(unicodeNameMeiryo) / sizeof(UChar)), BackslashToYenSign);
}
-FontTranscoder::ConverterType FontTranscoder::converterType(const AtomicString& fontFamily, const TextEncoding* encoding) const
+FontTranscoder::ConverterType FontTranscoder::converterType(const FontDescription& fontDescription, const TextEncoding* encoding) const
{
+ const AtomicString& fontFamily = fontDescription.family().family().string();
if (!fontFamily.isNull()) {
HashMap<AtomicString, ConverterType>::const_iterator found = m_converterTypes.find(fontFamily);
if (found != m_converterTypes.end())
@@ -68,17 +70,16 @@ FontTranscoder::ConverterType FontTranscoder::converterType(const AtomicString&
}
// IE's default fonts for Japanese encodings change backslashes into yen signs.
- // FIXME: We don't need transcoding when the document explicitly
- // specifies a font which doesn't change backslashes into yen signs.
- if (encoding && encoding->backslashAsCurrencySymbol() != '\\')
+ // We emulate this behavior only when no font is explicitly specified.
+ if (encoding && encoding->backslashAsCurrencySymbol() != '\\' && !fontDescription.isSpecifiedFont())
return BackslashToYenSign;
return NoConversion;
}
-void FontTranscoder::convert(String& text, const AtomicString& fontFamily, const TextEncoding* encoding) const
+void FontTranscoder::convert(String& text, const FontDescription& fontDescription, const TextEncoding* encoding) const
{
- switch (converterType(fontFamily, encoding)) {
+ switch (converterType(fontDescription, encoding)) {
case BackslashToYenSign: {
// FIXME: TextEncoding.h has similar code. We need to factor them out.
text.replace('\\', yenSign);
@@ -90,9 +91,9 @@ void FontTranscoder::convert(String& text, const AtomicString& fontFamily, const
}
}
-bool FontTranscoder::needsTranscoding(const AtomicString& fontFamily, const TextEncoding* encoding) const
+bool FontTranscoder::needsTranscoding(const FontDescription& fontDescription, const TextEncoding* encoding) const
{
- ConverterType type = converterType(fontFamily, encoding);
+ ConverterType type = converterType(fontDescription, encoding);
return type != NoConversion;
}
diff --git a/WebCore/platform/text/transcoder/FontTranscoder.h b/WebCore/platform/text/transcoder/FontTranscoder.h
index f013453..1fdc936 100644
--- a/WebCore/platform/text/transcoder/FontTranscoder.h
+++ b/WebCore/platform/text/transcoder/FontTranscoder.h
@@ -37,12 +37,13 @@
namespace WebCore {
+class FontDescription;
class TextEncoding;
class FontTranscoder : public Noncopyable {
public:
- void convert(String& text, const AtomicString& fontFamily, const TextEncoding* = 0) const;
- bool needsTranscoding(const AtomicString& fontFamily, const TextEncoding* = 0) const;
+ void convert(String& text, const FontDescription&, const TextEncoding* = 0) const;
+ bool needsTranscoding(const FontDescription&, const TextEncoding* = 0) const;
private:
FontTranscoder();
@@ -52,7 +53,7 @@ private:
NoConversion, BackslashToYenSign,
};
- ConverterType converterType(const AtomicString& fontFamily, const TextEncoding*) const;
+ ConverterType converterType(const FontDescription&, const TextEncoding*) const;
HashMap<AtomicString, ConverterType> m_converterTypes;
diff --git a/WebCore/rendering/RenderText.cpp b/WebCore/rendering/RenderText.cpp
index c70ac58..bd050d8 100644
--- a/WebCore/rendering/RenderText.cpp
+++ b/WebCore/rendering/RenderText.cpp
@@ -140,9 +140,8 @@ bool RenderText::isWordBreak() const
void RenderText::updateNeedsTranscoding()
{
- const AtomicString& fontFamily = style()->font().family().family();
const TextEncoding* encoding = document()->decoder() ? &document()->decoder()->encoding() : 0;
- m_needsTranscoding = fontTranscoder().needsTranscoding(fontFamily, encoding);
+ m_needsTranscoding = fontTranscoder().needsTranscoding(style()->font().fontDescription(), encoding);
}
void RenderText::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
@@ -1044,9 +1043,8 @@ void RenderText::setTextInternal(PassRefPtr<StringImpl> text)
ASSERT(text);
m_text = text;
if (m_needsTranscoding) {
- const AtomicString& fontFamily = style()->font().family().family();
const TextEncoding* encoding = document()->decoder() ? &document()->decoder()->encoding() : 0;
- fontTranscoder().convert(m_text, fontFamily, encoding);
+ fontTranscoder().convert(m_text, style()->font().fontDescription(), encoding);
}
ASSERT(m_text);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list