[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:57:39 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit f8ed27f70cf604d32ed00d902489fcc916322d77
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Mar 16 01:00:43 2002 +0000
iFixed crasher initializing items in popup button.
Increased fragment cache initial size.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index aab7c25..c74744d 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,15 @@
2002-03-15 Richard Williamson <rjw at apple.com>
+ Fixed crasher initializing items in popup button.
+ Increased fragment cache initial size.
+
+ * src/kwq/KWQComboBox.mm: (QComboBox::init), (QComboBox::~QComboBox),
+ (QComboBox::insertItem):
+ * src/kwq/KWQTextStorage.mm: (-[KWQTextStorage _buildFragmentForString:]):
+ * src/kwq/qt/qcombobox.h:
+
+2002-03-15 Richard Williamson <rjw at apple.com>
+
More string usage optimizations. Got another 10% or so.
* src/kdelibs/khtml/css/cssstyleselector.cpp: (checkPseudoState),
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index aab7c25..c74744d 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,15 @@
2002-03-15 Richard Williamson <rjw at apple.com>
+ Fixed crasher initializing items in popup button.
+ Increased fragment cache initial size.
+
+ * src/kwq/KWQComboBox.mm: (QComboBox::init), (QComboBox::~QComboBox),
+ (QComboBox::insertItem):
+ * src/kwq/KWQTextStorage.mm: (-[KWQTextStorage _buildFragmentForString:]):
+ * src/kwq/qt/qcombobox.h:
+
+2002-03-15 Richard Williamson <rjw at apple.com>
+
More string usage optimizations. Got another 10% or so.
* src/kdelibs/khtml/css/cssstyleselector.cpp: (checkPseudoState),
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index aab7c25..c74744d 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,15 @@
2002-03-15 Richard Williamson <rjw at apple.com>
+ Fixed crasher initializing items in popup button.
+ Increased fragment cache initial size.
+
+ * src/kwq/KWQComboBox.mm: (QComboBox::init), (QComboBox::~QComboBox),
+ (QComboBox::insertItem):
+ * src/kwq/KWQTextStorage.mm: (-[KWQTextStorage _buildFragmentForString:]):
+ * src/kwq/qt/qcombobox.h:
+
+2002-03-15 Richard Williamson <rjw at apple.com>
+
More string usage optimizations. Got another 10% or so.
* src/kdelibs/khtml/css/cssstyleselector.cpp: (checkPseudoState),
diff --git a/WebCore/kwq/KWQComboBox.h b/WebCore/kwq/KWQComboBox.h
index 12b9d63..98ba76b 100644
--- a/WebCore/kwq/KWQComboBox.h
+++ b/WebCore/kwq/KWQComboBox.h
@@ -33,6 +33,16 @@
#include <KWQListBox.h>
#include "qwidget.h"
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#define Fixed MacFixed
+#define Rect MacRect
+#define Boolean MacBoolean
+#import <Cocoa/Cocoa.h>
+#undef Fixed
+#undef Rect
+#undef Boolean
+#endif
+
// class QComboBox =============================================================
class QComboBox : public QWidget {
@@ -77,6 +87,12 @@ private:
#ifdef _KWQ_
void init(bool isEditable);
+
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ NSMutableArray *items;
+#else
+ void *items;
+#endif
#endif
}; // class QComboBox ==========================================================
diff --git a/WebCore/kwq/KWQComboBox.mm b/WebCore/kwq/KWQComboBox.mm
index 3265e85..896e1b2 100644
--- a/WebCore/kwq/KWQComboBox.mm
+++ b/WebCore/kwq/KWQComboBox.mm
@@ -49,11 +49,14 @@ void QComboBox::init(bool isEditable)
//if (isEditable == FALSE)
// [comboBox setEditable: NO];
setView (comboBox);
+
+ items = [[NSMutableArray alloc] init];
}
QComboBox::~QComboBox()
{
+ [items release];
}
@@ -91,9 +94,28 @@ void QComboBox::insertItem(const QString &text, int index)
if (index < 0)
index = count();
+
+ NSMutableArray *newItems;
+ unsigned int i, _count;
+
+ newItems = [[NSMutableArray alloc] init];
+ _count = (index+1 > count()) ? index+1 : count();
+ [comboBox removeAllItems];
+ for (i = 0; i < _count; i++){
+ if (i == (unsigned int)index)
+ [newItems addObject: QSTRING_TO_NSSTRING (text)];
+ else if (i < [items count])
+ [newItems addObject: [items objectAtIndex: i]];
+ else
+ [newItems addObject: @""];
+ [comboBox addItemWithTitle: [NSString stringWithFormat: @"%d", i]];
+ }
// Hack to allow multiple items with same name. Ugh.
- [comboBox insertItemWithTitle: [NSString stringWithFormat: @"%d", index, nil] atIndex: index];
- [[comboBox itemAtIndex: index] setTitle: QSTRING_TO_NSSTRING (text)];
+ for (i = 0; i < _count; i++){
+ [[comboBox itemAtIndex: i] setTitle: [newItems objectAtIndex: i]];
+ }
+ [items release];
+ items = newItems;
}
diff --git a/WebCore/kwq/KWQTextStorage.mm b/WebCore/kwq/KWQTextStorage.mm
index 6df212b..7ec7bab 100644
--- a/WebCore/kwq/KWQTextStorage.mm
+++ b/WebCore/kwq/KWQTextStorage.mm
@@ -53,7 +53,7 @@
NSRect boundingRect;
if (fragmentCache == nil)
- fragmentCache = [[NSMutableDictionary alloc] init];
+ fragmentCache = [[NSMutableDictionary alloc] initWithCapacity: 1024*8];
[self setString: measureString];
diff --git a/WebCore/kwq/qt/qcombobox.h b/WebCore/kwq/qt/qcombobox.h
index 12b9d63..98ba76b 100644
--- a/WebCore/kwq/qt/qcombobox.h
+++ b/WebCore/kwq/qt/qcombobox.h
@@ -33,6 +33,16 @@
#include <KWQListBox.h>
#include "qwidget.h"
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#define Fixed MacFixed
+#define Rect MacRect
+#define Boolean MacBoolean
+#import <Cocoa/Cocoa.h>
+#undef Fixed
+#undef Rect
+#undef Boolean
+#endif
+
// class QComboBox =============================================================
class QComboBox : public QWidget {
@@ -77,6 +87,12 @@ private:
#ifdef _KWQ_
void init(bool isEditable);
+
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ NSMutableArray *items;
+#else
+ void *items;
+#endif
#endif
}; // class QComboBox ==========================================================
diff --git a/WebCore/src/kwq/KWQComboBox.mm b/WebCore/src/kwq/KWQComboBox.mm
index 3265e85..896e1b2 100644
--- a/WebCore/src/kwq/KWQComboBox.mm
+++ b/WebCore/src/kwq/KWQComboBox.mm
@@ -49,11 +49,14 @@ void QComboBox::init(bool isEditable)
//if (isEditable == FALSE)
// [comboBox setEditable: NO];
setView (comboBox);
+
+ items = [[NSMutableArray alloc] init];
}
QComboBox::~QComboBox()
{
+ [items release];
}
@@ -91,9 +94,28 @@ void QComboBox::insertItem(const QString &text, int index)
if (index < 0)
index = count();
+
+ NSMutableArray *newItems;
+ unsigned int i, _count;
+
+ newItems = [[NSMutableArray alloc] init];
+ _count = (index+1 > count()) ? index+1 : count();
+ [comboBox removeAllItems];
+ for (i = 0; i < _count; i++){
+ if (i == (unsigned int)index)
+ [newItems addObject: QSTRING_TO_NSSTRING (text)];
+ else if (i < [items count])
+ [newItems addObject: [items objectAtIndex: i]];
+ else
+ [newItems addObject: @""];
+ [comboBox addItemWithTitle: [NSString stringWithFormat: @"%d", i]];
+ }
// Hack to allow multiple items with same name. Ugh.
- [comboBox insertItemWithTitle: [NSString stringWithFormat: @"%d", index, nil] atIndex: index];
- [[comboBox itemAtIndex: index] setTitle: QSTRING_TO_NSSTRING (text)];
+ for (i = 0; i < _count; i++){
+ [[comboBox itemAtIndex: i] setTitle: [newItems objectAtIndex: i]];
+ }
+ [items release];
+ items = newItems;
}
diff --git a/WebCore/src/kwq/KWQTextStorage.mm b/WebCore/src/kwq/KWQTextStorage.mm
index 6df212b..7ec7bab 100644
--- a/WebCore/src/kwq/KWQTextStorage.mm
+++ b/WebCore/src/kwq/KWQTextStorage.mm
@@ -53,7 +53,7 @@
NSRect boundingRect;
if (fragmentCache == nil)
- fragmentCache = [[NSMutableDictionary alloc] init];
+ fragmentCache = [[NSMutableDictionary alloc] initWithCapacity: 1024*8];
[self setString: measureString];
diff --git a/WebCore/src/kwq/qt/qcombobox.h b/WebCore/src/kwq/qt/qcombobox.h
index 12b9d63..98ba76b 100644
--- a/WebCore/src/kwq/qt/qcombobox.h
+++ b/WebCore/src/kwq/qt/qcombobox.h
@@ -33,6 +33,16 @@
#include <KWQListBox.h>
#include "qwidget.h"
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#define Fixed MacFixed
+#define Rect MacRect
+#define Boolean MacBoolean
+#import <Cocoa/Cocoa.h>
+#undef Fixed
+#undef Rect
+#undef Boolean
+#endif
+
// class QComboBox =============================================================
class QComboBox : public QWidget {
@@ -77,6 +87,12 @@ private:
#ifdef _KWQ_
void init(bool isEditable);
+
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ NSMutableArray *items;
+#else
+ void *items;
+#endif
#endif
}; // class QComboBox ==========================================================
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list