Title: [133550] trunk
- Revision
- 133550
- Author
- [email protected]
- Date
- 2012-11-05 19:04:17 -0800 (Mon, 05 Nov 2012)
Log Message
[Chromium] Unicode combining diacritical aren't always combined on Linux
https://bugs.webkit.org/show_bug.cgi?id=101009
Reviewed by Kent Tamura.
Source/WebCore:
Add a space character to harfbuzzBuffer as pre-context. This will prevent
harfbuzz from inserting dotted-circle.
Test: fast/text/international/combining-marks-position.html
* platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::shapeHarfBuzzRuns):
LayoutTests:
Add a test that checks whether combining marks are combined with base characters.
* fast/text/international/combining-marks-position-expected.txt: Added.
* fast/text/international/combining-marks-position.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (133549 => 133550)
--- trunk/LayoutTests/ChangeLog 2012-11-06 02:18:32 UTC (rev 133549)
+++ trunk/LayoutTests/ChangeLog 2012-11-06 03:04:17 UTC (rev 133550)
@@ -1,3 +1,15 @@
+2012-11-05 Kenichi Ishibashi <[email protected]>
+
+ [Chromium] Unicode combining diacritical aren't always combined on Linux
+ https://bugs.webkit.org/show_bug.cgi?id=101009
+
+ Reviewed by Kent Tamura.
+
+ Add a test that checks whether combining marks are combined with base characters.
+
+ * fast/text/international/combining-marks-position-expected.txt: Added.
+ * fast/text/international/combining-marks-position.html: Added.
+
2012-11-05 Filip Pizlo <[email protected]>
Prototype chain caching should check that the path from the base object to the slot base involves prototype hops only
Added: trunk/LayoutTests/fast/text/international/combining-marks-position-expected.txt (0 => 133550)
--- trunk/LayoutTests/fast/text/international/combining-marks-position-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/text/international/combining-marks-position-expected.txt 2012-11-06 03:04:17 UTC (rev 133550)
@@ -0,0 +1,8 @@
+This test ensures that combining marks apper over the previous (or next) character by comparing the length of words (one has marks, and the other doesn't have marks).
+
+test проверка
+tèst провѐрка
+خانه
+خانهٔ
+PASS. The length of targets and references are the same.
+
Added: trunk/LayoutTests/fast/text/international/combining-marks-position.html (0 => 133550)
--- trunk/LayoutTests/fast/text/international/combining-marks-position.html (rev 0)
+++ trunk/LayoutTests/fast/text/international/combining-marks-position.html 2012-11-06 03:04:17 UTC (rev 133550)
@@ -0,0 +1,49 @@
+<html>
+<head>
+<meta charset="utf-8" />
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
+</head>
+<body>
+<p>
+This test ensures that combining marks apper over the previous (or next) character by comparing the length of
+words (one has marks, and the other doesn't have marks).
+</p>
+
+<div style="font-family: arial;">
+<span id="reference1">test проверка</span>
+</div>
+<div style="font-family: arial;">
+<span id="target1">tèst провѐрка</span>
+</div>
+
+<div>
+<span id="reference2">خانه</span>
+</div>
+<div>
+<span id="target2">خانهٔ</span>
+</div>
+
+<div id="result"></div>
+
+<script>
+var reference1 = document.getElementById('reference1');
+var target1 = document.getElementById('target1');
+var reference2 = document.getElementById('reference2');
+var target2 = document.getElementById('target2');
+var result = document.getElementById('result');
+
+if (reference1.offsetWidth == target1.offsetWidth && reference2.offsetWidth == target2.offsetWidth)
+ result.innerHTML = 'PASS. The length of targets and references are the same.<br />'
+else
+ result.innerHTML = 'FAIL<br />' +
+ 'reference1.offsetWidth = ' + reference1.offsetWidth + '<br />' +
+ 'target1.offsetWidth = ' + target1.offsetWidth + '<br />' +
+ 'reference2.offsetWidth = ' + reference2.offsetWidth + '<br />' +
+ 'target2.offsetWidth = ' + target2.offsetWidth + '<br />'
+</script>
+
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (133549 => 133550)
--- trunk/Source/WebCore/ChangeLog 2012-11-06 02:18:32 UTC (rev 133549)
+++ trunk/Source/WebCore/ChangeLog 2012-11-06 03:04:17 UTC (rev 133550)
@@ -1,3 +1,18 @@
+2012-11-05 Kenichi Ishibashi <[email protected]>
+
+ [Chromium] Unicode combining diacritical aren't always combined on Linux
+ https://bugs.webkit.org/show_bug.cgi?id=101009
+
+ Reviewed by Kent Tamura.
+
+ Add a space character to harfbuzzBuffer as pre-context. This will prevent
+ harfbuzz from inserting dotted-circle.
+
+ Test: fast/text/international/combining-marks-position.html
+
+ * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
+ (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns):
+
2012-11-05 Shinya Kawanaka <[email protected]>
LayoutTest fast/dom/shadow/shadowroot-type.html is failing on Windows
Modified: trunk/Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp (133549 => 133550)
--- trunk/Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp 2012-11-06 02:18:32 UTC (rev 133549)
+++ trunk/Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp 2012-11-06 03:04:17 UTC (rev 133550)
@@ -322,6 +322,11 @@
HarfBuzzRun* currentRun = m_harfbuzzRuns[runIndex].get();
const SimpleFontData* currentFontData = currentRun->fontData();
+ // Add a space as pre-context to the buffer. This prevents showing dotted-circle
+ // for combining marks at the beginning of runs.
+ static const uint16_t preContext = ' ';
+ hb_buffer_add_utf16(harfbuzzBuffer.get(), &preContext, 1, 1, 0);
+
if (m_font->isSmallCaps() && u_islower(m_normalizedBuffer[currentRun->startIndex()])) {
String upperText = String(m_normalizedBuffer.get() + currentRun->startIndex(), currentRun->numCharacters());
upperText.makeUpper();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes