[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 06:59:28 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit b4635089ddb33f4fd1dcbb2a71c99eac1a291343
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Nov 13 01:49:14 2002 +0000
Fixed likely cause of 3099047 (and others). Width buffer could underrun in
some situations.
* WebCoreSupport.subproj/WebTextRenderer.m:
(-[WebTextRenderer _floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:withPadding:applyRounding:attemptFontSubstitution:widths:fonts:glyphs:numGlyphs:letterSpacing:wordSpacing:]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 0e6a8fa..3b19c79 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,11 @@
+2002-11-12 Richard Williamson <rjw at apple.com>
+
+ Fixed likely cause of 3099047 (and others). Width buffer could underrun in
+ some situations.
+
+ * WebCoreSupport.subproj/WebTextRenderer.m:
+ (-[WebTextRenderer _floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:withPadding:applyRounding:attemptFontSubstitution:widths:fonts:glyphs:numGlyphs:letterSpacing:wordSpacing:]):
+
2002-11-12 John Sullivan <sullivan at apple.com>
* Misc.subproj/WebNSViewExtras.h:
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 0e6a8fa..3b19c79 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,11 @@
+2002-11-12 Richard Williamson <rjw at apple.com>
+
+ Fixed likely cause of 3099047 (and others). Width buffer could underrun in
+ some situations.
+
+ * WebCoreSupport.subproj/WebTextRenderer.m:
+ (-[WebTextRenderer _floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:withPadding:applyRounding:attemptFontSubstitution:widths:fonts:glyphs:numGlyphs:letterSpacing:wordSpacing:]):
+
2002-11-12 John Sullivan <sullivan at apple.com>
* Misc.subproj/WebNSViewExtras.h:
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
index 172b06f..7e7deb1 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
@@ -747,7 +747,7 @@ static const char *joiningNames[] = {
if (c == SPACE && applyRounding) {
float delta = CEIL_TO_INT(totalWidth) - totalWidth;
totalWidth += delta;
- if (widthBuffer)
+ if (widthBuffer && numGlyphs > 0)
widthBuffer[numGlyphs - 1] += delta;
}
break;
@@ -844,9 +844,11 @@ static const char *joiningNames[] = {
// should have zero width.
if (widthBuffer){
int ng = numGlyphs-1;
- while (ng && widthBuffer[ng] == 0)
- ng--;
- widthBuffer[ng] += wordSpacing;
+ if (ng >= 0){
+ while (ng && widthBuffer[ng] == 0)
+ ng--;
+ widthBuffer[ng] += wordSpacing;
+ }
}
totalWidth += wordSpacing;
}
@@ -863,12 +865,13 @@ static const char *joiningNames[] = {
totalWidth += lastWidth;
}
- // Don't ever apply rounding for single character. Single character measurement
- // intra word needs to be non-ceiled.
+ // Ceil the last glyph, but only if
+ // 1) The string is longer than one character
+ // 2) or the entire stringLength is one character
if ((len > 1 || stringLength == 1) && applyRounding){
float delta = CEIL_TO_INT(totalWidth) - totalWidth;
totalWidth += delta;
- if (widthBuffer)
+ if (widthBuffer && numGlyphs > 0)
widthBuffer[numGlyphs-1] += delta;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list