[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
rjw
rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:19:54 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 9df48442172f7c0f31f357dc68131473ebbb6000
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Dec 18 01:41:41 2003 +0000
Fixed 3503011 (really, this time). Always use integer width for '-' and '?', as we do for spaces, to ensure that 'words' (as defined by out rounding hack) start on integer boundaries.
Reviewed by John.
* WebCoreSupport.subproj/WebTextRenderer.m:
(widthForNextCharacter):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5827 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 1cf6448..7f0cad9 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,12 @@
+2003-12-17 Richard Williamson <rjw at apple.com>
+
+ Fixed 3503011 (really, this time). Always use integer width for '-' and '?', as we do for spaces, to ensure that 'words' (as defined by out rounding hack) start on integer boundaries.
+
+ Reviewed by John.
+
+ * WebCoreSupport.subproj/WebTextRenderer.m:
+ (widthForNextCharacter):
+
2003-12-17 Chris Blumenberg <cblu at apple.com>
Fixed:
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
index f75fb3b..15ea015 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
@@ -1919,21 +1919,32 @@ static float widthForNextCharacter(CharacterWidthIterator *iterator, ATSGlyphRef
width += iterator->style->wordSpacing;
}
+ // Force characters that are used to determine word boundaries for the rounding hack
+ // to be integer width, so following words will start on an integer boundary.
+ if (isRoundingHackCharacter(c)) {
+ width = CEIL_TO_INT(width);
+ }
+
iterator->runWidthSoFar += width;
// Advance past the character we just dealt with.
currentCharacter += clusterLength;
iterator->currentCharacter = currentCharacter;
+ int len = run->to - run->from;
+
// Account for float/integer impedance mismatch between CG and khtml. "Words" (characters
// followed by a character defined by isSpace()) are always an integer width. We adjust the
// width of the last character of a "word" to ensure an integer width. When we move khtml to
// floats we can remove this (and related) hacks.
//
- // Check to see if the next character is a space, if so, adjust.
+ // Check to see if the next character is a "RoundingHackCharacter", if so, adjust.
if (currentCharacter < run->length && isRoundingHackCharacter(cp[clusterLength])) {
width += ceilCurrentWidth(iterator);
}
+ else if (currentCharacter >= (unsigned)run->to && (len > 1 || run->length == 1) && iterator->style->applyRounding) {
+ width += ceilCurrentWidth(iterator);
+ }
return width;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list