[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
mitz at apple.com
mitz at apple.com
Wed Dec 22 15:46:18 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 5392d247a9d0067a5ebd5a4a9b9581e9e11e73bd
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Nov 12 01:21:08 2010 +0000
<rdar://problem/8657116> fast/text/justification-padding-mid-word.html fails on Windows
https://bugs.webkit.org/show_bug.cgi?id=49378
Reviewed by Darin Adler.
WebCore:
* platform/graphics/win/UniscribeController.cpp:
(WebCore::UniscribeController::shapeAndPlaceItem): For all characters that need to be treated
as zero-width spaces, substitute the space glyph with zero advance. Apply justification padding
and word spacing only at characters treated as (non-zero-width) spaces.
LayoutTests:
* platform/win/fast/text/justification-padding-mid-word-expected.txt: Removed Windows-specific
expected failure.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 219c26d..1940b4e 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-11-11 Dan Bernstein <mitz at apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/8657116> fast/text/justification-padding-mid-word.html fails on Windows
+ https://bugs.webkit.org/show_bug.cgi?id=49378
+
+ * platform/win/fast/text/justification-padding-mid-word-expected.txt: Removed Windows-specific
+ expected failure.
+
2010-11-11 Mihai Parparita <mihaip at chromium.org>
Unreviewed Chromium rebaseline.
diff --git a/LayoutTests/platform/win/fast/text/justification-padding-mid-word-expected.txt b/LayoutTests/platform/win/fast/text/justification-padding-mid-word-expected.txt
deleted file mode 100644
index faa3170..0000000
--- a/LayoutTests/platform/win/fast/text/justification-padding-mid-word-expected.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-ab c de
-ab c de
-FAIL
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2bea384..10e84d5 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-11-11 Dan Bernstein <mitz at apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/8657116> fast/text/justification-padding-mid-word.html fails on Windows
+ https://bugs.webkit.org/show_bug.cgi?id=49378
+
+ * platform/graphics/win/UniscribeController.cpp:
+ (WebCore::UniscribeController::shapeAndPlaceItem): For all characters that need to be treated
+ as zero-width spaces, substitute the space glyph with zero advance. Apply justification padding
+ and word spacing only at characters treated as (non-zero-width) spaces.
+
2010-11-11 Darin Adler <darin at apple.com>
Reviewed by Sam Weinig.
diff --git a/WebCore/platform/graphics/win/UniscribeController.cpp b/WebCore/platform/graphics/win/UniscribeController.cpp
index bceec2d..d0acac2 100644
--- a/WebCore/platform/graphics/win/UniscribeController.cpp
+++ b/WebCore/platform/graphics/win/UniscribeController.cpp
@@ -275,12 +275,15 @@ bool UniscribeController::shapeAndPlaceItem(const UChar* cp, unsigned i, const S
for (int k = 0; k < len; k++) {
UChar ch = *(str + k);
- if (Font::treatAsSpace(ch)) {
+ bool treatAsSpace = Font::treatAsSpace(ch);
+ bool treatAsZeroWidthSpace = ch == zeroWidthSpace || Font::treatAsZeroWidthSpace(ch);
+ if (treatAsSpace || treatAsZeroWidthSpace) {
// Substitute in the space glyph at the appropriate place in the glyphs
// array.
glyphs[clusters[k]] = fontData->spaceGlyph();
- advances[clusters[k]] = logicalSpaceWidth;
- spaceCharacters[clusters[k]] = m_currentCharacter + k + item.iCharPos;
+ advances[clusters[k]] = treatAsSpace ? logicalSpaceWidth : 0;
+ if (treatAsSpace)
+ spaceCharacters[clusters[k]] = m_currentCharacter + k + item.iCharPos;
}
if (Font::isRoundingHackCharacter(ch))
@@ -335,7 +338,9 @@ bool UniscribeController::shapeAndPlaceItem(const UChar* cp, unsigned i, const S
advance += m_font.letterSpacing();
// Handle justification and word-spacing.
- if (glyph == fontData->spaceGlyph()) {
+ int characterIndex = spaceCharacters[k];
+ // characterIndex is left at the initial value of -1 for glyphs that do not map back to treated-as-space characters.
+ if (characterIndex != -1) {
// Account for padding. WebCore uses space padding to justify text.
// We distribute the specified padding over the available spaces in the run.
if (m_padding) {
@@ -351,7 +356,6 @@ bool UniscribeController::shapeAndPlaceItem(const UChar* cp, unsigned i, const S
}
// Account for word-spacing.
- int characterIndex = spaceCharacters[k];
if (characterIndex > 0 && !Font::treatAsSpace(*m_run.data(characterIndex - 1)) && m_font.wordSpacing())
advance += m_font.wordSpacing();
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list