[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 05:50:53 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 3c67565b158adb731aef21345530beac68619f9f
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Oct 19 05:28:34 2001 +0000
Hacks to get khtmlview test to run.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/kwq/KWQFont.h b/WebCore/kwq/KWQFont.h
index 65edd67..618b6ae 100644
--- a/WebCore/kwq/KWQFont.h
+++ b/WebCore/kwq/KWQFont.h
@@ -98,18 +98,12 @@ public:
void _setTrait (NSFontTraitMask mask);
#endif
- // KWQFontData is most likely unnecessary. But we MAY need to get a bit more
- // complicated with the font caching/font metrics. At some point we should
- // decide to do away with the struct and just have direct references to members.
- struct KWQFontData {
#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
NSFont *font;
#else
void *font;
#endif
- } *data;
- void _freeWithData(struct KWQFontData *);
#endif
}; // class QFont ==============================================================
diff --git a/WebCore/kwq/KWQFont.mm b/WebCore/kwq/KWQFont.mm
index 424a41c..87c72f3 100644
--- a/WebCore/kwq/KWQFont.mm
+++ b/WebCore/kwq/KWQFont.mm
@@ -50,20 +50,18 @@ NSFont *QFont::defaultNSFont()
void QFont::_initializeWithFont (const QFont *withFont)
{
- data = (struct KWQFontData *)calloc (1, sizeof (struct KWQFontData));
- if (withFont == 0 || withFont->data == 0)
+ if (withFont == 0)
// Hmm... What size should we use as a default font?
- data->font = [defaultNSFont() retain];
+ font = [defaultNSFont() retain];
else
- data->font = [withFont->data->font retain];
+ font = [withFont->font retain];
}
QFont::QFont(const QFont ©From)
{
- struct KWQFontData *oldData = data;
_initializeWithFont(©From);
- _freeWithData (oldData);
+ _free();
}
@@ -73,16 +71,8 @@ QFont::~QFont()
}
void QFont::_free(){
- _freeWithData (data);
-}
-
-
-void QFont::_freeWithData(struct KWQFontData *freeData){
- if (freeData != 0){
- if (freeData->font != nil)
- [freeData->font release];
- free (freeData);
- }
+ [font release];
+ font = 0;
}
@@ -90,23 +80,23 @@ void QFont::_freeWithData(struct KWQFontData *freeData){
int QFont::pixelSize() const
{
- return (int)[data->font pointSize];
+ return (int)[font pointSize];
}
QString QFont::family() const
{
- return NSSTRING_TO_QSTRING([data->font familyName]);
+ return NSSTRING_TO_QSTRING([font familyName]);
}
void QFont::setFamily(const QString &qfamilyName)
{
NSString *familyName;
- NSFont *oldFont = data->font;
+ NSFont *oldFont = font;
familyName = QSTRING_TO_NSSTRING(qfamilyName);
- data->font = [[[NSFontManager sharedFontManager] convertFont: oldFont toFamily: familyName] retain];
+ font = [[[NSFontManager sharedFontManager] convertFont: oldFont toFamily: familyName] retain];
[oldFont release];
}
@@ -114,9 +104,9 @@ void QFont::setFamily(const QString &qfamilyName)
void QFont::setPixelSizeFloat(float sz)
{
- NSFont *oldFont = data->font;
+ NSFont *oldFont = font;
- data->font = [[[NSFontManager sharedFontManager] convertFont: oldFont toSize: sz] retain];
+ font = [[[NSFontManager sharedFontManager] convertFont: oldFont toSize: sz] retain];
[oldFont release];
}
@@ -133,7 +123,7 @@ void QFont::setWeight(int weight)
int QFont::weight() const
{
- if ([[NSFontManager sharedFontManager] traitsOfFont: data->font] & NSBoldFontMask)
+ if ([[NSFontManager sharedFontManager] traitsOfFont: font] & NSBoldFontMask)
return Bold;
return Normal;
}
@@ -150,7 +140,7 @@ bool QFont::setItalic(bool flag)
bool QFont::italic() const
{
- if ([[NSFontManager sharedFontManager] traitsOfFont: data->font] & NSItalicFontMask)
+ if ([[NSFontManager sharedFontManager] traitsOfFont: font] & NSItalicFontMask)
return TRUE;
return FALSE;
}
@@ -158,7 +148,7 @@ bool QFont::italic() const
bool QFont::bold() const
{
- if ([[NSFontManager sharedFontManager] traitsOfFont: data->font] & NSItalicFontMask)
+ if ([[NSFontManager sharedFontManager] traitsOfFont: font] & NSItalicFontMask)
return TRUE;
return FALSE;
}
@@ -176,7 +166,7 @@ QFont &QFont::operator=(const QFont &assignFrom)
bool QFont::operator==(const QFont &compareFont) const
{
- return [compareFont.data->font isEqual: data->font];
+ return [compareFont.font isEqual: font];
}
@@ -188,9 +178,9 @@ bool QFont::operator!=(const QFont &compareFont) const
void QFont::_setTrait (NSFontTraitMask mask)
{
- NSFont *oldFont = data->font;
+ NSFont *oldFont = font;
- data->font = [[[NSFontManager sharedFontManager] convertFont: data->font toHaveTrait: mask] retain];
+ font = [[[NSFontManager sharedFontManager] convertFont: oldFont toHaveTrait: mask] retain];
[oldFont release];
}
diff --git a/WebCore/kwq/KWQFontMetrics.mm b/WebCore/kwq/KWQFontMetrics.mm
index 8cb322f..5eca248 100644
--- a/WebCore/kwq/KWQFontMetrics.mm
+++ b/WebCore/kwq/KWQFontMetrics.mm
@@ -34,7 +34,7 @@ QFontMetrics::QFontMetrics()
QFontMetrics::QFontMetrics(const QFont &withFont)
{
- _initializeWithFont (withFont.data->font);
+ _initializeWithFont (withFont.font);
}
@@ -54,7 +54,7 @@ void QFontMetrics::_initializeWithFont (NSFont *withFont)
{
data = (struct KWQFontMetricsData *)calloc (1, sizeof (struct KWQFontMetricsData));
if (withFont == 0)
- data->font = QFont::defaultNSFont();
+ data->font = [QFont::defaultNSFont() retain];
else
data->font = [withFont retain];
}
@@ -66,8 +66,8 @@ void QFontMetrics::_free(){
void QFontMetrics::_freeWithData(struct KWQFontMetricsData *freeData){
if (freeData != 0){
- [freeData->font release];
- free (freeData);
+ //[freeData->font release];
+ //free (freeData);
}
}
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 2693b6d..f5d3850 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -512,7 +512,7 @@ void KHTMLPart::setFontSizes(const QValueList<int> &newFontSizes )
QValueList<int> KHTMLPart::fontSizes() const
{
- _logNeverImplemented();
+ return d->m_settings->fontSizes();
}
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index 2693b6d..f5d3850 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -512,7 +512,7 @@ void KHTMLPart::setFontSizes(const QValueList<int> &newFontSizes )
QValueList<int> KHTMLPart::fontSizes() const
{
- _logNeverImplemented();
+ return d->m_settings->fontSizes();
}
diff --git a/WebCore/kwq/KWQPainter.mm b/WebCore/kwq/KWQPainter.mm
index 5fea92d..861a22e 100644
--- a/WebCore/kwq/KWQPainter.mm
+++ b/WebCore/kwq/KWQPainter.mm
@@ -45,6 +45,7 @@ typedef QStack<QPState> QPStateStack;
QPainter::QPainter()
{
+ _initialize(0);
}
diff --git a/WebCore/kwq/KWQScrollView.mm b/WebCore/kwq/KWQScrollView.mm
index 1536026..d16c89a 100644
--- a/WebCore/kwq/KWQScrollView.mm
+++ b/WebCore/kwq/KWQScrollView.mm
@@ -56,37 +56,43 @@ QWidget* QScrollView::viewport() const
int QScrollView::visibleWidth() const
{
- _logNeverImplemented();
+ //_logNeverImplemented();
+ return 0;
}
int QScrollView::visibleHeight() const
{
- _logNeverImplemented();
+ //_logNeverImplemented();
+ return 0;
}
int QScrollView::contentsWidth() const
{
_logNeverImplemented();
+ return 0;
}
int QScrollView::contentsHeight() const
{
_logNeverImplemented();
+ return 0;
}
int QScrollView::contentsX() const
{
_logNeverImplemented();
+ return 0;
}
int QScrollView::contentsY() const
{
_logNeverImplemented();
+ return 0;
}
@@ -149,13 +155,13 @@ void QScrollView::removeChild(QWidget* child)
void QScrollView::resizeContents(int w, int h)
{
- _logNeverImplemented();
+ //_logNeverImplemented();
}
void QScrollView::updateContents(int x, int y, int w, int h)
{
- _logNeverImplemented();
+ //_logNeverImplemented();
}
diff --git a/WebCore/kwq/qt/qfont.h b/WebCore/kwq/qt/qfont.h
index 65edd67..618b6ae 100644
--- a/WebCore/kwq/qt/qfont.h
+++ b/WebCore/kwq/qt/qfont.h
@@ -98,18 +98,12 @@ public:
void _setTrait (NSFontTraitMask mask);
#endif
- // KWQFontData is most likely unnecessary. But we MAY need to get a bit more
- // complicated with the font caching/font metrics. At some point we should
- // decide to do away with the struct and just have direct references to members.
- struct KWQFontData {
#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
NSFont *font;
#else
void *font;
#endif
- } *data;
- void _freeWithData(struct KWQFontData *);
#endif
}; // class QFont ==============================================================
diff --git a/WebCore/kwq/tests/khtmlview/WebViewTest/English.lproj/MainMenu.nib/objects.nib b/WebCore/kwq/tests/khtmlview/WebViewTest/English.lproj/MainMenu.nib/objects.nib
index 02b43d0..08667d4 100644
Binary files a/WebCore/kwq/tests/khtmlview/WebViewTest/English.lproj/MainMenu.nib/objects.nib and b/WebCore/kwq/tests/khtmlview/WebViewTest/English.lproj/MainMenu.nib/objects.nib differ
diff --git a/WebCore/src/kwq/KWQFont.mm b/WebCore/src/kwq/KWQFont.mm
index 424a41c..87c72f3 100644
--- a/WebCore/src/kwq/KWQFont.mm
+++ b/WebCore/src/kwq/KWQFont.mm
@@ -50,20 +50,18 @@ NSFont *QFont::defaultNSFont()
void QFont::_initializeWithFont (const QFont *withFont)
{
- data = (struct KWQFontData *)calloc (1, sizeof (struct KWQFontData));
- if (withFont == 0 || withFont->data == 0)
+ if (withFont == 0)
// Hmm... What size should we use as a default font?
- data->font = [defaultNSFont() retain];
+ font = [defaultNSFont() retain];
else
- data->font = [withFont->data->font retain];
+ font = [withFont->font retain];
}
QFont::QFont(const QFont ©From)
{
- struct KWQFontData *oldData = data;
_initializeWithFont(©From);
- _freeWithData (oldData);
+ _free();
}
@@ -73,16 +71,8 @@ QFont::~QFont()
}
void QFont::_free(){
- _freeWithData (data);
-}
-
-
-void QFont::_freeWithData(struct KWQFontData *freeData){
- if (freeData != 0){
- if (freeData->font != nil)
- [freeData->font release];
- free (freeData);
- }
+ [font release];
+ font = 0;
}
@@ -90,23 +80,23 @@ void QFont::_freeWithData(struct KWQFontData *freeData){
int QFont::pixelSize() const
{
- return (int)[data->font pointSize];
+ return (int)[font pointSize];
}
QString QFont::family() const
{
- return NSSTRING_TO_QSTRING([data->font familyName]);
+ return NSSTRING_TO_QSTRING([font familyName]);
}
void QFont::setFamily(const QString &qfamilyName)
{
NSString *familyName;
- NSFont *oldFont = data->font;
+ NSFont *oldFont = font;
familyName = QSTRING_TO_NSSTRING(qfamilyName);
- data->font = [[[NSFontManager sharedFontManager] convertFont: oldFont toFamily: familyName] retain];
+ font = [[[NSFontManager sharedFontManager] convertFont: oldFont toFamily: familyName] retain];
[oldFont release];
}
@@ -114,9 +104,9 @@ void QFont::setFamily(const QString &qfamilyName)
void QFont::setPixelSizeFloat(float sz)
{
- NSFont *oldFont = data->font;
+ NSFont *oldFont = font;
- data->font = [[[NSFontManager sharedFontManager] convertFont: oldFont toSize: sz] retain];
+ font = [[[NSFontManager sharedFontManager] convertFont: oldFont toSize: sz] retain];
[oldFont release];
}
@@ -133,7 +123,7 @@ void QFont::setWeight(int weight)
int QFont::weight() const
{
- if ([[NSFontManager sharedFontManager] traitsOfFont: data->font] & NSBoldFontMask)
+ if ([[NSFontManager sharedFontManager] traitsOfFont: font] & NSBoldFontMask)
return Bold;
return Normal;
}
@@ -150,7 +140,7 @@ bool QFont::setItalic(bool flag)
bool QFont::italic() const
{
- if ([[NSFontManager sharedFontManager] traitsOfFont: data->font] & NSItalicFontMask)
+ if ([[NSFontManager sharedFontManager] traitsOfFont: font] & NSItalicFontMask)
return TRUE;
return FALSE;
}
@@ -158,7 +148,7 @@ bool QFont::italic() const
bool QFont::bold() const
{
- if ([[NSFontManager sharedFontManager] traitsOfFont: data->font] & NSItalicFontMask)
+ if ([[NSFontManager sharedFontManager] traitsOfFont: font] & NSItalicFontMask)
return TRUE;
return FALSE;
}
@@ -176,7 +166,7 @@ QFont &QFont::operator=(const QFont &assignFrom)
bool QFont::operator==(const QFont &compareFont) const
{
- return [compareFont.data->font isEqual: data->font];
+ return [compareFont.font isEqual: font];
}
@@ -188,9 +178,9 @@ bool QFont::operator!=(const QFont &compareFont) const
void QFont::_setTrait (NSFontTraitMask mask)
{
- NSFont *oldFont = data->font;
+ NSFont *oldFont = font;
- data->font = [[[NSFontManager sharedFontManager] convertFont: data->font toHaveTrait: mask] retain];
+ font = [[[NSFontManager sharedFontManager] convertFont: oldFont toHaveTrait: mask] retain];
[oldFont release];
}
diff --git a/WebCore/src/kwq/KWQFontMetrics.mm b/WebCore/src/kwq/KWQFontMetrics.mm
index 8cb322f..5eca248 100644
--- a/WebCore/src/kwq/KWQFontMetrics.mm
+++ b/WebCore/src/kwq/KWQFontMetrics.mm
@@ -34,7 +34,7 @@ QFontMetrics::QFontMetrics()
QFontMetrics::QFontMetrics(const QFont &withFont)
{
- _initializeWithFont (withFont.data->font);
+ _initializeWithFont (withFont.font);
}
@@ -54,7 +54,7 @@ void QFontMetrics::_initializeWithFont (NSFont *withFont)
{
data = (struct KWQFontMetricsData *)calloc (1, sizeof (struct KWQFontMetricsData));
if (withFont == 0)
- data->font = QFont::defaultNSFont();
+ data->font = [QFont::defaultNSFont() retain];
else
data->font = [withFont retain];
}
@@ -66,8 +66,8 @@ void QFontMetrics::_free(){
void QFontMetrics::_freeWithData(struct KWQFontMetricsData *freeData){
if (freeData != 0){
- [freeData->font release];
- free (freeData);
+ //[freeData->font release];
+ //free (freeData);
}
}
diff --git a/WebCore/src/kwq/KWQKHTMLPart.mm b/WebCore/src/kwq/KWQKHTMLPart.mm
index 2693b6d..f5d3850 100644
--- a/WebCore/src/kwq/KWQKHTMLPart.mm
+++ b/WebCore/src/kwq/KWQKHTMLPart.mm
@@ -512,7 +512,7 @@ void KHTMLPart::setFontSizes(const QValueList<int> &newFontSizes )
QValueList<int> KHTMLPart::fontSizes() const
{
- _logNeverImplemented();
+ return d->m_settings->fontSizes();
}
diff --git a/WebCore/src/kwq/KWQPainter.mm b/WebCore/src/kwq/KWQPainter.mm
index 5fea92d..861a22e 100644
--- a/WebCore/src/kwq/KWQPainter.mm
+++ b/WebCore/src/kwq/KWQPainter.mm
@@ -45,6 +45,7 @@ typedef QStack<QPState> QPStateStack;
QPainter::QPainter()
{
+ _initialize(0);
}
diff --git a/WebCore/src/kwq/KWQScrollView.mm b/WebCore/src/kwq/KWQScrollView.mm
index 1536026..d16c89a 100644
--- a/WebCore/src/kwq/KWQScrollView.mm
+++ b/WebCore/src/kwq/KWQScrollView.mm
@@ -56,37 +56,43 @@ QWidget* QScrollView::viewport() const
int QScrollView::visibleWidth() const
{
- _logNeverImplemented();
+ //_logNeverImplemented();
+ return 0;
}
int QScrollView::visibleHeight() const
{
- _logNeverImplemented();
+ //_logNeverImplemented();
+ return 0;
}
int QScrollView::contentsWidth() const
{
_logNeverImplemented();
+ return 0;
}
int QScrollView::contentsHeight() const
{
_logNeverImplemented();
+ return 0;
}
int QScrollView::contentsX() const
{
_logNeverImplemented();
+ return 0;
}
int QScrollView::contentsY() const
{
_logNeverImplemented();
+ return 0;
}
@@ -149,13 +155,13 @@ void QScrollView::removeChild(QWidget* child)
void QScrollView::resizeContents(int w, int h)
{
- _logNeverImplemented();
+ //_logNeverImplemented();
}
void QScrollView::updateContents(int x, int y, int w, int h)
{
- _logNeverImplemented();
+ //_logNeverImplemented();
}
diff --git a/WebCore/src/kwq/qt/qfont.h b/WebCore/src/kwq/qt/qfont.h
index 65edd67..618b6ae 100644
--- a/WebCore/src/kwq/qt/qfont.h
+++ b/WebCore/src/kwq/qt/qfont.h
@@ -98,18 +98,12 @@ public:
void _setTrait (NSFontTraitMask mask);
#endif
- // KWQFontData is most likely unnecessary. But we MAY need to get a bit more
- // complicated with the font caching/font metrics. At some point we should
- // decide to do away with the struct and just have direct references to members.
- struct KWQFontData {
#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
NSFont *font;
#else
void *font;
#endif
- } *data;
- void _freeWithData(struct KWQFontData *);
#endif
}; // class QFont ==============================================================
diff --git a/WebCore/src/kwq/tests/khtmlview/WebViewTest/English.lproj/MainMenu.nib/objects.nib b/WebCore/src/kwq/tests/khtmlview/WebViewTest/English.lproj/MainMenu.nib/objects.nib
index 02b43d0..08667d4 100644
Binary files a/WebCore/src/kwq/tests/khtmlview/WebViewTest/English.lproj/MainMenu.nib/objects.nib and b/WebCore/src/kwq/tests/khtmlview/WebViewTest/English.lproj/MainMenu.nib/objects.nib differ
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list