[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 05:58:54 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 617d5fc7dc3b96e08cd73c97e5acbb24819ecdee
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Mar 26 20:20:41 2002 +0000
* src/kwq/KWQFontMetrics.mm: (-[KWQLayoutInfo dealloc]): Free the
style groups, styles, and glyph vectors.
* src/kwq/KWQFont.mm: (QFont::getFont): Use default font if we can't
find a font from the passed-in family. Before, we were raising an
exception and quitting the application.
* src/kwq/KWQCString.mm: (QCString::isEmpty): Faster version that
doesn't call strlen.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@853 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 9d8aeb9..8845c3f 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,15 @@
+2002-03-26 Darin Adler <darin at apple.com>
+
+ * src/kwq/KWQFontMetrics.mm: (-[KWQLayoutInfo dealloc]): Free the
+ style groups, styles, and glyph vectors.
+
+ * src/kwq/KWQFont.mm: (QFont::getFont): Use default font if we can't
+ find a font from the passed-in family. Before, we were raising an
+ exception and quitting the application.
+
+ * src/kwq/KWQCString.mm: (QCString::isEmpty): Faster version that
+ doesn't call strlen.
+
2002-03-25 Richard Williamson <rjw at apple.com>
Removed conditional check that prevent layout of iframes. I don't
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 9d8aeb9..8845c3f 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,15 @@
+2002-03-26 Darin Adler <darin at apple.com>
+
+ * src/kwq/KWQFontMetrics.mm: (-[KWQLayoutInfo dealloc]): Free the
+ style groups, styles, and glyph vectors.
+
+ * src/kwq/KWQFont.mm: (QFont::getFont): Use default font if we can't
+ find a font from the passed-in family. Before, we were raising an
+ exception and quitting the application.
+
+ * src/kwq/KWQCString.mm: (QCString::isEmpty): Faster version that
+ doesn't call strlen.
+
2002-03-25 Richard Williamson <rjw at apple.com>
Removed conditional check that prevent layout of iframes. I don't
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 9d8aeb9..8845c3f 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,15 @@
+2002-03-26 Darin Adler <darin at apple.com>
+
+ * src/kwq/KWQFontMetrics.mm: (-[KWQLayoutInfo dealloc]): Free the
+ style groups, styles, and glyph vectors.
+
+ * src/kwq/KWQFont.mm: (QFont::getFont): Use default font if we can't
+ find a font from the passed-in family. Before, we were raising an
+ exception and quitting the application.
+
+ * src/kwq/KWQCString.mm: (QCString::isEmpty): Faster version that
+ doesn't call strlen.
+
2002-03-25 Richard Williamson <rjw at apple.com>
Removed conditional check that prevent layout of iframes. I don't
diff --git a/WebCore/kwq/KWQCString.mm b/WebCore/kwq/KWQCString.mm
index f7ccdda..03d51a2 100644
--- a/WebCore/kwq/KWQCString.mm
+++ b/WebCore/kwq/KWQCString.mm
@@ -81,7 +81,8 @@ QCString::QCString(const QCString &s) : QByteArray(s)
bool QCString::isEmpty() const
{
- return length() == 0;
+ const char *s = data();
+ return !(s || *s);
}
bool QCString::isNull() const
@@ -161,7 +162,8 @@ int QCString::contains(char c, bool cs=TRUE) const
uint QCString::length() const
{
- return data() == NULL ? 0 : strlen(data());
+ const char *s = data();
+ return s == NULL ? 0 : strlen(s);
}
bool QCString::resize(uint len)
diff --git a/WebCore/kwq/KWQFont.mm b/WebCore/kwq/KWQFont.mm
index e87b509..b82739d 100644
--- a/WebCore/kwq/KWQFont.mm
+++ b/WebCore/kwq/KWQFont.mm
@@ -165,8 +165,12 @@ NSFont *QFont::getFont()
}
fontKey = [[IFFontCacheKey alloc] initWithString: _family trait: _trait size: _size];
font = [fontCache objectForKey:fontKey];
- if (font == nil){
+ if (font == nil) {
font = [[NSFontManager sharedFontManager] fontWithFamily:_family traits:_trait weight:5 size:_size];
+ if (font == nil) {
+ loadDefaultFont();
+ font = defaultFont;
+ }
[fontCache setObject: font forKey: fontKey];
}
[fontKey release];
diff --git a/WebCore/kwq/KWQFontMetrics.mm b/WebCore/kwq/KWQFontMetrics.mm
index b709f2f..f06ab55 100644
--- a/WebCore/kwq/KWQFontMetrics.mm
+++ b/WebCore/kwq/KWQFontMetrics.mm
@@ -696,7 +696,22 @@ static NSRect _rectForString (KWQLayoutInfo *self, const UniChar *internalBuffer
- (void)dealloc
{
[font release];
-#ifndef DIRECT_TO_CG
+#ifdef DIRECT_TO_CG
+ if (_styleGroup)
+ ATSUDisposeStyleGroup(_styleGroup);
+ if (_style)
+ ATSUDisposeStyle(_style);
+ if (_glyphVector.numAllocatedGlyphs > 0)
+ ATSClearGlyphVector(&_glyphVector);
+ if (_latinStyleGroup)
+ ATSUDisposeStyleGroup(_latinStyleGroup);
+ if (_latinStyle)
+ ATSUDisposeStyle(_latinStyle);
+ if (_latinCacheGlyphVector.numAllocatedGlyphs > 0)
+ ATSClearGlyphVector(&_latinCacheGlyphVector);
+ free(widthCache);
+ free(characterToGlyph);
+#else
[attributes release];
#endif
[super dealloc];
diff --git a/WebCore/src/kwq/KWQCString.mm b/WebCore/src/kwq/KWQCString.mm
index f7ccdda..03d51a2 100644
--- a/WebCore/src/kwq/KWQCString.mm
+++ b/WebCore/src/kwq/KWQCString.mm
@@ -81,7 +81,8 @@ QCString::QCString(const QCString &s) : QByteArray(s)
bool QCString::isEmpty() const
{
- return length() == 0;
+ const char *s = data();
+ return !(s || *s);
}
bool QCString::isNull() const
@@ -161,7 +162,8 @@ int QCString::contains(char c, bool cs=TRUE) const
uint QCString::length() const
{
- return data() == NULL ? 0 : strlen(data());
+ const char *s = data();
+ return s == NULL ? 0 : strlen(s);
}
bool QCString::resize(uint len)
diff --git a/WebCore/src/kwq/KWQFont.mm b/WebCore/src/kwq/KWQFont.mm
index e87b509..b82739d 100644
--- a/WebCore/src/kwq/KWQFont.mm
+++ b/WebCore/src/kwq/KWQFont.mm
@@ -165,8 +165,12 @@ NSFont *QFont::getFont()
}
fontKey = [[IFFontCacheKey alloc] initWithString: _family trait: _trait size: _size];
font = [fontCache objectForKey:fontKey];
- if (font == nil){
+ if (font == nil) {
font = [[NSFontManager sharedFontManager] fontWithFamily:_family traits:_trait weight:5 size:_size];
+ if (font == nil) {
+ loadDefaultFont();
+ font = defaultFont;
+ }
[fontCache setObject: font forKey: fontKey];
}
[fontKey release];
diff --git a/WebCore/src/kwq/KWQFontMetrics.mm b/WebCore/src/kwq/KWQFontMetrics.mm
index b709f2f..f06ab55 100644
--- a/WebCore/src/kwq/KWQFontMetrics.mm
+++ b/WebCore/src/kwq/KWQFontMetrics.mm
@@ -696,7 +696,22 @@ static NSRect _rectForString (KWQLayoutInfo *self, const UniChar *internalBuffer
- (void)dealloc
{
[font release];
-#ifndef DIRECT_TO_CG
+#ifdef DIRECT_TO_CG
+ if (_styleGroup)
+ ATSUDisposeStyleGroup(_styleGroup);
+ if (_style)
+ ATSUDisposeStyle(_style);
+ if (_glyphVector.numAllocatedGlyphs > 0)
+ ATSClearGlyphVector(&_glyphVector);
+ if (_latinStyleGroup)
+ ATSUDisposeStyleGroup(_latinStyleGroup);
+ if (_latinStyle)
+ ATSUDisposeStyle(_latinStyle);
+ if (_latinCacheGlyphVector.numAllocatedGlyphs > 0)
+ ATSClearGlyphVector(&_latinCacheGlyphVector);
+ free(widthCache);
+ free(characterToGlyph);
+#else
[attributes release];
#endif
[super dealloc];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list