[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:24:30 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 92479eca90acbdfa2eb6a18251ef94daac943fc1
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jul 15 15:39:02 2002 +0000
WebCore:
* kwq/qt/qfontmetrics.h: Remove unused, and not properly implemented,
empty constructor. Add some const that was missing. Remove most of the
parameters of size().
* kwq/KWQFontMetrics.mm:
(QFontMetrics::charWidth): Add const.
(QFontMetrics::floatWidth): Add const.
(QFontMetrics::floatCharacterWidth): Add const.
(QFontMetrics::size): Remove unused parameters.
* kwq/WebCoreTextRenderer.h: Remove two unused drawString methods and one
unused widthForCharacters method.
WebKit:
* WebCoreSupport.subproj/IFTextRenderer.m:
(-[IFTextRenderer widthForCharacters:length:]): Remove implementation of some unused
methods, including at least one that was never used.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 4af2ad7..0341d86 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,17 @@
+2002-07-15 Darin Adler <darin at apple.com>
+
+ * kwq/qt/qfontmetrics.h: Remove unused, and not properly implemented,
+ empty constructor. Add some const that was missing. Remove most of the
+ parameters of size().
+ * kwq/KWQFontMetrics.mm:
+ (QFontMetrics::charWidth): Add const.
+ (QFontMetrics::floatWidth): Add const.
+ (QFontMetrics::floatCharacterWidth): Add const.
+ (QFontMetrics::size): Remove unused parameters.
+
+ * kwq/WebCoreTextRenderer.h: Remove two unused drawString methods and one
+ unused widthForCharacters method.
+
2002-07-14 Darin Adler <darin at apple.com>
* kwq/WebCoreFrame.mm: (-[WebCoreFrame dealloc]): Fix NULL-dereferencing
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 4af2ad7..0341d86 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,17 @@
+2002-07-15 Darin Adler <darin at apple.com>
+
+ * kwq/qt/qfontmetrics.h: Remove unused, and not properly implemented,
+ empty constructor. Add some const that was missing. Remove most of the
+ parameters of size().
+ * kwq/KWQFontMetrics.mm:
+ (QFontMetrics::charWidth): Add const.
+ (QFontMetrics::floatWidth): Add const.
+ (QFontMetrics::floatCharacterWidth): Add const.
+ (QFontMetrics::size): Remove unused parameters.
+
+ * kwq/WebCoreTextRenderer.h: Remove two unused drawString methods and one
+ unused widthForCharacters method.
+
2002-07-14 Darin Adler <darin at apple.com>
* kwq/WebCoreFrame.mm: (-[WebCoreFrame dealloc]): Fix NULL-dereferencing
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 4af2ad7..0341d86 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,17 @@
+2002-07-15 Darin Adler <darin at apple.com>
+
+ * kwq/qt/qfontmetrics.h: Remove unused, and not properly implemented,
+ empty constructor. Add some const that was missing. Remove most of the
+ parameters of size().
+ * kwq/KWQFontMetrics.mm:
+ (QFontMetrics::charWidth): Add const.
+ (QFontMetrics::floatWidth): Add const.
+ (QFontMetrics::floatCharacterWidth): Add const.
+ (QFontMetrics::size): Remove unused parameters.
+
+ * kwq/WebCoreTextRenderer.h: Remove two unused drawString methods and one
+ unused widthForCharacters method.
+
2002-07-14 Darin Adler <darin at apple.com>
* kwq/WebCoreFrame.mm: (-[WebCoreFrame dealloc]): Fix NULL-dereferencing
diff --git a/WebCore/kwq/KWQFontMetrics.h b/WebCore/kwq/KWQFontMetrics.h
index bcdf581..2084245 100644
--- a/WebCore/kwq/KWQFontMetrics.h
+++ b/WebCore/kwq/KWQFontMetrics.h
@@ -36,12 +36,11 @@ class QFontMetricsPrivate;
class QFontMetrics {
public:
-
- QFontMetrics();
QFontMetrics(const QFont &);
+ ~QFontMetrics();
+
QFontMetrics(const QFontMetrics &);
QFontMetrics &operator=(const QFontMetrics &);
- ~QFontMetrics();
int ascent() const;
int descent() const;
@@ -51,17 +50,17 @@ public:
int width(QChar) const;
int width(char) const;
int width(const QString &, int len=-1) const;
- int charWidth(QString &s, int pos) const;
+ int charWidth(const QString &, int pos) const;
int width(const QChar *, int len) const;
- float floatWidth( QChar *uchars, int slen, int pos, int len ) const;
- float floatCharacterWidth( QChar *uchars, int slen, int pos) const;
+ float floatWidth(const QChar *, int slen, int pos, int len) const;
+ float floatCharacterWidth(const QChar *, int slen, int pos) const;
QRect boundingRect(const QString &, int len=-1) const;
QRect boundingRect(QChar) const;
QRect boundingRect(int, int, int, int, int, const QString &) const;
- QSize size(int, const QString &, int len=-1, int tabstops=0,
- int *tabarray=0, char **intern=0 ) const;
+ QSize size(int, const QString &) const;
+
int rightBearing(QChar) const;
int leftBearing(QChar) const;
int baselineOffset() const;
diff --git a/WebCore/kwq/KWQFontMetrics.mm b/WebCore/kwq/KWQFontMetrics.mm
index e6a2865..a1973aa 100644
--- a/WebCore/kwq/KWQFontMetrics.mm
+++ b/WebCore/kwq/KWQFontMetrics.mm
@@ -57,10 +57,6 @@ private:
QFontMetricsPrivate& operator=(const QFontMetricsPrivate&);
};
-QFontMetrics::QFontMetrics()
-{
-}
-
QFontMetrics::QFontMetrics(const QFont &withFont)
: data(new QFontMetricsPrivate(withFont))
{
@@ -114,19 +110,17 @@ int QFontMetrics::width(QChar qc) const
return [data->getRenderer() widthForCharacters:&c length:1];
}
-int QFontMetrics::charWidth(QString &s, int pos) const
+int QFontMetrics::charWidth(const QString &s, int pos) const
{
return width(s[pos]);
}
-
int QFontMetrics::width(char c) const
{
UniChar ch = (uchar) c;
return [data->getRenderer() widthForCharacters:&ch length:1];
}
-
int QFontMetrics::width(const QString &qstring, int len) const
{
NSString *string;
@@ -137,52 +131,40 @@ int QFontMetrics::width(const QString &qstring, int len) const
return [data->getRenderer() widthForString:string];
}
-
int QFontMetrics::width(const QChar *uchars, int len) const
{
return [data->getRenderer() widthForCharacters:(const UniChar *)uchars length:len];
}
-
-float QFontMetrics::floatWidth( QChar *uchars, int slen, int pos, int len ) const
+float QFontMetrics::floatWidth(const QChar *uchars, int slen, int pos, int len) const
{
- return [data->getRenderer() floatWidthForCharacters:(const UniChar *)uchars stringLength:(unsigned)slen fromCharacterPosition: (int)pos numberOfCharacters: (int)len];
+ return [data->getRenderer() floatWidthForCharacters:(const UniChar *)uchars stringLength:slen fromCharacterPosition:pos numberOfCharacters:len];
}
-
-float QFontMetrics::floatCharacterWidth( QChar *uchars, int slen, int pos) const
+float QFontMetrics::floatCharacterWidth(const QChar *uchars, int slen, int pos) const
{
- return [data->getRenderer() floatWidthForCharacters:(const UniChar *)uchars stringLength:(unsigned)slen characterPosition: (int)pos];
+ return [data->getRenderer() floatWidthForCharacters:(const UniChar *)uchars stringLength:slen characterPosition:pos];
}
-
-
QRect QFontMetrics::boundingRect(const QString &qstring, int len) const
{
return QRect(0, 0, width(qstring, len), height());
}
-
QRect QFontMetrics::boundingRect(int x, int y, int width, int height, int flags, const QString &str) const
{
// FIXME: need to support word wrapping?
return QRect(x, y, width, height).intersect(boundingRect(str));
}
-
QRect QFontMetrics::boundingRect(QChar qc) const
{
return QRect(0, 0, width(qc), height());
}
-QSize QFontMetrics::size(int, const QString &qstring, int len, int tabstops,
- int *tabarray, char **intern ) const
+QSize QFontMetrics::size(int, const QString &qstring) const
{
- if (tabstops != 0) {
- KWQDEBUGLEVEL(KWQ_LOG_ERROR, "ERROR: QFontMetrics::size() tabs not supported.\n");
- }
-
- return QSize(width(qstring, len), height());
+ return QSize(width(qstring), height());
}
int QFontMetrics::rightBearing(QChar) const
diff --git a/WebCore/kwq/WebCoreTextRenderer.h b/WebCore/kwq/WebCoreTextRenderer.h
index fb0bb31..379c332 100644
--- a/WebCore/kwq/WebCoreTextRenderer.h
+++ b/WebCore/kwq/WebCoreTextRenderer.h
@@ -27,26 +27,19 @@
@protocol WebCoreTextRenderer <NSObject>
-- (int)widthForString:(NSString *)string;
+// vertical metrics
- (int)ascent;
- (int)descent;
- (int)lineSpacing;
-- (void)drawCharacters:(const UniChar *)characters stringLength: (unsigned int)length fromCharacterPosition: (int)from toCharacterPosition: (int)to atPoint:(NSPoint)point withTextColor:(NSColor *)textColor backgroundColor: (NSColor *)backgroundColor;
-
-- (void)drawString:(NSString *)string atPoint:(NSPoint)point withColor:(NSColor *)color;
-
-- (void)drawUnderlineForString:(NSString *)string atPoint:(NSPoint)point withColor:(NSColor *)color;
-
-- (void)drawString:(NSString *)string inRect:(NSRect)rect withColor:(NSColor *)color paragraphStyle:(NSParagraphStyle *)style;
-
-// A way to bypass NSString for speed.
+// horizontal metrics
+- (int)widthForString:(NSString *)string;
- (int)widthForCharacters:(const UniChar *)characters length:(unsigned)length;
+- (float)floatWidthForCharacters:(const UniChar *)characters stringLength:(unsigned)stringLength fromCharacterPosition:(int)pos numberOfCharacters:(int)len;
+- (float)floatWidthForCharacters:(const UniChar *)characters stringLength:(unsigned)stringLength characterPosition:(int)pos;
-- (float)floatWidthForCharacters:(const UniChar *)characters stringLength:(unsigned)stringLength fromCharacterPosition: (int)pos numberOfCharacters: (int)len;
-
-- (float)floatWidthForCharacters:(const UniChar *)characters stringLength:(unsigned)stringLength characterPosition: (int)pos;
-
-- (int)widthForCharacters:(const UniChar *)characters stringLength:(unsigned)stringLength fromCharacterPosition: (int)pos numberOfCharacters: (int)len;
+// drawing
+- (void)drawCharacters:(const UniChar *)characters stringLength:(unsigned)length fromCharacterPosition:(int)from toCharacterPosition:(int)to atPoint:(NSPoint)point withTextColor:(NSColor *)textColor backgroundColor:(NSColor *)backgroundColor;
+- (void)drawUnderlineForString:(NSString *)string atPoint:(NSPoint)point withColor:(NSColor *)color;
@end
diff --git a/WebCore/kwq/qt/qfontmetrics.h b/WebCore/kwq/qt/qfontmetrics.h
index bcdf581..2084245 100644
--- a/WebCore/kwq/qt/qfontmetrics.h
+++ b/WebCore/kwq/qt/qfontmetrics.h
@@ -36,12 +36,11 @@ class QFontMetricsPrivate;
class QFontMetrics {
public:
-
- QFontMetrics();
QFontMetrics(const QFont &);
+ ~QFontMetrics();
+
QFontMetrics(const QFontMetrics &);
QFontMetrics &operator=(const QFontMetrics &);
- ~QFontMetrics();
int ascent() const;
int descent() const;
@@ -51,17 +50,17 @@ public:
int width(QChar) const;
int width(char) const;
int width(const QString &, int len=-1) const;
- int charWidth(QString &s, int pos) const;
+ int charWidth(const QString &, int pos) const;
int width(const QChar *, int len) const;
- float floatWidth( QChar *uchars, int slen, int pos, int len ) const;
- float floatCharacterWidth( QChar *uchars, int slen, int pos) const;
+ float floatWidth(const QChar *, int slen, int pos, int len) const;
+ float floatCharacterWidth(const QChar *, int slen, int pos) const;
QRect boundingRect(const QString &, int len=-1) const;
QRect boundingRect(QChar) const;
QRect boundingRect(int, int, int, int, int, const QString &) const;
- QSize size(int, const QString &, int len=-1, int tabstops=0,
- int *tabarray=0, char **intern=0 ) const;
+ QSize size(int, const QString &) const;
+
int rightBearing(QChar) const;
int leftBearing(QChar) const;
int baselineOffset() const;
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 71ab392..73ff139 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,9 @@
+2002-07-15 Darin Adler <darin at apple.com>
+
+ * WebCoreSupport.subproj/IFTextRenderer.m:
+ (-[IFTextRenderer widthForCharacters:length:]): Remove implementation of some unused
+ methods, including at least one that was never used.
+
2002-07-15 Maciej Stachowiak <mjs at apple.com>
WebKit part of fix for Radar 2896356 - cookie "ask for each site" not implemented yet
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 71ab392..73ff139 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,9 @@
+2002-07-15 Darin Adler <darin at apple.com>
+
+ * WebCoreSupport.subproj/IFTextRenderer.m:
+ (-[IFTextRenderer widthForCharacters:length:]): Remove implementation of some unused
+ methods, including at least one that was never used.
+
2002-07-15 Maciej Stachowiak <mjs at apple.com>
WebKit part of fix for Radar 2896356 - cookie "ask for each site" not implemented yet
diff --git a/WebKit/WebCoreSupport.subproj/IFTextRenderer.m b/WebKit/WebCoreSupport.subproj/IFTextRenderer.m
index a37031f..7c86764 100644
--- a/WebKit/WebCoreSupport.subproj/IFTextRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/IFTextRenderer.m
@@ -401,29 +401,6 @@ static unsigned int findLengthOfCharacterCluster(const UniChar *characters, unsi
}
-- (void)drawString:(NSString *)string atPoint:(NSPoint)point withColor:(NSColor *)color
-{
- UniChar localCharacterBuffer[LOCAL_BUFFER_SIZE];
- UniChar *characterBuffer = localCharacterBuffer;
- const UniChar *usedCharacterBuffer = CFStringGetCharactersPtr((CFStringRef)string);
- unsigned int length;
-
- // Get the characters from the string into a buffer.
- length = [string length];
- if (!usedCharacterBuffer) {
- if (length > LOCAL_BUFFER_SIZE)
- characterBuffer = (UniChar *)malloc(length * sizeof(UniChar));
- [string getCharacters:characterBuffer];
- usedCharacterBuffer = characterBuffer;
- }
-
- [self drawCharacters: usedCharacterBuffer stringLength: length fromCharacterPosition: 0 toCharacterPosition: length atPoint: point withTextColor: color backgroundColor: nil];
-
- if (characterBuffer != localCharacterBuffer)
- free(characterBuffer);
-}
-
-
- (NSPoint)drawGlyphs: (CGGlyph *)glyphs numGlyphs: (unsigned int)numGlyphs fromGlyphPosition: (int)from toGlyphPosition: (int)to atPoint: (NSPoint)point withTextColor: (NSColor *)textColor backgroundColor: (NSColor *)backgroundColor
{
unsigned int i;
@@ -840,26 +817,9 @@ cleanup:
- (int)widthForCharacters:(const UniChar *)characters length:(unsigned)stringLength
{
- return [self widthForCharacters:characters stringLength:stringLength fromCharacterPosition:0 numberOfCharacters:stringLength];
-}
-
-- (int)widthForCharacters:(const UniChar *)characters stringLength:(unsigned)stringLength fromCharacterPosition: (int)pos numberOfCharacters: (int)len
-{
- return ROUND_TO_INT([self floatWidthForCharacters:characters stringLength:stringLength fromCharacterPosition:pos numberOfCharacters:len applyRounding:YES attemptFontSubstitution: YES]);
+ return ROUND_TO_INT([self floatWidthForCharacters:characters stringLength:stringLength fromCharacterPosition:0 numberOfCharacters:stringLength applyRounding:YES attemptFontSubstitution: YES]);
}
-
-// This method is rarely (never?) called. It's slow.
-- (void)drawString:(NSString *)string inRect:(NSRect)rect withColor:(NSColor *)color paragraphStyle:(NSParagraphStyle *)style
-{
- [string drawInRect:rect withAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
- font, NSFontAttributeName,
- color, NSForegroundColorAttributeName,
- style, NSParagraphStyleAttributeName,
- nil]];
-}
-
-
- (ATSGlyphRef)extendCharacterToGlyphMapToInclude:(UniChar) c
{
GlyphMap *map = (GlyphMap *)calloc (1, sizeof(GlyphMap));
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
index a37031f..7c86764 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
@@ -401,29 +401,6 @@ static unsigned int findLengthOfCharacterCluster(const UniChar *characters, unsi
}
-- (void)drawString:(NSString *)string atPoint:(NSPoint)point withColor:(NSColor *)color
-{
- UniChar localCharacterBuffer[LOCAL_BUFFER_SIZE];
- UniChar *characterBuffer = localCharacterBuffer;
- const UniChar *usedCharacterBuffer = CFStringGetCharactersPtr((CFStringRef)string);
- unsigned int length;
-
- // Get the characters from the string into a buffer.
- length = [string length];
- if (!usedCharacterBuffer) {
- if (length > LOCAL_BUFFER_SIZE)
- characterBuffer = (UniChar *)malloc(length * sizeof(UniChar));
- [string getCharacters:characterBuffer];
- usedCharacterBuffer = characterBuffer;
- }
-
- [self drawCharacters: usedCharacterBuffer stringLength: length fromCharacterPosition: 0 toCharacterPosition: length atPoint: point withTextColor: color backgroundColor: nil];
-
- if (characterBuffer != localCharacterBuffer)
- free(characterBuffer);
-}
-
-
- (NSPoint)drawGlyphs: (CGGlyph *)glyphs numGlyphs: (unsigned int)numGlyphs fromGlyphPosition: (int)from toGlyphPosition: (int)to atPoint: (NSPoint)point withTextColor: (NSColor *)textColor backgroundColor: (NSColor *)backgroundColor
{
unsigned int i;
@@ -840,26 +817,9 @@ cleanup:
- (int)widthForCharacters:(const UniChar *)characters length:(unsigned)stringLength
{
- return [self widthForCharacters:characters stringLength:stringLength fromCharacterPosition:0 numberOfCharacters:stringLength];
-}
-
-- (int)widthForCharacters:(const UniChar *)characters stringLength:(unsigned)stringLength fromCharacterPosition: (int)pos numberOfCharacters: (int)len
-{
- return ROUND_TO_INT([self floatWidthForCharacters:characters stringLength:stringLength fromCharacterPosition:pos numberOfCharacters:len applyRounding:YES attemptFontSubstitution: YES]);
+ return ROUND_TO_INT([self floatWidthForCharacters:characters stringLength:stringLength fromCharacterPosition:0 numberOfCharacters:stringLength applyRounding:YES attemptFontSubstitution: YES]);
}
-
-// This method is rarely (never?) called. It's slow.
-- (void)drawString:(NSString *)string inRect:(NSRect)rect withColor:(NSColor *)color paragraphStyle:(NSParagraphStyle *)style
-{
- [string drawInRect:rect withAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
- font, NSFontAttributeName,
- color, NSForegroundColorAttributeName,
- style, NSParagraphStyleAttributeName,
- nil]];
-}
-
-
- (ATSGlyphRef)extendCharacterToGlyphMapToInclude:(UniChar) c
{
GlyphMap *map = (GlyphMap *)calloc (1, sizeof(GlyphMap));
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list