[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
simonjam at chromium.org
simonjam at chromium.org
Sun Feb 20 23:51:25 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 7b4c22bad5f7ddb2bebb867d11ef5e0e842c2f0f
Author: simonjam at chromium.org <simonjam at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jan 25 23:07:06 2011 +0000
2011-01-25 James Simonsen <simonjam at chromium.org>
Reviewed by Tony Chang.
[Chromium] Support small caps in complex text on linux
https://bugs.webkit.org/show_bug.cgi?id=53051
* platform/chromium-linux/fast/text/atsui-multiple-renderers-expected.checksum: Added.
* platform/chromium-linux/fast/text/atsui-multiple-renderers-expected.png: Added.
* platform/chromium-linux/fast/text/atsui-multiple-renderers-expected.txt: Added.
* platform/chromium-linux/fast/text/atsui-small-caps-punctuation-size-expected.checksum: Added.
* platform/chromium-linux/fast/text/atsui-small-caps-punctuation-size-expected.png: Added.
* platform/chromium/test_expectations.txt: Re-enable 2 tests on linux.
2011-01-25 James Simonsen <simonjam at chromium.org>
Reviewed by Tony Chang.
[Chromium] Support small caps in complex text on linux
https://bugs.webkit.org/show_bug.cgi?id=53051
* platform/graphics/chromium/ComplexTextControllerLinux.cpp:
(WebCore::ComplexTextController::nextScriptRun): Break runs at small caps boundaries.
(WebCore::ComplexTextController::setupFontForScriptRun): Setup small caps font data if needed.
* platform/graphics/chromium/ComplexTextControllerLinux.h: Store small caps text in separate string.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 6d8fb8b..c8cfe18 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2011-01-25 James Simonsen <simonjam at chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [Chromium] Support small caps in complex text on linux
+ https://bugs.webkit.org/show_bug.cgi?id=53051
+
+ * platform/chromium-linux/fast/text/atsui-multiple-renderers-expected.checksum: Added.
+ * platform/chromium-linux/fast/text/atsui-multiple-renderers-expected.png: Added.
+ * platform/chromium-linux/fast/text/atsui-multiple-renderers-expected.txt: Added.
+ * platform/chromium-linux/fast/text/atsui-small-caps-punctuation-size-expected.checksum: Added.
+ * platform/chromium-linux/fast/text/atsui-small-caps-punctuation-size-expected.png: Added.
+ * platform/chromium/test_expectations.txt: Re-enable 2 tests on linux.
+
2011-01-25 Jer Noble <jer.noble at apple.com>
Unreviewed build fix: add failing test to gtk/Skipped.
diff --git a/LayoutTests/platform/chromium-linux/fast/text/atsui-multiple-renderers-expected.checksum b/LayoutTests/platform/chromium-linux/fast/text/atsui-multiple-renderers-expected.checksum
new file mode 100644
index 0000000..92075bd
--- /dev/null
+++ b/LayoutTests/platform/chromium-linux/fast/text/atsui-multiple-renderers-expected.checksum
@@ -0,0 +1 @@
+37a781c56032c137f940246becaa431f
\ No newline at end of file
diff --git a/LayoutTests/platform/chromium-linux/fast/text/atsui-multiple-renderers-expected.png b/LayoutTests/platform/chromium-linux/fast/text/atsui-multiple-renderers-expected.png
new file mode 100644
index 0000000..d25d45c
Binary files /dev/null and b/LayoutTests/platform/chromium-linux/fast/text/atsui-multiple-renderers-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux/fast/text/atsui-multiple-renderers-expected.txt b/LayoutTests/platform/chromium-linux/fast/text/atsui-multiple-renderers-expected.txt
new file mode 100644
index 0000000..37bc420
--- /dev/null
+++ b/LayoutTests/platform/chromium-linux/fast/text/atsui-multiple-renderers-expected.txt
@@ -0,0 +1,101 @@
+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 784x576
+ RenderBlock {P} at (0,0) size 784x40
+ RenderText {#text} at (0,0) size 99x19
+ text run at (0,0) width 99: "This is a test for "
+ RenderInline {I} at (0,0) size 756x39
+ RenderText {#text} at (99,0) size 756x39
+ text run at (99,0) width 657: "http://bugzilla.opendarwin.org/show_bug.cgi?id=6139 ATSUI code path should implement small caps,"
+ text run at (0,20) width 412: "synthetic bold and oblique and correct metrics for fallback fonts"
+ RenderText {#text} at (412,20) size 4x19
+ text run at (412,20) width 4: "."
+ RenderBlock {HR} at (0,56) size 784x2 [border: (1px inset #000000)]
+ RenderBlock {P} at (0,74) size 784x20
+ RenderText {#text} at (0,0) size 571x19
+ text run at (0,0) width 571: "The two columns should be identical except for the accent over the e and the umlaut over the u."
+ RenderTable {TABLE} at (0,110) size 229x133 [border: none]
+ RenderTableSection {TBODY} at (0,0) size 228x132
+ RenderTableRow {TR} at (0,0) size 228x26
+ RenderTableCell {TD} at (0,0) size 114x26 [border: (1px solid #008000)] [r=0 c=0 rs=1 cs=1]
+ RenderText {#text} at (2,2) size 56x22
+ text run at (2,2) width 56: "Lore\x{300}m "
+ RenderInline {SPAN} at (0,0) size 47x22
+ RenderText {#text} at (58,2) size 47x22
+ text run at (58,2) width 47: "ipsu\x{308}m"
+ RenderText {#text} at (0,0) size 0x0
+ RenderTableCell {TD} at (114,0) size 114x26 [border: (1px solid #008000)] [r=0 c=1 rs=1 cs=1]
+ RenderText {#text} at (2,2) size 56x22
+ text run at (2,2) width 56: "Lorem "
+ RenderInline {SPAN} at (0,0) size 47x22
+ RenderText {#text} at (58,2) size 47x22
+ text run at (58,2) width 47: "ipsum"
+ RenderText {#text} at (0,0) size 0x0
+ RenderTableRow {TR} at (0,26) size 228x27
+ RenderTableCell {TD} at (0,26) size 114x27 [border: (1px solid #008000)] [r=1 c=0 rs=1 cs=1]
+ RenderText {#text} at (2,2) size 61x23
+ text run at (2,2) width 61: "Lore\x{300}m "
+ RenderInline {SPAN} at (0,0) size 48x23
+ RenderText {#text} at (63,2) size 48x23
+ text run at (63,2) width 48: "ipsu\x{308}m"
+ RenderText {#text} at (0,0) size 0x0
+ RenderTableCell {TD} at (114,26) size 114x27 [border: (1px solid #008000)] [r=1 c=1 rs=1 cs=1]
+ RenderText {#text} at (2,2) size 61x23
+ text run at (2,2) width 61: "Lorem "
+ RenderInline {SPAN} at (0,0) size 48x23
+ RenderText {#text} at (63,2) size 48x23
+ text run at (63,2) width 48: "ipsum"
+ RenderText {#text} at (0,0) size 0x0
+ RenderTableRow {TR} at (0,53) size 228x26
+ RenderTableCell {TD} at (0,53) size 114x26 [border: (1px solid #008000)] [r=2 c=0 rs=1 cs=1]
+ RenderText {#text} at (2,2) size 57x22
+ text run at (2,2) width 57: "Lore\x{300}m "
+ RenderInline {SPAN} at (0,0) size 48x22
+ RenderText {#text} at (59,2) size 48x22
+ text run at (59,2) width 48: "ipsu\x{308}m"
+ RenderText {#text} at (0,0) size 0x0
+ RenderTableCell {TD} at (114,53) size 114x26 [border: (1px solid #008000)] [r=2 c=1 rs=1 cs=1]
+ RenderText {#text} at (2,2) size 57x22
+ text run at (2,2) width 57: "Lorem "
+ RenderInline {SPAN} at (0,0) size 48x22
+ RenderText {#text} at (59,2) size 48x22
+ text run at (59,2) width 48: "ipsum"
+ RenderText {#text} at (0,0) size 0x0
+ RenderTableRow {TR} at (0,79) size 228x27
+ RenderTableCell {TD} at (0,79) size 114x27 [border: (1px solid #008000)] [r=3 c=0 rs=1 cs=1]
+ RenderText {#text} at (2,2) size 60x23
+ text run at (2,2) width 60: "Lore\x{300}m "
+ RenderInline {SPAN} at (0,0) size 51x23
+ RenderText {#text} at (62,2) size 51x23
+ text run at (62,2) width 51: "ipsu\x{308}m"
+ RenderText {#text} at (0,0) size 0x0
+ RenderTableCell {TD} at (114,79) size 114x27 [border: (1px solid #008000)] [r=3 c=1 rs=1 cs=1]
+ RenderText {#text} at (2,2) size 60x23
+ text run at (2,2) width 60: "Lorem "
+ RenderInline {SPAN} at (0,0) size 51x23
+ RenderText {#text} at (62,2) size 51x23
+ text run at (62,2) width 51: "ipsum"
+ RenderText {#text} at (0,0) size 0x0
+ RenderTableRow {TR} at (0,106) size 228x26
+ RenderTableCell {TD} at (0,106) size 114x26 [border: (1px solid #008000)] [r=4 c=0 rs=1 cs=1]
+ RenderText {#text} at (2,2) size 97x22
+ text run at (2,2) width 97: "Lore\x{300}m ipsu\x{308}m"
+ RenderTableCell {TD} at (114,106) size 114x26 [border: (1px solid #008000)] [r=4 c=1 rs=1 cs=1]
+ RenderText {#text} at (2,2) size 97x22
+ text run at (2,2) width 97: "Lorem ipsum"
+ RenderBlock {HR} at (0,251) size 784x2 [border: (1px inset #000000)]
+ RenderBlock {P} at (0,269) size 784x20
+ RenderText {#text} at (0,0) size 257x19
+ text run at (0,0) width 257: "The following two lines should be identical."
+ RenderBlock {P} at (0,305) size 784x21
+ RenderInline {SPAN} at (0,0) size 362x22 [border: (1px solid #008000)]
+ RenderText {#text} at (1,0) size 360x20
+ text run at (1,0) width 360: "\x{E01}\x{E02}\x{E03}\x{E04}\x{E05}\x{E06}\x{E07}\x{E08}\x{E01}\x{E02}\x{E03}\x{E04}\x{E05}\x{E06}\x{E07}\x{E08}\x{E01}\x{E02}\x{E03}\x{E04}\x{E05}\x{E06}\x{E07}\x{E08}\x{E01}\x{E02}\x{E03}\x{E04}\x{E05}\x{E06}\x{E07}\x{E08}"
+ RenderText {#text} at (0,0) size 0x0
+ RenderBlock {P} at (0,342) size 784x21
+ RenderInline {SPAN} at (0,0) size 362x22 [border: (1px solid #008000)]
+ RenderText {#text} at (1,0) size 360x20
+ text run at (1,0) width 360: "\x{E01}\x{E02}\x{E03}\x{E04}\x{E05}\x{E06}\x{E07}\x{E08}\x{E01}\x{E02}\x{E03}\x{E04}\x{E05}\x{E06}\x{E07}\x{E08}\x{E01}\x{E02}\x{E03}\x{E04}\x{E05}\x{E06}\x{E07}\x{E08}\x{E01}\x{E02}\x{E03}\x{E04}\x{E05}\x{E06}\x{E07}\x{E08}"
+ RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/chromium-linux/fast/text/atsui-small-caps-punctuation-size-expected.checksum b/LayoutTests/platform/chromium-linux/fast/text/atsui-small-caps-punctuation-size-expected.checksum
new file mode 100644
index 0000000..66912f6
--- /dev/null
+++ b/LayoutTests/platform/chromium-linux/fast/text/atsui-small-caps-punctuation-size-expected.checksum
@@ -0,0 +1 @@
+6027730f5556cc136498e9f6ad980740
\ No newline at end of file
diff --git a/LayoutTests/platform/chromium-linux/fast/text/atsui-small-caps-punctuation-size-expected.png b/LayoutTests/platform/chromium-linux/fast/text/atsui-small-caps-punctuation-size-expected.png
new file mode 100644
index 0000000..7ad7213
Binary files /dev/null and b/LayoutTests/platform/chromium-linux/fast/text/atsui-small-caps-punctuation-size-expected.png differ
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index 8e40545..0d9f7fc 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -551,7 +551,7 @@ BUGCR8941 WIN : http/tests/xmlhttprequest/web-apps/012.html = FAIL
// Mostly this is because of international text rendering differences.
// Incrorect results, in incorrect international font metrics.
-BUGCR20521 LINUX WIN : fast/text/atsui-multiple-renderers.html = FAIL
+BUGCR20521 WIN : fast/text/atsui-multiple-renderers.html = FAIL
BUGCR20521 LINUX WIN : fast/text/atsui-pointtooffset-calls-cg.html = FAIL TIMEOUT
BUGCR20521 LINUX WIN : fast/text/atsui-rtl-override-selection.html = FAIL
@@ -1111,7 +1111,6 @@ BUGCR10342 LINUX MAC : fast/loader/file-URL-with-port-number.html = TIMEOUT
// code enabled?
BUGCR10343 LINUX : fast/text/atsui-kerning-and-ligatures.html = FAIL
BUGCR10343 LINUX RELEASE : fast/text/atsui-partial-selection.html = IMAGE
-BUGCR10343 LINUX : fast/text/atsui-small-caps-punctuation-size.html = FAIL
// Started timing out with agl's complext text change. Page is verrry slow.
BUGCR10343 SKIP LINUX : fast/text/large-text-composed-char.html = TIMEOUT FAIL
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 20ddc87..383ce37 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2011-01-25 James Simonsen <simonjam at chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [Chromium] Support small caps in complex text on linux
+ https://bugs.webkit.org/show_bug.cgi?id=53051
+
+ * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
+ (WebCore::ComplexTextController::nextScriptRun): Break runs at small caps boundaries.
+ (WebCore::ComplexTextController::setupFontForScriptRun): Setup small caps font data if needed.
+ * platform/graphics/chromium/ComplexTextControllerLinux.h: Store small caps text in separate string.
+
2011-01-25 Steve Falkenburg <sfalken at apple.com>
Rubber-stamped by Adam Roben.
diff --git a/Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.cpp b/Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.cpp
index 92861fc..31fc4f7 100644
--- a/Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.cpp
+++ b/Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.cpp
@@ -146,6 +146,9 @@ void ComplexTextController::reset(unsigned offset)
// TextRun has been reached.
bool ComplexTextController::nextScriptRun()
{
+ // Ensure we're not pointing at the small caps buffer.
+ m_item.string = m_run.characters();
+
if (!hb_utf16_script_run_next(&m_numCodePoints, &m_item.item, m_run.characters(), m_run.length(), &m_indexOfNextScriptRun))
return false;
@@ -157,11 +160,15 @@ bool ComplexTextController::nextScriptRun()
// So we allow that to run first, then do a second pass over the range it
// found and take the largest subregion that stays within a single font.
m_currentFontData = m_font->glyphDataForCharacter(m_item.string[m_item.item.pos], false).fontData;
+ bool isFirstCharacterLowerCase = u_islower(m_item.string[m_item.item.pos]);
unsigned endOfRun;
for (endOfRun = 1; endOfRun < m_item.item.length; ++endOfRun) {
- const SimpleFontData* nextFontData = m_font->glyphDataForCharacter(m_item.string[m_item.item.pos + endOfRun], false).fontData;
+ UChar nextCharacter = m_item.string[m_item.item.pos + endOfRun];
+ const SimpleFontData* nextFontData = m_font->glyphDataForCharacter(nextCharacter, false).fontData;
if (nextFontData != m_currentFontData)
break;
+ if (m_font->isSmallCaps() && isFirstCharacterLowerCase != u_islower(nextCharacter))
+ break;
}
m_item.item.length = endOfRun;
m_indexOfNextScriptRun = m_item.item.pos + endOfRun;
@@ -184,7 +191,18 @@ float ComplexTextController::widthOfFullRun()
void ComplexTextController::setupFontForScriptRun()
{
- const FontData* fontData = m_font->glyphDataForCharacter(m_item.string[m_item.item.pos], false).fontData;
+ FontDataVariant fontDataVariant = AutoVariant;
+ // Determine if this script run needs to be converted to small caps.
+ // nextScriptRun() will always send us a run of the same case, so we only
+ // need to check the first character's case.
+ if (m_font->isSmallCaps() && u_islower(m_item.string[m_item.item.pos])) {
+ m_smallCapsString = String(m_run.data(m_item.item.pos), m_item.item.length);
+ m_smallCapsString.makeUpper();
+ m_item.string = m_smallCapsString.characters();
+ m_item.item.pos = 0;
+ fontDataVariant = SmallCapsVariant;
+ }
+ const FontData* fontData = m_font->glyphDataForCharacter(m_item.string[m_item.item.pos], false, fontDataVariant).fontData;
const FontPlatformData& platformData = fontData->fontDataForCharacter(' ')->platformData();
m_item.face = platformData.harfbuzzFace();
void* opaquePlatformData = const_cast<FontPlatformData*>(&platformData);
diff --git a/Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.h b/Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.h
index a2aea60..590816f 100644
--- a/Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.h
+++ b/Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.h
@@ -155,6 +155,7 @@ private:
// each word break we accumulate error. This is the
// number of pixels that we are behind so far.
int m_letterSpacing; // pixels to be added after each glyph.
+ String m_smallCapsString; // substring of m_run converted to small caps.
};
} // namespace WebCore
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list