[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:21:50 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 125d61c41680597034892868d1f8041d4267ec3e
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jun 27 18:14:51 2002 +0000
Method name changes in preparation for fixing
TextSlave::checkSelectionPoint().
* kwq/WebCoreTextRenderer.h:
Method name changes in preparation for fixing
TextSlave::checkSelectionPoint(). Stubbed
only, no support for new parameters yet.
* Misc.subproj/IFStringTruncator.m:
(+[IFStringTruncator centerTruncateString:toWidth:withFont:]):
* WebCoreSupport.subproj/IFTextRenderer.h:
* WebCoreSupport.subproj/IFTextRenderer.m:
(-[IFTextRenderer slowFloatWidthForCharacters:stringLength:fromCharacterPostion:numberOfCharacters:applyRounding:]):
(-[IFTextRenderer floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:]):
(-[IFTextRenderer floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:applyRounding:attemptFontSubstitution:]):
(-[IFTextRenderer widthForCharacters:length:]):
(-[IFTextRenderer widthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1456 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index dac67eb..14ad201 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,12 @@
2002-06-27 Richard Williamson <rjw at apple.com>
+ Method name changes in preparation for fixing
+ TextSlave::checkSelectionPoint().
+
+ * kwq/WebCoreTextRenderer.h:
+
+2002-06-27 Richard Williamson <rjw at apple.com>
+
Removed calls to old method.
* kwq/KWQPainter.mm:
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index dac67eb..14ad201 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,12 @@
2002-06-27 Richard Williamson <rjw at apple.com>
+ Method name changes in preparation for fixing
+ TextSlave::checkSelectionPoint().
+
+ * kwq/WebCoreTextRenderer.h:
+
+2002-06-27 Richard Williamson <rjw at apple.com>
+
Removed calls to old method.
* kwq/KWQPainter.mm:
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index dac67eb..14ad201 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,12 @@
2002-06-27 Richard Williamson <rjw at apple.com>
+ Method name changes in preparation for fixing
+ TextSlave::checkSelectionPoint().
+
+ * kwq/WebCoreTextRenderer.h:
+
+2002-06-27 Richard Williamson <rjw at apple.com>
+
Removed calls to old method.
* kwq/KWQPainter.mm:
diff --git a/WebCore/kwq/WebCoreTextRenderer.h b/WebCore/kwq/WebCoreTextRenderer.h
index a94ce5e..7fba82c 100644
--- a/WebCore/kwq/WebCoreTextRenderer.h
+++ b/WebCore/kwq/WebCoreTextRenderer.h
@@ -43,4 +43,8 @@
// A way to bypass NSString for speed.
- (int)widthForCharacters:(const UniChar *)characters length:(unsigned)length;
+- (float)floatWidthForCharacters:(const UniChar *)characters stringLength:(unsigned)stringLength fromCharacterPosition: (int)pos numberOfCharacters: (int)len;
+
+- (int)widthForCharacters:(const UniChar *)characters stringLength:(unsigned)stringLength fromCharacterPosition: (int)pos numberOfCharacters: (int)len;
+
@end
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index b513570..45bc000 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,21 @@
2002-06-27 Richard Williamson <rjw at apple.com>
+ Method name changes in preparation for fixing
+ TextSlave::checkSelectionPoint(). Stubbed
+ only, no support for new parameters yet.
+
+ * Misc.subproj/IFStringTruncator.m:
+ (+[IFStringTruncator centerTruncateString:toWidth:withFont:]):
+ * WebCoreSupport.subproj/IFTextRenderer.h:
+ * WebCoreSupport.subproj/IFTextRenderer.m:
+ (-[IFTextRenderer slowFloatWidthForCharacters:stringLength:fromCharacterPostion:numberOfCharacters:applyRounding:]):
+ (-[IFTextRenderer floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:]):
+ (-[IFTextRenderer floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:applyRounding:attemptFontSubstitution:]):
+ (-[IFTextRenderer widthForCharacters:length:]):
+ (-[IFTextRenderer widthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:]):
+
+2002-06-27 Richard Williamson <rjw at apple.com>
+
Removed old methods and references.
* WebCoreSupport.subproj/IFTextRenderer.m:
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index b513570..45bc000 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,5 +1,21 @@
2002-06-27 Richard Williamson <rjw at apple.com>
+ Method name changes in preparation for fixing
+ TextSlave::checkSelectionPoint(). Stubbed
+ only, no support for new parameters yet.
+
+ * Misc.subproj/IFStringTruncator.m:
+ (+[IFStringTruncator centerTruncateString:toWidth:withFont:]):
+ * WebCoreSupport.subproj/IFTextRenderer.h:
+ * WebCoreSupport.subproj/IFTextRenderer.m:
+ (-[IFTextRenderer slowFloatWidthForCharacters:stringLength:fromCharacterPostion:numberOfCharacters:applyRounding:]):
+ (-[IFTextRenderer floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:]):
+ (-[IFTextRenderer floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:applyRounding:attemptFontSubstitution:]):
+ (-[IFTextRenderer widthForCharacters:length:]):
+ (-[IFTextRenderer widthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:]):
+
+2002-06-27 Richard Williamson <rjw at apple.com>
+
Removed old methods and references.
* WebCoreSupport.subproj/IFTextRenderer.m:
diff --git a/WebKit/Misc.subproj/IFStringTruncator.m b/WebKit/Misc.subproj/IFStringTruncator.m
index a083e88..33e7dc1 100644
--- a/WebKit/Misc.subproj/IFStringTruncator.m
+++ b/WebKit/Misc.subproj/IFStringTruncator.m
@@ -77,7 +77,7 @@ static float currentEllipsisWidth;
[IFTextRendererFactory createSharedFactory];
currentRenderer = [[[IFTextRendererFactory sharedFactory] rendererWithFont:font] retain];
ellipsis = ELLIPSIS_CHARACTER;
- currentEllipsisWidth = [currentRenderer floatWidthForCharacters:&ellipsis length:1 applyRounding: NO attemptFontSubstitution: YES];
+ currentEllipsisWidth = [currentRenderer floatWidthForCharacters:&ellipsis stringLength:1 fromCharacterPosition: 0 numberOfCharacters: 1 applyRounding: NO attemptFontSubstitution: YES];
}
WEBKIT_ASSERT(currentRenderer);
@@ -96,7 +96,7 @@ static float currentEllipsisWidth;
}
width = [currentRenderer floatWidthForCharacters:stringBuffer
- length:truncatedLength applyRounding: NO attemptFontSubstitution: YES];
+ stringLength:truncatedLength fromCharacterPosition: 0 numberOfCharacters: truncatedLength applyRounding: NO attemptFontSubstitution: YES];
if (width <= maxWidth) {
return string;
}
@@ -136,7 +136,7 @@ static float currentEllipsisWidth;
keepCount:keepCount
toBuffer:stringBuffer];
- width = [currentRenderer floatWidthForCharacters:stringBuffer length:truncatedLength applyRounding: NO attemptFontSubstitution: YES];
+ width = [currentRenderer floatWidthForCharacters:stringBuffer stringLength:truncatedLength fromCharacterPosition: 0 numberOfCharacters: truncatedLength applyRounding: NO attemptFontSubstitution: YES];
if (width <= maxWidth) {
keepCountForLargestKnownToFit = keepCount;
widthForLargestKnownToFit = width;
diff --git a/WebKit/Misc.subproj/WebStringTruncator.m b/WebKit/Misc.subproj/WebStringTruncator.m
index a083e88..33e7dc1 100644
--- a/WebKit/Misc.subproj/WebStringTruncator.m
+++ b/WebKit/Misc.subproj/WebStringTruncator.m
@@ -77,7 +77,7 @@ static float currentEllipsisWidth;
[IFTextRendererFactory createSharedFactory];
currentRenderer = [[[IFTextRendererFactory sharedFactory] rendererWithFont:font] retain];
ellipsis = ELLIPSIS_CHARACTER;
- currentEllipsisWidth = [currentRenderer floatWidthForCharacters:&ellipsis length:1 applyRounding: NO attemptFontSubstitution: YES];
+ currentEllipsisWidth = [currentRenderer floatWidthForCharacters:&ellipsis stringLength:1 fromCharacterPosition: 0 numberOfCharacters: 1 applyRounding: NO attemptFontSubstitution: YES];
}
WEBKIT_ASSERT(currentRenderer);
@@ -96,7 +96,7 @@ static float currentEllipsisWidth;
}
width = [currentRenderer floatWidthForCharacters:stringBuffer
- length:truncatedLength applyRounding: NO attemptFontSubstitution: YES];
+ stringLength:truncatedLength fromCharacterPosition: 0 numberOfCharacters: truncatedLength applyRounding: NO attemptFontSubstitution: YES];
if (width <= maxWidth) {
return string;
}
@@ -136,7 +136,7 @@ static float currentEllipsisWidth;
keepCount:keepCount
toBuffer:stringBuffer];
- width = [currentRenderer floatWidthForCharacters:stringBuffer length:truncatedLength applyRounding: NO attemptFontSubstitution: YES];
+ width = [currentRenderer floatWidthForCharacters:stringBuffer stringLength:truncatedLength fromCharacterPosition: 0 numberOfCharacters: truncatedLength applyRounding: NO attemptFontSubstitution: YES];
if (width <= maxWidth) {
keepCountForLargestKnownToFit = keepCount;
widthForLargestKnownToFit = width;
diff --git a/WebKit/WebCoreSupport.subproj/IFTextRenderer.h b/WebKit/WebCoreSupport.subproj/IFTextRenderer.h
index deeac07..e4409c6 100644
--- a/WebKit/WebCoreSupport.subproj/IFTextRenderer.h
+++ b/WebKit/WebCoreSupport.subproj/IFTextRenderer.h
@@ -29,6 +29,6 @@ typedef struct GlyphMap GlyphMap;
- initWithFont:(NSFont *)font;
// Set applyRounding = NO to get an Cocoa equivalent width.
-- (float)floatWidthForCharacters:(const unichar *)characters length:(unsigned)length applyRounding: (BOOL)applyRounding attemptFontSubstitution: (BOOL)attemptFontSubstitution;
+- (float)floatWidthForCharacters:(const unichar *)characters stringLength:(unsigned)length fromCharacterPosition: (int)pos numberOfCharacters: (int)len applyRounding: (BOOL)applyRounding attemptFontSubstitution: (BOOL)attemptFontSubstitution;
@end
diff --git a/WebKit/WebCoreSupport.subproj/IFTextRenderer.m b/WebKit/WebCoreSupport.subproj/IFTextRenderer.m
index 81d1e84..e6be047 100644
--- a/WebKit/WebCoreSupport.subproj/IFTextRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/IFTextRenderer.m
@@ -688,7 +688,7 @@ cleanup:
}
-- (float)slowFloatWidthForCharacters: (const UniChar *)characters length: (unsigned)length applyRounding: (BOOL)applyRounding
+- (float)slowFloatWidthForCharacters: (const UniChar *)characters stringLength: (unsigned)length fromCharacterPostion: (int)pos numberOfCharacters: (int)len applyRounding: (BOOL)applyRounding
{
float totalWidth = 0;
unsigned int i, numGlyphs;
@@ -722,7 +722,13 @@ cleanup:
}
-- (float)floatWidthForCharacters:(const UniChar *)characters length:(unsigned)length applyRounding: (BOOL)applyRounding attemptFontSubstitution: (BOOL)attemptSubstitution
+- (float)floatWidthForCharacters:(const UniChar *)characters stringLength:(unsigned)stringLength fromCharacterPosition: (int)pos numberOfCharacters: (int)len
+{
+ return [self floatWidthForCharacters:characters stringLength:stringLength fromCharacterPosition:pos numberOfCharacters:len applyRounding: YES attemptFontSubstitution: YES];
+}
+
+
+- (float)floatWidthForCharacters:(const UniChar *)characters stringLength:(unsigned)stringLength fromCharacterPosition: (int)pos numberOfCharacters: (int)len applyRounding: (BOOL)applyRounding attemptFontSubstitution: (BOOL)attemptSubstitution
{
float totalWidth = 0;
unsigned int i, clusterLength;
@@ -732,14 +738,14 @@ cleanup:
//printf("width: font %s, size %.1f, text \"%s\"\n", [[font fontName] cString], [font pointSize], [[NSString stringWithCharacters:characters length:length] UTF8String]);
- for (i = 0; i < length; i++) {
+ for (i = 0; i < stringLength; i++) {
UniChar c = characters[i];
if (c == NON_BREAKING_SPACE) {
c = SPACE;
}
else if (IsNonBaseChar(c)){
- return [self slowFloatWidthForCharacters: characters length: length applyRounding: applyRounding];
+ return [self slowFloatWidthForCharacters: characters stringLength: stringLength fromCharacterPostion: pos numberOfCharacters: len applyRounding: applyRounding];
}
glyphID = glyphForCharacter(characterToGlyphMap, c);
@@ -750,11 +756,11 @@ cleanup:
// Try to find a substitute font if this font didn't have a glyph for a character in the
// string. If one isn't found we end up drawing and measuring the 0 glyph, usually a box.
if (glyphID == 0 && attemptSubstitution) {
- clusterLength = findLengthOfCharacterCluster (&characters[i], length - i);
+ clusterLength = findLengthOfCharacterCluster (&characters[i], stringLength - i);
substituteFont = [self substituteFontForCharacters: &characters[i] length: clusterLength];
if (substituteFont) {
//WEBKITDEBUGLEVEL (WEBKIT_LOG_FONTCACHE, "substituting %s for %s, missing 0x%04x\n", DEBUG_OBJECT(substituteFont), DEBUG_OBJECT([font displayName]), c);
- lastWidth = [[[IFTextRendererFactory sharedFactory] rendererWithFont: substituteFont] floatWidthForCharacters: &characters[i] length: clusterLength applyRounding: YES attemptFontSubstitution: NO];
+ lastWidth = [[[IFTextRendererFactory sharedFactory] rendererWithFont: substituteFont] floatWidthForCharacters: &characters[i] stringLength: clusterLength fromCharacterPosition: pos numberOfCharacters: len applyRounding: YES attemptFontSubstitution: NO];
}
}
@@ -775,10 +781,14 @@ cleanup:
return totalWidth;
}
+- (int)widthForCharacters:(const UniChar *)characters length:(unsigned)stringLength
+{
+ return [self widthForCharacters:characters stringLength:stringLength fromCharacterPosition:0 numberOfCharacters:stringLength];
+}
-- (int)widthForCharacters:(const UniChar *)characters length:(unsigned)length
+- (int)widthForCharacters:(const UniChar *)characters stringLength:(unsigned)stringLength fromCharacterPosition: (int)pos numberOfCharacters: (int)len
{
- return ROUND_TO_INT([self floatWidthForCharacters:characters length:length applyRounding:YES attemptFontSubstitution: YES]);
+ return ROUND_TO_INT([self floatWidthForCharacters:characters stringLength:stringLength fromCharacterPosition:pos numberOfCharacters:len applyRounding:YES attemptFontSubstitution: YES]);
}
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRenderer.h b/WebKit/WebCoreSupport.subproj/WebTextRenderer.h
index deeac07..e4409c6 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRenderer.h
+++ b/WebKit/WebCoreSupport.subproj/WebTextRenderer.h
@@ -29,6 +29,6 @@ typedef struct GlyphMap GlyphMap;
- initWithFont:(NSFont *)font;
// Set applyRounding = NO to get an Cocoa equivalent width.
-- (float)floatWidthForCharacters:(const unichar *)characters length:(unsigned)length applyRounding: (BOOL)applyRounding attemptFontSubstitution: (BOOL)attemptFontSubstitution;
+- (float)floatWidthForCharacters:(const unichar *)characters stringLength:(unsigned)length fromCharacterPosition: (int)pos numberOfCharacters: (int)len applyRounding: (BOOL)applyRounding attemptFontSubstitution: (BOOL)attemptFontSubstitution;
@end
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
index 81d1e84..e6be047 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
@@ -688,7 +688,7 @@ cleanup:
}
-- (float)slowFloatWidthForCharacters: (const UniChar *)characters length: (unsigned)length applyRounding: (BOOL)applyRounding
+- (float)slowFloatWidthForCharacters: (const UniChar *)characters stringLength: (unsigned)length fromCharacterPostion: (int)pos numberOfCharacters: (int)len applyRounding: (BOOL)applyRounding
{
float totalWidth = 0;
unsigned int i, numGlyphs;
@@ -722,7 +722,13 @@ cleanup:
}
-- (float)floatWidthForCharacters:(const UniChar *)characters length:(unsigned)length applyRounding: (BOOL)applyRounding attemptFontSubstitution: (BOOL)attemptSubstitution
+- (float)floatWidthForCharacters:(const UniChar *)characters stringLength:(unsigned)stringLength fromCharacterPosition: (int)pos numberOfCharacters: (int)len
+{
+ return [self floatWidthForCharacters:characters stringLength:stringLength fromCharacterPosition:pos numberOfCharacters:len applyRounding: YES attemptFontSubstitution: YES];
+}
+
+
+- (float)floatWidthForCharacters:(const UniChar *)characters stringLength:(unsigned)stringLength fromCharacterPosition: (int)pos numberOfCharacters: (int)len applyRounding: (BOOL)applyRounding attemptFontSubstitution: (BOOL)attemptSubstitution
{
float totalWidth = 0;
unsigned int i, clusterLength;
@@ -732,14 +738,14 @@ cleanup:
//printf("width: font %s, size %.1f, text \"%s\"\n", [[font fontName] cString], [font pointSize], [[NSString stringWithCharacters:characters length:length] UTF8String]);
- for (i = 0; i < length; i++) {
+ for (i = 0; i < stringLength; i++) {
UniChar c = characters[i];
if (c == NON_BREAKING_SPACE) {
c = SPACE;
}
else if (IsNonBaseChar(c)){
- return [self slowFloatWidthForCharacters: characters length: length applyRounding: applyRounding];
+ return [self slowFloatWidthForCharacters: characters stringLength: stringLength fromCharacterPostion: pos numberOfCharacters: len applyRounding: applyRounding];
}
glyphID = glyphForCharacter(characterToGlyphMap, c);
@@ -750,11 +756,11 @@ cleanup:
// Try to find a substitute font if this font didn't have a glyph for a character in the
// string. If one isn't found we end up drawing and measuring the 0 glyph, usually a box.
if (glyphID == 0 && attemptSubstitution) {
- clusterLength = findLengthOfCharacterCluster (&characters[i], length - i);
+ clusterLength = findLengthOfCharacterCluster (&characters[i], stringLength - i);
substituteFont = [self substituteFontForCharacters: &characters[i] length: clusterLength];
if (substituteFont) {
//WEBKITDEBUGLEVEL (WEBKIT_LOG_FONTCACHE, "substituting %s for %s, missing 0x%04x\n", DEBUG_OBJECT(substituteFont), DEBUG_OBJECT([font displayName]), c);
- lastWidth = [[[IFTextRendererFactory sharedFactory] rendererWithFont: substituteFont] floatWidthForCharacters: &characters[i] length: clusterLength applyRounding: YES attemptFontSubstitution: NO];
+ lastWidth = [[[IFTextRendererFactory sharedFactory] rendererWithFont: substituteFont] floatWidthForCharacters: &characters[i] stringLength: clusterLength fromCharacterPosition: pos numberOfCharacters: len applyRounding: YES attemptFontSubstitution: NO];
}
}
@@ -775,10 +781,14 @@ cleanup:
return totalWidth;
}
+- (int)widthForCharacters:(const UniChar *)characters length:(unsigned)stringLength
+{
+ return [self widthForCharacters:characters stringLength:stringLength fromCharacterPosition:0 numberOfCharacters:stringLength];
+}
-- (int)widthForCharacters:(const UniChar *)characters length:(unsigned)length
+- (int)widthForCharacters:(const UniChar *)characters stringLength:(unsigned)stringLength fromCharacterPosition: (int)pos numberOfCharacters: (int)len
{
- return ROUND_TO_INT([self floatWidthForCharacters:characters length:length applyRounding:YES attemptFontSubstitution: YES]);
+ return ROUND_TO_INT([self floatWidthForCharacters:characters stringLength:stringLength fromCharacterPosition:pos numberOfCharacters:len applyRounding:YES attemptFontSubstitution: YES]);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list