[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:32:57 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 18569433f448bec6a3392d32194eb47e89a92300
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 20 19:15:51 2002 +0000

    WebCore:
    
    	WebCore part of support for tabbing into and out of the toolbar.
    
            * kwq/KWQKHTMLPartImpl.h: Renamed static nextKeyView to nextKeyViewForWidget.
    	Added nextKeyViewInFrameHierarchy.
            * kwq/KWQKHTMLPartImpl.mm:
            (KWQKHTMLPartImpl::nextKeyViewInFrameHierarchy): New name for the old nextKeyView.
            (KWQKHTMLPartImpl::nextKeyView): Added. Does all the logic for handling views outside
    	the frame hierarchy that used to be only in the static nextKeyView.
            (KWQKHTMLPartImpl::nextKeyViewForWidget): New name for the static nextKeyView, which
    	now just does the widget-specific bits. Removed null check in here that's no longer needed.
    
            * kwq/KWQNSTextField.mm: Update to call nextKeyViewForWidget.
    
            * kwq/WebCoreBridge.h: Added nextKeyViewInsideWebViews, previousKeyViewInsideWebViews,
    	nextKeyViewOutsideWebViews, and previousKeyViewOutsideWebViews.
    
            * kwq/WebCoreBridge.mm:
            (-[WebCoreBridge nextKeyViewInsideWebViews]): Call nextKeyViewInFrameHierarchy.
            (-[WebCoreBridge previousKeyViewInsideWebViews]): Call nextKeyViewInFrameHierarchy.
    
    	Introduced QString to sprong. See <http://www.goat.demon.co.uk/sprong.html>.
    	A few other tweaks to QString API; wean it from mutable strings.
    
            * kwq/qt/qstring.h:
            * kwq/KWQString.mm: Sprongify it.
            (QString::setBufferFromCFString): Add a fixed-size buffer to avoid malloc.
            (QString::getCFString): Replace getCFMutableString with this.
            (QString::getNSString): Use NSString directly.
    
            * kwq/KWQDictImpl.mm:
            * kwq/KWQKURL.mm:
            * kwq/KWQStringList.mm:
            * kwq/KWQtextcodec.mm:
            * kwq/WebCoreBridge.mm:
    	Use getCFString, not getCFMutableString.
    
    WebKit:
    
    	WebKit part of support for tabbing into and out of the toolbar.
    
            * WebCoreSupport.subproj/WebBridge.m:
            (-[WebBridge nextKeyViewOutsideWebViews]): Ask the main WebView for its
    	nextKeyView on behalf of WebCore.
            (-[WebBridge previousKeyViewOutsideWebViews]): Ask the main WebView for its
    	previousKeyView on behalf of WebCore.
    
            * WebView.subproj/WebHTMLView.m: (-[WebHTMLView becomeFirstResponder]):
    	When we are being tabbed-into, make the first or last view in the bridge
    	first responder, instead of taking it ourselves.
    
            * WebView.subproj/WebView.m: (-[WebView becomeFirstResponder]):
    	Always make the document view the first responder instead of taking it
    	ourselves.
    
    WebBrowser:
    
    	- fixed 2868093 -- Can't tab between toolbar items and main view
    
            * BrowserWindowController.m:
            (-[BrowserWindowController dealloc]): Cancel lingering perform requests.
    	Good for the new one I added, but also for the status one.
            (-[BrowserWindowController clearStatus]): Don't bother calling centerTruncateString on @"".
            (-[BrowserWindowController leftmostToolbarKeyboardLoopItem]): Added. part of hack to make
    	the toolbar loop stitch together with the rest of the views.
            (-[BrowserWindowController rebuildKeyboardLoop]): Added. Adds the web view into the keyboard
    	loop along with the toolbar.
            (-[BrowserWindowController windowShouldRebuildKeyboardLoopSoon:]): Schedules a call to
    	rebuildKeyboardLoop. We don't do the work right away because we need to wait until the toolbar
    	is done with its loop calculations.
    
            * TextField.h: New methods for the window delegate.
            * TextField.m:
            (-[TextField windowShouldRebuildKeyboardLoopSoon]): Call windowShouldRebuildKeyboardLoopSoon
    	on the window delegate.
            (-[TextField setNextKeyView:]): Call windowShouldRebuildKeyboardLoopSoon because a change in
    	our next key view means that the toolbar is wiring up the keyboard loop.
            (-[TextField viewDidMoveToWindow]): Call windowShouldRebuildKeyboardLoopSoon because we are
    	going back on screen, which means that the toolbar is likely coming back.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1876 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index e25b3d0..63e8813 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,8 +1,46 @@
+2002-08-20  Darin Adler  <darin at apple.com>
+
+	WebCore part of support for tabbing into and out of the toolbar.
+
+        * kwq/KWQKHTMLPartImpl.h: Renamed static nextKeyView to nextKeyViewForWidget.
+	Added nextKeyViewInFrameHierarchy.
+        * kwq/KWQKHTMLPartImpl.mm:
+        (KWQKHTMLPartImpl::nextKeyViewInFrameHierarchy): New name for the old nextKeyView.
+        (KWQKHTMLPartImpl::nextKeyView): Added. Does all the logic for handling views outside
+	the frame hierarchy that used to be only in the static nextKeyView.
+        (KWQKHTMLPartImpl::nextKeyViewForWidget): New name for the static nextKeyView, which
+	now just does the widget-specific bits. Removed null check in here that's no longer needed.
+
+        * kwq/KWQNSTextField.mm: Update to call nextKeyViewForWidget.
+
+        * kwq/WebCoreBridge.h: Added nextKeyViewInsideWebViews, previousKeyViewInsideWebViews,
+	nextKeyViewOutsideWebViews, and previousKeyViewOutsideWebViews.
+
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge nextKeyViewInsideWebViews]): Call nextKeyViewInFrameHierarchy.
+        (-[WebCoreBridge previousKeyViewInsideWebViews]): Call nextKeyViewInFrameHierarchy.
+
+	Introduced QString to sprong. See <http://www.goat.demon.co.uk/sprong.html>.
+	A few other tweaks to QString API; wean it from mutable strings.
+
+        * kwq/qt/qstring.h:
+        * kwq/KWQString.mm: Sprongify it.
+        (QString::setBufferFromCFString): Add a fixed-size buffer to avoid malloc.
+        (QString::getCFString): Replace getCFMutableString with this.
+        (QString::getNSString): Use NSString directly.
+
+        * kwq/KWQDictImpl.mm:
+        * kwq/KWQKURL.mm:
+        * kwq/KWQStringList.mm:
+        * kwq/KWQtextcodec.mm:
+        * kwq/WebCoreBridge.mm:
+	Use getCFString, not getCFMutableString.
+
 2002-08-19  Darin Adler  <darin at apple.com>
 
         * force-clean-timestamp: Richard's changes require a clean build.
 
-2002-08-19  Richard Williamson (Local)  <rjw at apple.com>
+2002-08-19  Richard Williamson  <rjw at apple.com>
 
         QString rewrite.  Much faster now.
         QString has an inline rep, QStringData, which
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index e25b3d0..63e8813 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,8 +1,46 @@
+2002-08-20  Darin Adler  <darin at apple.com>
+
+	WebCore part of support for tabbing into and out of the toolbar.
+
+        * kwq/KWQKHTMLPartImpl.h: Renamed static nextKeyView to nextKeyViewForWidget.
+	Added nextKeyViewInFrameHierarchy.
+        * kwq/KWQKHTMLPartImpl.mm:
+        (KWQKHTMLPartImpl::nextKeyViewInFrameHierarchy): New name for the old nextKeyView.
+        (KWQKHTMLPartImpl::nextKeyView): Added. Does all the logic for handling views outside
+	the frame hierarchy that used to be only in the static nextKeyView.
+        (KWQKHTMLPartImpl::nextKeyViewForWidget): New name for the static nextKeyView, which
+	now just does the widget-specific bits. Removed null check in here that's no longer needed.
+
+        * kwq/KWQNSTextField.mm: Update to call nextKeyViewForWidget.
+
+        * kwq/WebCoreBridge.h: Added nextKeyViewInsideWebViews, previousKeyViewInsideWebViews,
+	nextKeyViewOutsideWebViews, and previousKeyViewOutsideWebViews.
+
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge nextKeyViewInsideWebViews]): Call nextKeyViewInFrameHierarchy.
+        (-[WebCoreBridge previousKeyViewInsideWebViews]): Call nextKeyViewInFrameHierarchy.
+
+	Introduced QString to sprong. See <http://www.goat.demon.co.uk/sprong.html>.
+	A few other tweaks to QString API; wean it from mutable strings.
+
+        * kwq/qt/qstring.h:
+        * kwq/KWQString.mm: Sprongify it.
+        (QString::setBufferFromCFString): Add a fixed-size buffer to avoid malloc.
+        (QString::getCFString): Replace getCFMutableString with this.
+        (QString::getNSString): Use NSString directly.
+
+        * kwq/KWQDictImpl.mm:
+        * kwq/KWQKURL.mm:
+        * kwq/KWQStringList.mm:
+        * kwq/KWQtextcodec.mm:
+        * kwq/WebCoreBridge.mm:
+	Use getCFString, not getCFMutableString.
+
 2002-08-19  Darin Adler  <darin at apple.com>
 
         * force-clean-timestamp: Richard's changes require a clean build.
 
-2002-08-19  Richard Williamson (Local)  <rjw at apple.com>
+2002-08-19  Richard Williamson  <rjw at apple.com>
 
         QString rewrite.  Much faster now.
         QString has an inline rep, QStringData, which
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index e25b3d0..63e8813 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,8 +1,46 @@
+2002-08-20  Darin Adler  <darin at apple.com>
+
+	WebCore part of support for tabbing into and out of the toolbar.
+
+        * kwq/KWQKHTMLPartImpl.h: Renamed static nextKeyView to nextKeyViewForWidget.
+	Added nextKeyViewInFrameHierarchy.
+        * kwq/KWQKHTMLPartImpl.mm:
+        (KWQKHTMLPartImpl::nextKeyViewInFrameHierarchy): New name for the old nextKeyView.
+        (KWQKHTMLPartImpl::nextKeyView): Added. Does all the logic for handling views outside
+	the frame hierarchy that used to be only in the static nextKeyView.
+        (KWQKHTMLPartImpl::nextKeyViewForWidget): New name for the static nextKeyView, which
+	now just does the widget-specific bits. Removed null check in here that's no longer needed.
+
+        * kwq/KWQNSTextField.mm: Update to call nextKeyViewForWidget.
+
+        * kwq/WebCoreBridge.h: Added nextKeyViewInsideWebViews, previousKeyViewInsideWebViews,
+	nextKeyViewOutsideWebViews, and previousKeyViewOutsideWebViews.
+
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge nextKeyViewInsideWebViews]): Call nextKeyViewInFrameHierarchy.
+        (-[WebCoreBridge previousKeyViewInsideWebViews]): Call nextKeyViewInFrameHierarchy.
+
+	Introduced QString to sprong. See <http://www.goat.demon.co.uk/sprong.html>.
+	A few other tweaks to QString API; wean it from mutable strings.
+
+        * kwq/qt/qstring.h:
+        * kwq/KWQString.mm: Sprongify it.
+        (QString::setBufferFromCFString): Add a fixed-size buffer to avoid malloc.
+        (QString::getCFString): Replace getCFMutableString with this.
+        (QString::getNSString): Use NSString directly.
+
+        * kwq/KWQDictImpl.mm:
+        * kwq/KWQKURL.mm:
+        * kwq/KWQStringList.mm:
+        * kwq/KWQtextcodec.mm:
+        * kwq/WebCoreBridge.mm:
+	Use getCFString, not getCFMutableString.
+
 2002-08-19  Darin Adler  <darin at apple.com>
 
         * force-clean-timestamp: Richard's changes require a clean build.
 
-2002-08-19  Richard Williamson (Local)  <rjw at apple.com>
+2002-08-19  Richard Williamson  <rjw at apple.com>
 
         QString rewrite.  Much faster now.
         QString has an inline rep, QStringData, which
diff --git a/WebCore/kwq/KWQDictImpl.mm b/WebCore/kwq/KWQDictImpl.mm
index 9ba2050..0b0bb91 100644
--- a/WebCore/kwq/KWQDictImpl.mm
+++ b/WebCore/kwq/KWQDictImpl.mm
@@ -33,17 +33,17 @@ KWQDictImpl::KWQDictImpl(int size, bool caseSensitive, void (*deleteFunc)(void *
 
 void KWQDictImpl::insert(const QString &key, const void *value)
 {
-    KWQPtrDictImpl::insert(key.getCFMutableString(), value);
+    KWQPtrDictImpl::insert((void *)key.getCFString(), value);
 }
 
 bool KWQDictImpl::remove(const QString &key, bool deleteItem)
 {
-    return KWQPtrDictImpl::remove(key.getCFMutableString(), deleteItem);
+    return KWQPtrDictImpl::remove((void *)key.getCFString(), deleteItem);
 }
 
 void *KWQDictImpl::find(const QString &key) const
 {
-    return KWQPtrDictImpl::find(key.getCFMutableString());
+    return KWQPtrDictImpl::find((void *)key.getCFString());
 }
 
 QString KWQDictIteratorImpl::currentStringKey() const
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index 483c01c..1b43940 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -104,8 +104,9 @@ public:
     
     QString userAgent() const;
     
-    static NSView *nextKeyView(QWidget *startingPoint, KWQSelectionDirection);
     NSView *nextKeyView(DOM::NodeImpl *startingPoint, KWQSelectionDirection);
+    NSView *nextKeyViewInFrameHierarchy(DOM::NodeImpl *startingPoint, KWQSelectionDirection);
+    static NSView *nextKeyViewForWidget(QWidget *startingPoint, KWQSelectionDirection);
     
     // Incoming calls, used by the bridge.
     
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 44fa026..75239df 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -555,8 +555,7 @@ NSView *KWQKHTMLPartImpl::nextKeyViewInFrame(NodeImpl *node, KWQSelectionDirecti
             KHTMLView *childFrameWidget = dynamic_cast<KHTMLView *>(widget);
             NSView *view;
             if (childFrameWidget) {
-                NodeImpl *nullNode = 0;
-                view = childFrameWidget->part()->impl->nextKeyViewInFrame(nullNode, direction);
+                view = childFrameWidget->part()->impl->nextKeyViewInFrame(0, direction);
             } else {
                 view = widget->getView();
             }
@@ -567,7 +566,7 @@ NSView *KWQKHTMLPartImpl::nextKeyViewInFrame(NodeImpl *node, KWQSelectionDirecti
     }
 }
 
-NSView *KWQKHTMLPartImpl::nextKeyView(NodeImpl *node, KWQSelectionDirection direction)
+NSView *KWQKHTMLPartImpl::nextKeyViewInFrameHierarchy(NodeImpl *node, KWQSelectionDirection direction)
 {
     NSView *next = nextKeyViewInFrame(node, direction);
     if (next) {
@@ -585,40 +584,30 @@ NSView *KWQKHTMLPartImpl::nextKeyView(NodeImpl *node, KWQSelectionDirection dire
     return nil;
 }
 
-NSView *KWQKHTMLPartImpl::nextKeyView(QWidget *startingWidget, KWQSelectionDirection direction)
+NSView *KWQKHTMLPartImpl::nextKeyView(NodeImpl *node, KWQSelectionDirection direction)
 {
-    // The only time the starting widget should be 0 is when we are deallocating a view.
-    // In that case, we return nil to prevent AppKit from going astray trying to remove us from a key view loop.
-    if (!startingWidget) {
-        return nil;
-    }
-    
-    // Use the event filter object to figure out which RenderWidget owns this QWidget and get to the DOM.
-    // Then get the next key view in the order determined by the DOM.
-    NodeImpl *node = static_cast<const RenderWidget *>(startingWidget->eventFilterObject())->element();
-    KHTMLPart *part = node->getDocument()->view()->part();
-    NSView *next = part->impl->nextKeyView(node, direction);
+    NSView *next = nextKeyViewInFrameHierarchy(node, direction);
     if (next) {
         return next;
     }
 
-    // If we are the last key view, then go up to the top level part.
-    KHTMLPart *parentPart;
-    while ((parentPart = part->parentPart())) {
-        part = parentPart;
-    }
-    
-#if 0
     // Look at views from the top level part up, looking for a next key view that we can use.
-    for (NSView *view = part->widget()->getView(); view; view = [view superview]) {
-        next = direction == KWQSelectingNext ? [view nextKeyView] : [view previousKeyView];
-        if (next) {
-            return next;
-        }
+    next = direction == KWQSelectingNext
+        ? [_bridge nextKeyViewOutsideWebViews]
+        : [_bridge previousKeyViewOutsideWebViews];
+    if (next) {
+        return next;
     }
-#endif
     
     // If all else fails, make a loop by starting from 0.
-    NodeImpl *nullNode = 0;
-    return part->impl->nextKeyView(nullNode, direction);
+    printf("got all the way down to nextKeyViewInFrameHierarchy\n");
+    return nextKeyViewInFrameHierarchy(0, direction);
+}
+
+NSView *KWQKHTMLPartImpl::nextKeyViewForWidget(QWidget *startingWidget, KWQSelectionDirection direction)
+{
+    // Use the event filter object to figure out which RenderWidget owns this QWidget and get to the DOM.
+    // Then get the next key view in the order determined by the DOM.
+    NodeImpl *node = static_cast<const RenderWidget *>(startingWidget->eventFilterObject())->element();
+    return node->getDocument()->view()->part()->impl->nextKeyView(node, direction);
 }
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.h b/WebCore/kwq/KWQKHTMLPartImpl.h
index 483c01c..1b43940 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.h
+++ b/WebCore/kwq/KWQKHTMLPartImpl.h
@@ -104,8 +104,9 @@ public:
     
     QString userAgent() const;
     
-    static NSView *nextKeyView(QWidget *startingPoint, KWQSelectionDirection);
     NSView *nextKeyView(DOM::NodeImpl *startingPoint, KWQSelectionDirection);
+    NSView *nextKeyViewInFrameHierarchy(DOM::NodeImpl *startingPoint, KWQSelectionDirection);
+    static NSView *nextKeyViewForWidget(QWidget *startingPoint, KWQSelectionDirection);
     
     // Incoming calls, used by the bridge.
     
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index 44fa026..75239df 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -555,8 +555,7 @@ NSView *KWQKHTMLPartImpl::nextKeyViewInFrame(NodeImpl *node, KWQSelectionDirecti
             KHTMLView *childFrameWidget = dynamic_cast<KHTMLView *>(widget);
             NSView *view;
             if (childFrameWidget) {
-                NodeImpl *nullNode = 0;
-                view = childFrameWidget->part()->impl->nextKeyViewInFrame(nullNode, direction);
+                view = childFrameWidget->part()->impl->nextKeyViewInFrame(0, direction);
             } else {
                 view = widget->getView();
             }
@@ -567,7 +566,7 @@ NSView *KWQKHTMLPartImpl::nextKeyViewInFrame(NodeImpl *node, KWQSelectionDirecti
     }
 }
 
-NSView *KWQKHTMLPartImpl::nextKeyView(NodeImpl *node, KWQSelectionDirection direction)
+NSView *KWQKHTMLPartImpl::nextKeyViewInFrameHierarchy(NodeImpl *node, KWQSelectionDirection direction)
 {
     NSView *next = nextKeyViewInFrame(node, direction);
     if (next) {
@@ -585,40 +584,30 @@ NSView *KWQKHTMLPartImpl::nextKeyView(NodeImpl *node, KWQSelectionDirection dire
     return nil;
 }
 
-NSView *KWQKHTMLPartImpl::nextKeyView(QWidget *startingWidget, KWQSelectionDirection direction)
+NSView *KWQKHTMLPartImpl::nextKeyView(NodeImpl *node, KWQSelectionDirection direction)
 {
-    // The only time the starting widget should be 0 is when we are deallocating a view.
-    // In that case, we return nil to prevent AppKit from going astray trying to remove us from a key view loop.
-    if (!startingWidget) {
-        return nil;
-    }
-    
-    // Use the event filter object to figure out which RenderWidget owns this QWidget and get to the DOM.
-    // Then get the next key view in the order determined by the DOM.
-    NodeImpl *node = static_cast<const RenderWidget *>(startingWidget->eventFilterObject())->element();
-    KHTMLPart *part = node->getDocument()->view()->part();
-    NSView *next = part->impl->nextKeyView(node, direction);
+    NSView *next = nextKeyViewInFrameHierarchy(node, direction);
     if (next) {
         return next;
     }
 
-    // If we are the last key view, then go up to the top level part.
-    KHTMLPart *parentPart;
-    while ((parentPart = part->parentPart())) {
-        part = parentPart;
-    }
-    
-#if 0
     // Look at views from the top level part up, looking for a next key view that we can use.
-    for (NSView *view = part->widget()->getView(); view; view = [view superview]) {
-        next = direction == KWQSelectingNext ? [view nextKeyView] : [view previousKeyView];
-        if (next) {
-            return next;
-        }
+    next = direction == KWQSelectingNext
+        ? [_bridge nextKeyViewOutsideWebViews]
+        : [_bridge previousKeyViewOutsideWebViews];
+    if (next) {
+        return next;
     }
-#endif
     
     // If all else fails, make a loop by starting from 0.
-    NodeImpl *nullNode = 0;
-    return part->impl->nextKeyView(nullNode, direction);
+    printf("got all the way down to nextKeyViewInFrameHierarchy\n");
+    return nextKeyViewInFrameHierarchy(0, direction);
+}
+
+NSView *KWQKHTMLPartImpl::nextKeyViewForWidget(QWidget *startingWidget, KWQSelectionDirection direction)
+{
+    // Use the event filter object to figure out which RenderWidget owns this QWidget and get to the DOM.
+    // Then get the next key view in the order determined by the DOM.
+    NodeImpl *node = static_cast<const RenderWidget *>(startingWidget->eventFilterObject())->element();
+    return node->getDocument()->view()->part()->impl->nextKeyView(node, direction);
 }
diff --git a/WebCore/kwq/KWQKURL.mm b/WebCore/kwq/KWQKURL.mm
index c67bd55..67ab6e2 100644
--- a/WebCore/kwq/KWQKURL.mm
+++ b/WebCore/kwq/KWQKURL.mm
@@ -119,7 +119,7 @@ void KURL::KWQKURLPrivate::makeRef()
 
     // Escape illegal but unambiguous characters that are actually
     // found on the web in URLs, like ' ' or '|'
-    CFStringRef escaped = CFURLCreateStringByAddingPercentEscapes(NULL, sURLMaybeAddSlash.getCFMutableString(),
+    CFStringRef escaped = CFURLCreateStringByAddingPercentEscapes(NULL, sURLMaybeAddSlash.getCFString(),
     								  CFSTR("%#"), NULL, kCFStringEncodingUTF8);
 
     urlRef = CFURLCreateWithString(NULL, escaped, NULL);
@@ -143,7 +143,7 @@ static inline QString CFStringToQString(CFStringRef cfs)
 
 static inline QString escapeQString(const QString &str)
 {
-    return CFStringToQString(CFURLCreateStringByAddingPercentEscapes(NULL, str.getCFMutableString(), NULL, NULL, kCFStringEncodingUTF8));
+    return CFStringToQString(CFURLCreateStringByAddingPercentEscapes(NULL, str.getCFString(), NULL, NULL, kCFStringEncodingUTF8));
 }
 
 static bool pathEndsWithSlash(const QString &sURL)
@@ -359,9 +359,9 @@ QString KURL::normalizeURLString(const QString &s)
 	NormalizedURLCache = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); 
     }
 
-    CFMutableStringRef result = (CFMutableStringRef)CFDictionaryGetValue(NormalizedURLCache, s.getCFMutableString());
+    CFStringRef result = (CFStringRef)CFDictionaryGetValue(NormalizedURLCache, s.getCFString());
     if (result != NULL) {
-	return QString::fromCFMutableString(result);
+	return QString::fromCFString(result);
     }
     
     // normalize the URL string as KURL would:
@@ -388,7 +388,7 @@ QString KURL::normalizeURLString(const QString &s)
         qurl = "file:/" + qurl.mid(17);
     }
 
-    CFDictionarySetValue(NormalizedURLCache, s.getCFMutableString(), qurl.getCFMutableString());
+    CFDictionarySetValue(NormalizedURLCache, s.getCFString(), qurl.getCFString());
 
     return qurl;
 }
@@ -399,10 +399,10 @@ QString KURL::normalizeRelativeURLString(const KURL &base, const QString &relati
 	NormalizedRelativeURLCache = CFDictionaryCreateMutable(NULL, 0, &RelativeURLKeyCallBacks, &kCFTypeDictionaryValueCallBacks); 
     }
 
-    RelativeURLKey key = { base.urlString.getCFMutableString(), relative.getCFMutableString(), 0 };
-    CFMutableStringRef cachedResult = (CFMutableStringRef)CFDictionaryGetValue(NormalizedRelativeURLCache, &key);
+    RelativeURLKey key = { base.urlString.getCFString(), relative.getCFString(), 0 };
+    CFStringRef cachedResult = (CFMutableStringRef)CFDictionaryGetValue(NormalizedRelativeURLCache, &key);
     if (cachedResult != NULL) {
-	return QString::fromCFMutableString(cachedResult);
+	return QString::fromCFString(cachedResult);
     }
     
     QString stripped = relative.stripWhiteSpace();
@@ -413,7 +413,7 @@ QString KURL::normalizeRelativeURLString(const KURL &base, const QString &relati
         base.parse();
 
         CFStringRef relativeURLString = CFURLCreateStringByAddingPercentEscapes
-            (NULL, stripped.getCFMutableString(), CFSTR("%#"), NULL, kCFStringEncodingUTF8);
+            (NULL, stripped.getCFString(), CFSTR("%#"), NULL, kCFStringEncodingUTF8);
 
         CFURLRef relativeURL = CFURLCreateWithString(NULL, relativeURLString, base.d->urlRef);
 
@@ -431,7 +431,7 @@ QString KURL::normalizeRelativeURLString(const KURL &base, const QString &relati
         }
     }
             
-    CFDictionarySetValue(NormalizedRelativeURLCache, new RelativeURLKey(key), result.getCFMutableString());
+    CFDictionarySetValue(NormalizedRelativeURLCache, new RelativeURLKey(key), result.getCFString());
     return result;
 }
 
@@ -652,7 +652,7 @@ KURL &KURL::operator=(const KURL &other)
 
 QString KURL::decode_string(const QString &urlString)
 {
-    CFStringRef unescaped = CFURLCreateStringByReplacingPercentEscapes(NULL, urlString.getCFMutableString(), CFSTR(""));
+    CFStringRef unescaped = CFURLCreateStringByReplacingPercentEscapes(NULL, urlString.getCFString(), CFSTR(""));
     QString qUnescaped = QString::fromCFString(unescaped);
     CFRelease(unescaped);
 
diff --git a/WebCore/kwq/KWQNSTextField.mm b/WebCore/kwq/KWQNSTextField.mm
index 885c2dd..c3e1606 100644
--- a/WebCore/kwq/KWQNSTextField.mm
+++ b/WebCore/kwq/KWQNSTextField.mm
@@ -227,14 +227,14 @@
 - (NSView *)nextKeyView
 {
     return inNextValidKeyView
-        ? KWQKHTMLPartImpl::nextKeyView(widget, KWQSelectingNext)
+        ? KWQKHTMLPartImpl::nextKeyViewForWidget(widget, KWQSelectingNext)
         : [super nextKeyView];
 }
 
 - (NSView *)previousKeyView
 {
    return inNextValidKeyView
-        ? KWQKHTMLPartImpl::nextKeyView(widget, KWQSelectingPrevious)
+        ? KWQKHTMLPartImpl::nextKeyViewForWidget(widget, KWQSelectingPrevious)
         : [super previousKeyView];
 }
 
@@ -350,14 +350,14 @@
 - (NSView *)nextKeyView
 {
     return inNextValidKeyView
-        ? KWQKHTMLPartImpl::nextKeyView(widget, KWQSelectingNext)
+        ? KWQKHTMLPartImpl::nextKeyViewForWidget(widget, KWQSelectingNext)
         : [super nextKeyView];
 }
 
 - (NSView *)previousKeyView
 {
    return inNextValidKeyView
-        ? KWQKHTMLPartImpl::nextKeyView(widget, KWQSelectingPrevious)
+        ? KWQKHTMLPartImpl::nextKeyViewForWidget(widget, KWQSelectingPrevious)
         : [super previousKeyView];
 }
 
diff --git a/WebCore/kwq/KWQString.h b/WebCore/kwq/KWQString.h
index a971e5b..692e649 100644
--- a/WebCore/kwq/KWQString.h
+++ b/WebCore/kwq/KWQString.h
@@ -265,7 +265,7 @@ inline bool operator<(char ch, QChar qc)
 }
 
 // Keep this struct to <= 46 bytes, that's what the system will allocate.
-// Will be rounded up even multiple of for, so we're stuck at 44.
+// Will be rounded up to a multiple of 4, so we're stuck at 44.
 
 #define QS_INTERNAL_BUFFER_SIZE 20
 #define QS_INTERNAL_BUFFER_CHARS QS_INTERNAL_BUFFER_SIZE-1
@@ -295,7 +295,6 @@ struct QStringData {
     void operator delete(void*p);
 #endif
 
-
     inline void ref() { refCount++; }
     inline void deref() { if (--refCount == 0 && _isHeapAllocated) delete this; }
         
@@ -334,23 +333,19 @@ public:
     QString(const char *, int len);
     
     QString(const QString &);
+    QString &operator=(const QString &);
 
     ~QString();
 
-    static QString fromLatin1(const char * /* NOTE: len NOT used */ );
+    static QString fromLatin1(const char *);
     static QString fromStringWithEncoding(const char *, int, CFStringEncoding);
-    static QString fromCFMutableString(CFMutableStringRef);
     static QString fromCFString(CFStringRef);
     static QString fromNSString(NSString *);
     
-    static QString gstring_toQString(CFMutableStringRef *ref, UniChar *uchars, int len);
-    static CFMutableStringRef gstring_toCFString(CFMutableStringRef *ref, UniChar *uchars, int len);
-
-    QString &operator=(const QString &);
-    QString &operator=(const QCString &);
-    QString &operator=(const char *);
-    QString &operator=(QChar);
     QString &operator=(char);
+    QString &operator=(QChar);
+    QString &operator=(const char *);
+    QString &operator=(const QCString &);
 
     uint length() const;
 
@@ -366,23 +361,24 @@ public:
     QChar at(uint) const;
 
     int compare(const QString &) const;
+    int compare(const char *) const;
 
     bool startsWith(const QString &) const;
 
-    int find(char, int index=0) const;
-    int find(QChar, int index=0) const;
-    int find(const char *, int index=0, bool cs=true) const;
-    int find(const QString &, int index=0, bool cs=true) const;
-    int find(const QRegExp &, int index=0) const;
+    int find(char, int index = 0) const;
+    int find(QChar, int index = 0) const;
+    int find(const char *, int index = 0, bool cs = true) const;
+    int find(const QString &, int index = 0, bool cs = true) const;
+    int find(const QRegExp &, int index = 0) const;
 
-    int findRev(char, int index=-1) const;
-    int findRev(const QString& str, int index, bool cs=true ) const;
-    int findRev(const char *, int index=-1) const;
+    int findRev(char, int index = -1) const;
+    int findRev(const QString& str, int index, bool cs = true) const;
+    int findRev(const char *, int index = -1) const;
 
     int contains(char) const;
-    int contains(const char *, bool cs=true) const;
-    int contains(const QString &, bool cs=true) const;
-    int contains( QChar c, bool cs=true ) const;
+    int contains(const char *, bool cs = true) const;
+    int contains(const QString &, bool cs = true) const;
+    int contains(QChar c, bool cs = true) const;
 
     bool endsWith(const QString &) const;
 
@@ -456,7 +452,7 @@ public:
     void compose();
     QString visual();
 
-    CFMutableStringRef getCFMutableString() const;
+    CFStringRef getCFString() const;
     NSString *getNSString() const;
 
     bool operator!() const;
@@ -467,7 +463,7 @@ public:
     QString &operator+=(QChar);
     QString &operator+=(char);
 
-    void setBufferFromCFString(CFStringRef cfs);
+    void setBufferFromCFString(CFStringRef);
     
 private:
     // Used by QConstString.
@@ -476,14 +472,11 @@ private:
     void detachInternal();
     void deref();
     void forceUnicode();
-    void setLength( uint pos );
+    void setLength(uint);
 
     struct QStringData *data() const;
     
-    enum CacheType { CacheInvalid, CacheUnicode, CacheLatin1 };
-
     QCString convertToQCString(CFStringEncoding) const;
-    int compareToLatin1(const char *chs) const;
 
     struct QStringData **dataHandle;
     struct QStringData internalData;
@@ -495,27 +488,6 @@ private:
 
     friend bool operator==(const QString &, const QString &);
     friend bool operator==(const QString &, const char *);
-    friend bool operator==(const char *, const QString &);
-
-    friend bool operator!=(const QString &, const QString &);
-    friend bool operator!=(const QString &, const char *);
-    friend bool operator!=(const char *, const QString &);
-
-    friend bool operator>(const QString &, const QString &);
-    friend bool operator>(const QString &, const char *);
-    friend bool operator>(const char *, const QString &);
-
-    friend bool operator>=(const QString &, const QString &);
-    friend bool operator>=(const QString &, const char *);
-    friend bool operator>=(const char *, const QString &);
-
-    friend bool operator<=(const QString &, const QString &);
-    friend bool operator<=(const QString &, const char *);
-    friend bool operator<=(const char *, const QString &);
-
-    friend bool operator<(const QString &, const QString &);
-    friend bool operator<(const QString &, const char *);
-    friend bool operator<(const char *, const QString &);
 
     friend class QConstString;
     friend class QGDict;
@@ -594,12 +566,12 @@ inline bool operator<(const QString &qs1, const QString &qs2)
 
 inline bool operator<(const QString &qs, const char *chs)
 {
-    return qs.compareToLatin1(chs) < 0;
+    return qs.compare(chs) < 0;
 }
 
 inline bool operator<(const char *chs, const QString &qs)
 {
-    return qs.compareToLatin1(chs) > 0;
+    return qs.compare(chs) > 0;
 }
 
 inline bool operator<=(const QString &qs1, const QString &qs2)
@@ -609,12 +581,12 @@ inline bool operator<=(const QString &qs1, const QString &qs2)
 
 inline bool operator<=(const QString &qs, const char *chs)
 {
-    return qs.compareToLatin1(chs) <= 0;
+    return qs.compare(chs) <= 0;
 }
 
 inline bool operator<=(const char *chs, const QString &qs)
 {
-    return qs.compareToLatin1(chs) >= 0;
+    return qs.compare(chs) >= 0;
 }
 
 inline bool operator>(const QString &qs1, const QString &qs2)
@@ -624,12 +596,12 @@ inline bool operator>(const QString &qs1, const QString &qs2)
 
 inline bool operator>(const QString &qs, const char *chs)
 {
-    return qs.compareToLatin1(chs) > 0;
+    return qs.compare(chs) > 0;
 }
 
 inline bool operator>(const char *chs, const QString &qs)
 {
-    return qs.compareToLatin1(chs) < 0;
+    return qs.compare(chs) < 0;
 }
 
 inline bool operator>=(const QString &qs1, const QString &qs2)
@@ -639,12 +611,12 @@ inline bool operator>=(const QString &qs1, const QString &qs2)
 
 inline bool operator>=(const QString &qs, const char *chs)
 {
-    return qs.compareToLatin1(chs) >= 0;
+    return qs.compare(chs) >= 0;
 }
 
 inline bool operator>=(const char *chs, const QString &qs)
 {
-    return qs.compareToLatin1(chs) <= 0;
+    return qs.compare(chs) <= 0;
 }
 
 class QConstString : private QString {
diff --git a/WebCore/kwq/KWQString.mm b/WebCore/kwq/KWQString.mm
index bd7417a..92226ff 100644
--- a/WebCore/kwq/KWQString.mm
+++ b/WebCore/kwq/KWQString.mm
@@ -720,16 +720,21 @@ QString QString::number(double n)
 void QString::setBufferFromCFString(CFStringRef cfs)
 {
     CFIndex size = CFStringGetLength(cfs);
+    UniChar fixedSizeBuffer[1024];
     UniChar *buffer;
-    
-    buffer = (UniChar *)malloc (size * sizeof(UniChar));
-    CFStringGetCharacters (cfs, CFRangeMake (0, size), buffer);
-    setUnicode ((const QChar *)buffer, (uint)size);
-    free (buffer);
+    if (size > (CFIndex)(sizeof(fixedSizeBuffer) / sizeof(UniChar))) {
+        buffer = (UniChar *)malloc(size * sizeof(UniChar));
+    } else {
+        buffer = fixedSizeBuffer;
+    }
+    CFStringGetCharacters(cfs, CFRangeMake (0, size), buffer);
+    setUnicode((const QChar *)buffer, (uint)size);
+    if (buffer != fixedSizeBuffer) {
+        free(buffer);
+    }
 }
 
-QString QString::fromStringWithEncoding(const char *chs, int len,
-                                        CFStringEncoding encoding)
+QString QString::fromStringWithEncoding(const char *chs, int len, CFStringEncoding encoding)
 {
     QString qs;
     if (chs && *chs) {
@@ -753,17 +758,10 @@ QString QString::fromStringWithEncoding(const char *chs, int len,
     return qs;
 }
 
-QString QString::fromCFMutableString(CFMutableStringRef cfs)
-{
-    QString qs;
-    qs.setBufferFromCFString(cfs);
-    return qs;
-}
-
 QString QString::fromCFString(CFStringRef cfs)
 {
     QString qs;
-    qs.setBufferFromCFString((CFStringRef)cfs);
+    qs.setBufferFromCFString(cfs);
     return qs;
 }
 
@@ -774,21 +772,23 @@ QString QString::fromNSString(NSString *nss)
     return qs;
 }
 
-CFMutableStringRef QString::getCFMutableString() const
+CFStringRef QString::getCFString() const
 {
-    CFMutableStringRef s = CFStringCreateMutable(kCFAllocatorDefault, 0);
-    if ((*dataHandle)->_isUnicodeValid)
-        CFStringAppendCharacters (s, (UniChar *)unicode(), (*dataHandle)->_length);
-    else if ((*dataHandle)->_isAsciiValid)
-        CFStringAppendCString (s, (const char *)ascii(), kCFStringEncodingISOLatin1);
-    else
-        QSTRING_FAILURE ("invalid character cache\n");
-    return (CFMutableStringRef)[(NSString *)s autorelease];
+    return (CFStringRef)getNSString();
 }
 
 NSString *QString::getNSString() const
 {
-    return (NSString *)getCFMutableString();
+    if (dataHandle[0]->_isUnicodeValid) {
+        return [NSString stringWithCharacters:(const unichar *)unicode() length:dataHandle[0]->_length];
+    }
+    
+    if (dataHandle[0]->_isAsciiValid) {
+        return [NSString stringWithCString:(const char *)ascii()];
+    }
+    
+    QSTRING_FAILURE("invalid character cache\n");
+    return nil;
 }
 
 const QString QString::null;
@@ -835,7 +835,7 @@ QString::QString()
 #endif
     internalData.deref();
     dataHandle = makeSharedNullHandle();
-    (*dataHandle)->ref();
+    dataHandle[0]->ref();
 }
 
 
@@ -890,7 +890,7 @@ QString::QString(const QChar *unicode, uint length)
     if ( !unicode && !length ) {
         internalData.deref();
         dataHandle = makeSharedNullHandle();
-	(*dataHandle)->ref();
+	dataHandle[0]->ref();
     } else {
         dataHandle = (struct QStringData **)allocateHandle();
 
@@ -930,7 +930,7 @@ QString::QString(const QString &qs) : dataHandle(qs.dataHandle)
     countInstance (&dataHandle);
 #endif
     internalData.deref();
-    (*dataHandle)->ref();
+    dataHandle[0]->ref();
 }
 
 QString &QString::operator=(const QString &qs)
@@ -943,7 +943,7 @@ QString &QString::operator=(const QString &qs)
     // free our handle if it isn't the shared
     // null handle, and if no-one else is using
     // it.
-    if (dataHandle != makeSharedNullHandle() && (*dataHandle)->refCount == 1)
+    if (dataHandle != makeSharedNullHandle() && dataHandle[0]->refCount == 1)
         needToFreeHandle = true;
     
     qs.data()->ref();
@@ -1004,7 +1004,7 @@ inline QChar QString::at(uint i) const
 
 const QChar *QString::unicode() const
 {
-    return (*dataHandle)->unicode();
+    return dataHandle[0]->unicode();
 }
 
 int QString::compare( const QString& s ) const
@@ -1014,19 +1014,19 @@ int QString::compare( const QString& s ) const
 
 bool QString::startsWith( const QString& s ) const
 {
-    if ((*dataHandle)->_isAsciiValid){
+    if (dataHandle[0]->_isAsciiValid){
         const char *asc = ascii();
         
         for ( int i =0; i < (int) s.data()->_length; i++ ) {
-            if ( i >= (int) (*dataHandle)->_length || asc[i] != s[i] )
+            if ( i >= (int) dataHandle[0]->_length || asc[i] != s[i] )
                 return FALSE;
         }
     }
-    else if ((*dataHandle)->_isUnicodeValid){
+    else if (dataHandle[0]->_isUnicodeValid){
         const QChar *uni = unicode();
         
         for ( int i =0; i < (int) s.data()->_length; i++ ) {
-            if ( i >= (int) (*dataHandle)->_length || uni[i] != s[i] )
+            if ( i >= (int) dataHandle[0]->_length || uni[i] != s[i] )
                 return FALSE;
         }
     }
@@ -1040,10 +1040,10 @@ bool QString::endsWith( const QString& s ) const
 {
     const QChar *uni = unicode();
 
-    if ((*dataHandle)->_length < s.data()->_length)
+    if (dataHandle[0]->_length < s.data()->_length)
         return FALSE;
         
-    for ( int i = (*dataHandle)->_length - s.data()->_length; i < (int) s.data()->_length; i++ ) {
+    for ( int i = dataHandle[0]->_length - s.data()->_length; i < (int) s.data()->_length; i++ ) {
 	if ( uni[i] != s[i] )
 	    return FALSE;
     }
@@ -1052,7 +1052,7 @@ bool QString::endsWith( const QString& s ) const
 
 const char *QString::latin1() const
 {
-    return (*dataHandle)->ascii();
+    return dataHandle[0]->ascii();
 }
 
 QCString QString::utf8() const
@@ -1067,14 +1067,14 @@ QCString QString::local8Bit() const
 
 bool QString::isNull() const
 {
-    return (*dataHandle)->_length == 0;
+    return dataHandle[0]->_length == 0;
 }
 
 int QString::find(QChar qc, int index) const
 {
-    if (IS_ASCII_QCHAR(qc) && (*dataHandle)->_isAsciiValid)
+    if (IS_ASCII_QCHAR(qc) && dataHandle[0]->_isAsciiValid)
         return find((char)qc, index);
-    else if ((*dataHandle)->_isUnicodeValid)
+    else if (dataHandle[0]->_isUnicodeValid)
         return find(QString(qc), index, TRUE);
     else
         QSTRING_FAILURE ("invalid character cache\n");
@@ -1085,20 +1085,20 @@ int QString::find(QChar qc, int index) const
 
 int QString::find(char ch, int index) const
 {
-    if ((*dataHandle)->_isAsciiValid){
+    if (dataHandle[0]->_isAsciiValid){
         const char *cp = ascii();
         
         if ( index < 0 )
-            index += (*dataHandle)->_length;
+            index += dataHandle[0]->_length;
         
-        if (index >= (int)(*dataHandle)->_length)
+        if (index >= (int)dataHandle[0]->_length)
             return -1;
             
-        for (int i = index; i < (int)(*dataHandle)->_length; i++)
+        for (int i = index; i < (int)dataHandle[0]->_length; i++)
             if (cp[i] == ch)
                 return i;
     }
-    else if ((*dataHandle)->_isUnicodeValid)
+    else if (dataHandle[0]->_isUnicodeValid)
         return find(QChar(ch), index, TRUE);
     else
         QSTRING_FAILURE ("invalid character cache\n");
@@ -1119,10 +1119,10 @@ int QString::find(const QString &str, int index, bool caseSensitive) const
       QChars.
     */
     if ( index < 0 )
-	index += (*dataHandle)->_length;
+	index += dataHandle[0]->_length;
     int lstr = str.data()->_length;
-    int lthis = (*dataHandle)->_length - index;
-    if ( (uint)lthis > (*dataHandle)->_length )
+    int lthis = dataHandle[0]->_length - index;
+    if ( (uint)lthis > dataHandle[0]->_length )
 	return -1;
     int delta = lthis - lstr;
     if ( delta < 0 )
@@ -1196,11 +1196,11 @@ static inline bool compareToLatinCharacter (UniChar c1, UniChar c2, bool caseSen
 // based alrogithms.
 int QString::find(const char *chs, int index, bool caseSensitive) const
 {
-    if ((*dataHandle)->_isAsciiValid){
-        char *ptr = (*dataHandle)->ascii();
+    if (dataHandle[0]->_isAsciiValid){
+        char *ptr = dataHandle[0]->ascii();
         
         if (chs) {
-            int len = (*dataHandle)->_length;
+            int len = dataHandle[0]->_length;
             
             ptr += index;
             
@@ -1232,11 +1232,11 @@ int QString::find(const char *chs, int index, bool caseSensitive) const
             }
         }
     }
-    else if ((*dataHandle)->_isUnicodeValid){
-        QChar *ptr = (QChar *)(*dataHandle)->unicode();
+    else if (dataHandle[0]->_isUnicodeValid){
+        QChar *ptr = (QChar *)dataHandle[0]->unicode();
 
         if (chs) {
-            int len = (*dataHandle)->_length;
+            int len = dataHandle[0]->_length;
 
             ptr += index;
             if (len && (index >= 0) && (index < len)) {
@@ -1273,18 +1273,18 @@ int QString::find(const char *chs, int index, bool caseSensitive) const
 int QString::find(const QRegExp &qre, int index) const
 {
     if ( index < 0 )
-	index += (*dataHandle)->_length;
+	index += dataHandle[0]->_length;
     return qre.match( *this, index );
 }
 
 int QString::findRev(char ch, int index) const
 {
-    if ((*dataHandle)->_isAsciiValid){
+    if (dataHandle[0]->_isAsciiValid){
         const char *cp = ascii();
         
         if (index < 0)
-            index += (*dataHandle)->_length;
-        if (index > (int)(*dataHandle)->_length)
+            index += dataHandle[0]->_length;
+        if (index > (int)dataHandle[0]->_length)
             return -1;
             
         for (int i = index; i >= 0; i--) {
@@ -1292,7 +1292,7 @@ int QString::findRev(char ch, int index) const
                 return i;
         }
     }
-    else if ((*dataHandle)->_isUnicodeValid)
+    else if (dataHandle[0]->_isUnicodeValid)
         return findRev(QString(QChar(ch)), index);
     else
         QSTRING_FAILURE ("invalid character cache\n");
@@ -1311,7 +1311,7 @@ int QString::findRev( const QString& str, int index, bool cs ) const
     /*
       See QString::find() for explanations.
     */
-    int lthis = (*dataHandle)->_length;
+    int lthis = dataHandle[0]->_length;
     if ( index < 0 )
 	index += lthis;
 
@@ -1372,7 +1372,7 @@ int QString::contains( QChar c, bool cs ) const
 {
     int count = 0;
     
-    if ((*dataHandle)->_isAsciiValid){
+    if (dataHandle[0]->_isAsciiValid){
         if (!IS_ASCII_QCHAR(c))
             return 0;
             
@@ -1380,7 +1380,7 @@ int QString::contains( QChar c, bool cs ) const
         const char *cPtr = ascii();
         if ( !cPtr )
             return 0;
-        int n = (*dataHandle)->_length;
+        int n = dataHandle[0]->_length;
         if ( cs ) {					// case sensitive
             while ( n-- )
                 if ( *cPtr++ == ac )
@@ -1395,11 +1395,11 @@ int QString::contains( QChar c, bool cs ) const
             }
         }
     }
-    else if ((*dataHandle)->_isUnicodeValid){
+    else if (dataHandle[0]->_isUnicodeValid){
         const QChar *uc = unicode();
         if ( !uc )
             return 0;
-        int n = (*dataHandle)->_length;
+        int n = dataHandle[0]->_length;
         if ( cs ) {					// case sensitive
             while ( n-- )
                 if ( *uc++ == c )
@@ -1428,10 +1428,10 @@ int QString::contains(const char *str, bool caseSensitive) const
     if ( !str )
         return 0;
 
-    if ((*dataHandle)->_isAsciiValid){
+    if (dataHandle[0]->_isAsciiValid){
         int count = 0;
         const char *uc = ascii();
-        int n = (*dataHandle)->_length;
+        int n = dataHandle[0]->_length;
         int toLen = strlen(str);
         
         while ( n-- ) {
@@ -1446,7 +1446,7 @@ int QString::contains(const char *str, bool caseSensitive) const
         }
         return count;
     }
-    else if ((*dataHandle)->_isUnicodeValid)
+    else if (dataHandle[0]->_isUnicodeValid)
         return contains(QString(str),caseSensitive);
     else
         QSTRING_FAILURE ("invalid character cache\n");
@@ -1461,7 +1461,7 @@ int QString::contains(const QString &str, bool caseSensitive) const
     if ( !str )
 	return 0;
     int len = str.data()->_length;
-    int n = (*dataHandle)->_length;
+    int n = dataHandle[0]->_length;
     while ( n-- ) {				// counts overlapping strings
 	// ### Doesn't account for length of this - searches over "end"
 	if ( caseSensitive ) {
@@ -1510,7 +1510,7 @@ long QString::toLong(bool *ok, int base) const
 {
     const QChar *p = unicode();
     long val=0;
-    int l = (*dataHandle)->_length;
+    int l = dataHandle[0]->_length;
     const long max_mult = INT_MAX / base;
     bool is_ok = FALSE;
     int neg = 0;
@@ -1562,7 +1562,7 @@ ulong QString::toULong(bool *ok, int base) const
 {
     const QChar *p = unicode();
     ulong val=0;
-    int l = (*dataHandle)->_length;
+    int l = dataHandle[0]->_length;
     const ulong max_mult = UINT_MAX / base;
     bool is_ok = FALSE;
     if ( !p )
@@ -1618,8 +1618,8 @@ double QString::toDouble(bool *ok) const
 bool QString::findArg(int& pos, int& len) const
 {
     char lowest=0;
-    for (uint i = 0; i< (*dataHandle)->_length; i++) {
-	if ( at(i) == '%' && i + 1 < (*dataHandle)->_length ) {
+    for (uint i = 0; i< dataHandle[0]->_length; i++) {
+	if ( at(i) == '%' && i + 1 < dataHandle[0]->_length ) {
 	    char dig = at(i+1);
 	    if ( dig >= '0' && dig <= '9' ) {
 		if ( !lowest || dig < lowest ) {
@@ -1708,7 +1708,7 @@ QString QString::left(uint len) const
 	return QString();
     } else if ( len == 0 ) {			// ## just for 1.x compat:
 	return QString::fromLatin1("");
-    } else if ( len > (*dataHandle)->_length ) {
+    } else if ( len > dataHandle[0]->_length ) {
 	return *this;
     } else {
 	QString s( unicode(), len );
@@ -1723,7 +1723,7 @@ QString QString::right(uint len) const
     } else if ( len == 0 ) {			// ## just for 1.x compat:
 	return QString::fromLatin1("");
     } else {
-	uint l = (*dataHandle)->_length;
+	uint l = dataHandle[0]->_length;
 	if ( len > l )
 	    len = l;
 	QString s( unicode()+(l-len), len );
@@ -1733,7 +1733,7 @@ QString QString::right(uint len) const
 
 QString QString::mid(uint index, uint len) const
 {
-    uint slen = (*dataHandle)->_length;
+    uint slen = dataHandle[0]->_length;
     if ( isEmpty() || index >= slen ) {
 	return QString();
     } else if ( len == 0 ) {			// ## just for 1.x compat:
@@ -1741,7 +1741,7 @@ QString QString::mid(uint index, uint len) const
     } else {
 	if ( len > slen-index )
 	    len = slen - index;
-	if ( index == 0 && len == (*dataHandle)->_length )
+	if ( index == 0 && len == dataHandle[0]->_length )
 	    return *this;
 	register const QChar *p = unicode()+index;
 	QString s( p, len );
@@ -1758,7 +1758,7 @@ QString QString::copy() const
 QString QString::lower() const
 {
     QString s(*this);
-    int l = (*dataHandle)->_length;
+    int l = dataHandle[0]->_length;
     if ( l ) {
 	s.detach();
         if (s.data()->_isAsciiValid){
@@ -1793,11 +1793,11 @@ QString QString::stripWhiteSpace() const
 {
     if ( isEmpty() )				// nothing to do
 	return *this;
-    if ( !at(0).isSpace() && !at((*dataHandle)->_length-1).isSpace() )
+    if ( !at(0).isSpace() && !at(dataHandle[0]->_length-1).isSpace() )
 	return *this;
 
     int start = 0;
-    int end = (*dataHandle)->_length - 1;
+    int end = dataHandle[0]->_length - 1;
 
     QString result = fromLatin1("");
     while ( start<=end && at(start).isSpace() )	// skip white space from start
@@ -1809,12 +1809,12 @@ QString QString::stripWhiteSpace() const
         end--;
     int l = end - start + 1;
     
-    if ((*dataHandle)->_isAsciiValid){
+    if (dataHandle[0]->_isAsciiValid){
         result.setLength( l );
         if ( l )
             memcpy( (char *)result.data()->ascii(), &ascii()[start], l );
     }
-    else if ((*dataHandle)->_isUnicodeValid){
+    else if (dataHandle[0]->_isUnicodeValid){
         result.forceUnicode();
         result.setLength( l );
         if ( l )
@@ -1832,10 +1832,10 @@ QString QString::simplifyWhiteSpace() const
     
     QString result;
 
-    if ((*dataHandle)->_isAsciiValid){
-        result.setLength( (*dataHandle)->_length );
+    if (dataHandle[0]->_isAsciiValid){
+        result.setLength( dataHandle[0]->_length );
         const char *from = ascii();
-        const char *fromend = from + (*dataHandle)->_length;
+        const char *fromend = from + dataHandle[0]->_length;
         int outc=0;
         
         char *to = (char *)result.ascii();
@@ -1853,11 +1853,11 @@ QString QString::simplifyWhiteSpace() const
             outc--;
         result.truncate( outc );
     }
-    else if ((*dataHandle)->_isUnicodeValid){
+    else if (dataHandle[0]->_isUnicodeValid){
         result.forceUnicode();
-        result.setLength( (*dataHandle)->_length );
+        result.setLength( dataHandle[0]->_length );
         const QChar *from = unicode();
-        const QChar *fromend = from + (*dataHandle)->_length;
+        const QChar *fromend = from + dataHandle[0]->_length;
         int outc=0;
         
         QChar *to = (QChar *)result.unicode();
@@ -1883,7 +1883,7 @@ QString QString::simplifyWhiteSpace() const
 
 void QString::deref()
 {
-    (*dataHandle)->deref();
+    dataHandle[0]->deref();
 }
 
 
@@ -1896,7 +1896,7 @@ QString &QString::setUnicode(const QChar *uni, uint len)
     // free our handle if it isn't the shared
     // null handle, and if no-one else is using
     // it.
-    if (dataHandle != makeSharedNullHandle() && (*dataHandle)->refCount == 1)
+    if (dataHandle != makeSharedNullHandle() && dataHandle[0]->refCount == 1)
         needToFreeHandle = true;
         
     if ( len == 0 ) {
@@ -1904,19 +1904,19 @@ QString &QString::setUnicode(const QChar *uni, uint len)
         if (needToFreeHandle)
             freeHandle (dataHandle);
         dataHandle = makeSharedNullHandle();
-        (*dataHandle)->ref();
-    } else if (len > (*dataHandle)->_maxUnicode || (*dataHandle)->refCount != 1 || !(*dataHandle)->_isUnicodeValid) {
+        dataHandle[0]->ref();
+    } else if (len > dataHandle[0]->_maxUnicode || dataHandle[0]->refCount != 1 || !dataHandle[0]->_isUnicodeValid) {
         deref();
         if (needToFreeHandle)
             freeHandle (dataHandle);
         dataHandle = (struct QStringData **)allocateHandle();
 	*dataHandle = new QStringData( uni, len );
-        (*dataHandle)->_isHeapAllocated = 1;
+        dataHandle[0]->_isHeapAllocated = 1;
     } else {
 	if ( uni )
 	    memcpy( (void *)unicode(), uni, sizeof(QChar)*len );
-        (*dataHandle)->_length = len;
-        (*dataHandle)->_isAsciiValid = 0;
+        dataHandle[0]->_length = len;
+        dataHandle[0]->_isAsciiValid = 0;
     }
     
     return *this;
@@ -1937,7 +1937,7 @@ QString &QString::setLatin1(const char *str, int len)
     // free our handle if it isn't the shared
     // null handle, and if no-one else is using
     // it.
-    if (dataHandle != makeSharedNullHandle() && (*dataHandle)->refCount == 1)
+    if (dataHandle != makeSharedNullHandle() && dataHandle[0]->refCount == 1)
         needToFreeHandle = true;
         
     if ( len == 0 ) {
@@ -1945,18 +1945,18 @@ QString &QString::setLatin1(const char *str, int len)
         if (needToFreeHandle)
             freeHandle (dataHandle);
         dataHandle = makeSharedNullHandle();
-        (*dataHandle)->ref();
-    } else if (len+1 > (int)(*dataHandle)->_maxAscii || (*dataHandle)->refCount != 1 || !(*dataHandle)->_isAsciiValid) {
+        dataHandle[0]->ref();
+    } else if (len+1 > (int)dataHandle[0]->_maxAscii || dataHandle[0]->refCount != 1 || !dataHandle[0]->_isAsciiValid) {
         deref();
         if (needToFreeHandle)
             freeHandle (dataHandle);
         dataHandle = (struct QStringData **)allocateHandle();
         *dataHandle = new QStringData(str,len);
-        (*dataHandle)->_isHeapAllocated = 1;
+        dataHandle[0]->_isHeapAllocated = 1;
     } else {
         strcpy( (char *)ascii(), str );
-        (*dataHandle)->_length = len;
-        (*dataHandle)->_isUnicodeValid = 0;
+        dataHandle[0]->_length = len;
+        dataHandle[0]->_isUnicodeValid = 0;
     }
     return *this;
 }
@@ -2039,7 +2039,7 @@ QString &QString::prepend(const QString &qs)
 
 QString &QString::append(const QString &qs)
 {
-    return insert((*dataHandle)->_length, qs);
+    return insert(dataHandle[0]->_length, qs);
 }
 
 
@@ -2053,9 +2053,9 @@ QString &QString::insert(uint index, const QString &qs)
 #ifdef QSTRING_DEBUG_UNICODE
     forceUnicode();
 #endif
-    if ((*dataHandle)->_isAsciiValid && qs.data()->_isAsciiValid){
+    if (dataHandle[0]->_isAsciiValid && qs.data()->_isAsciiValid){
         uint insertLength = qs.data()->_length;
-        uint originalLength = (*dataHandle)->_length;
+        uint originalLength = dataHandle[0]->_length;
         char *insertChars = (char *)qs.ascii();
         char *targetChars;
         
@@ -2071,7 +2071,7 @@ QString &QString::insert(uint index, const QString &qs)
     }
     else {
         uint insertLength = qs.data()->_length;
-        uint originalLength = (*dataHandle)->_length;
+        uint originalLength = dataHandle[0]->_length;
         QChar *targetChars;
         
         // Ensure that we have enough space.
@@ -2106,8 +2106,8 @@ QString &QString::insert(uint index, QChar qc)
 {
     detach();
     
-    if ((*dataHandle)->_isAsciiValid && IS_ASCII_QCHAR(qc)){
-        uint originalLength = (*dataHandle)->_length;
+    if (dataHandle[0]->_isAsciiValid && IS_ASCII_QCHAR(qc)){
+        uint originalLength = dataHandle[0]->_length;
         char insertChar = (char)qc;
         char *targetChars;
         
@@ -2120,10 +2120,10 @@ QString &QString::insert(uint index, QChar qc)
         
         // Insert character.
         targetChars[index] = insertChar;
-        targetChars[(*dataHandle)->_length] = 0;
+        targetChars[dataHandle[0]->_length] = 0;
     }
     else {
-        uint originalLength = (*dataHandle)->_length;
+        uint originalLength = dataHandle[0]->_length;
         QChar *targetChars;
         
         // Ensure that we have enough space.
@@ -2145,8 +2145,8 @@ QString &QString::insert(uint index, char ch)
 {
     detach();
     
-    if ((*dataHandle)->_isAsciiValid){
-        uint originalLength = (*dataHandle)->_length;
+    if (dataHandle[0]->_isAsciiValid){
+        uint originalLength = dataHandle[0]->_length;
         char *targetChars;
         
         // Ensure that we have enough space.
@@ -2158,10 +2158,10 @@ QString &QString::insert(uint index, char ch)
         
         // Insert character.
         targetChars[index] = ch;
-        targetChars[(*dataHandle)->_length] = 0;
+        targetChars[dataHandle[0]->_length] = 0;
     }
-    else if ((*dataHandle)->_isUnicodeValid){
-        uint originalLength = (*dataHandle)->_length;
+    else if (dataHandle[0]->_isUnicodeValid){
+        uint originalLength = dataHandle[0]->_length;
         QChar *targetChars;
         
         // Ensure that we have enough space.
@@ -2211,7 +2211,7 @@ void QString::detachInternal()
 // the string data is mutated.
 void QString::detach()
 {
-    if ((*dataHandle)->refCount == 1 && dataHandle != shared_null_handle)
+    if (dataHandle[0]->refCount == 1 && dataHandle != shared_null_handle)
         return;
 
 #ifdef QSTRING_DEBUG_ALLOCATIONS
@@ -2245,7 +2245,7 @@ void QString::detach()
 
 QString &QString::remove(uint index, uint len)
 {
-    uint olen = (*dataHandle)->_length;
+    uint olen = dataHandle[0]->_length;
     if ( index >= olen  ) {
         // range problems
     } else if ( index + len >= olen ) {  // index ok
@@ -2256,13 +2256,13 @@ QString &QString::remove(uint index, uint len)
 #ifdef QSTRING_DEBUG_UNICODE
     forceUnicode();
 #endif
-        if ((*dataHandle)->_isAsciiValid){
-            memmove( (*dataHandle)->ascii()+index, (*dataHandle)->ascii()+index+len,
+        if (dataHandle[0]->_isAsciiValid){
+            memmove( dataHandle[0]->ascii()+index, dataHandle[0]->ascii()+index+len,
                     sizeof(char)*(olen-index-len) );
             setLength( olen-len );
         }
-        else if ((*dataHandle)->_isUnicodeValid){
-            memmove( (*dataHandle)->unicode()+index, (*dataHandle)->unicode()+index+len,
+        else if (dataHandle[0]->_isUnicodeValid){
+            memmove( dataHandle[0]->unicode()+index, dataHandle[0]->unicode()+index+len,
                     sizeof(QChar)*(olen-index-len) );
             setLength( olen-len );
         }
@@ -2293,7 +2293,7 @@ QString &QString::replace(const QRegExp &qre, const QString &str)
     int index = 0;
     int slen  = str.data()->_length;
     int len;
-    while ( index < (int)(*dataHandle)->_length ) {
+    while ( index < (int)dataHandle[0]->_length ) {
 	index = qre.match( *this, index, &len, FALSE );
 	if ( index >= 0 ) {
 	    replace( index, len, str );
@@ -2315,7 +2315,7 @@ void QString::forceUnicode()
     
     unicode();
 
-    (*dataHandle)->_isAsciiValid = 0;
+    dataHandle[0]->_isAsciiValid = 0;
 }
 
 
@@ -2331,36 +2331,36 @@ void QString::setLength( uint newLen )
         deref();
         dataHandle = (struct QStringData **)allocateHandle();
         *dataHandle = new QStringData();
-        (*dataHandle)->_isHeapAllocated = 1;
+        dataHandle[0]->_isHeapAllocated = 1;
     }
     
 #ifdef QSTRING_DEBUG_UNICODE
     forceUnicode();
 #endif
-    if ((*dataHandle)->_isAsciiValid){
-        if (newLen+1 > (*dataHandle)->_maxAscii) {
-            (*dataHandle)->increaseAsciiSize(newLen+1);
+    if (dataHandle[0]->_isAsciiValid){
+        if (newLen+1 > dataHandle[0]->_maxAscii) {
+            dataHandle[0]->increaseAsciiSize(newLen+1);
         }
         
         // Ensure null termination, although newly allocated
         // bytes contain garbage.
-        (*dataHandle)->_ascii[newLen] = 0;
+        dataHandle[0]->_ascii[newLen] = 0;
     }
-    else if ((*dataHandle)->_isUnicodeValid){
-        if (newLen > (*dataHandle)->_maxUnicode) {
-            (*dataHandle)->increaseUnicodeSize(newLen);
+    else if (dataHandle[0]->_isUnicodeValid){
+        if (newLen > dataHandle[0]->_maxUnicode) {
+            dataHandle[0]->increaseUnicodeSize(newLen);
         }
     }
     else
         QSTRING_FAILURE ("invalid character cache\n");
 
-    (*dataHandle)->_length = newLen;
+    dataHandle[0]->_length = newLen;
 }
 
 
 void QString::truncate(uint newLen)
 {
-    if ( newLen < (*dataHandle)->_length )
+    if ( newLen < dataHandle[0]->_length )
 	setLength( newLen );
 }
 
@@ -2373,14 +2373,14 @@ void QString::fill(QChar qc, int len)
 #endif
     // len == -1 means fill to string length.
     if ( len < 0 )
-	len = (*dataHandle)->_length;
+	len = dataHandle[0]->_length;
         
     if ( len == 0 ) {
         deref();
         dataHandle = makeSharedNullHandle();
-        (*dataHandle)->ref();
+        dataHandle[0]->ref();
     } else {
-        if ((*dataHandle)->_isAsciiValid && IS_ASCII_QCHAR(qc)){
+        if (dataHandle[0]->_isAsciiValid && IS_ASCII_QCHAR(qc)){
             setLength(len);
             char *nd = (char *)ascii();
             while (len--) 
@@ -2413,9 +2413,9 @@ QString &QString::operator+=(const QString &qs)
 {
     detach();
 
-    if ((*dataHandle)->_isUnicodeValid && (*dataHandle)->_length + qs.data()->_length < (*dataHandle)->_maxUnicode){
+    if (dataHandle[0]->_isUnicodeValid && dataHandle[0]->_length + qs.data()->_length < dataHandle[0]->_maxUnicode){
         uint i = qs.data()->_length;
-        QChar *tp = &(*dataHandle)->_unicode[(*dataHandle)->_length];
+        QChar *tp = &dataHandle[0]->_unicode[dataHandle[0]->_length];
         if (qs.data()->_isAsciiValid){
             char *fp = (char *)qs.ascii();
             while (i--)
@@ -2428,20 +2428,20 @@ QString &QString::operator+=(const QString &qs)
         }
         else 
             QSTRING_FAILURE ("invalid character cache\n");
-        (*dataHandle)->_length += qs.data()->_length;
+        dataHandle[0]->_length += qs.data()->_length;
         return *this;
     }
-    else if ((*dataHandle)->_isAsciiValid && qs.data()->_isAsciiValid && (*dataHandle)->_length + qs.data()->_length < (*dataHandle)->_maxAscii){
+    else if (dataHandle[0]->_isAsciiValid && qs.data()->_isAsciiValid && dataHandle[0]->_length + qs.data()->_length < dataHandle[0]->_maxAscii){
         uint i = qs.data()->_length;
-        char *tp = &(*dataHandle)->_ascii[(*dataHandle)->_length];
+        char *tp = &dataHandle[0]->_ascii[dataHandle[0]->_length];
         char *fp = (char *)qs.ascii();
         while (i--)
             *tp++ = *fp++;
         *tp = 0;
-        (*dataHandle)->_length += qs.data()->_length;
+        dataHandle[0]->_length += qs.data()->_length;
         return *this;
     }
-    return insert((*dataHandle)->_length, qs);
+    return insert(dataHandle[0]->_length, qs);
 }
 
 QString &QString::operator+=(QChar qc)
@@ -2488,11 +2488,11 @@ QString &QString::operator+=(char ch)
 
 QCString QString::convertToQCString(CFStringEncoding enc) const
 {
-    uint len = (*dataHandle)->_length;
+    uint len = dataHandle[0]->_length;
     if (len) {
         char *chs = (char *)CFAllocatorAllocate(kCFAllocatorDefault, len + 1, 0);
         if (chs) {
-            CFStringRef s = getCFMutableString(); // autoreleased
+            CFStringRef s = getCFString();
             if (!CFStringGetCString(s, chs, len + 1, enc)) {
                 *reinterpret_cast<char *>(chs) = '\0';
             }
@@ -2579,24 +2579,24 @@ QConstString::QConstString(const QChar* unicode, uint length ) :
 
 QConstString::~QConstString()
 {
-    if ( (*dataHandle)->refCount > 1 ) {
+    if ( dataHandle[0]->refCount > 1 ) {
         QChar *tp, *fp = (QChar *)unicode();
-        if ((*dataHandle)->_length <= QS_INTERNAL_BUFFER_UCHARS){
-            (*dataHandle)->_maxUnicode = QS_INTERNAL_BUFFER_UCHARS;
-            tp = (QChar *)&(*dataHandle)->_internalBuffer[0];
-            (*dataHandle)->_isUnicodeInternal = 1;
+        if (dataHandle[0]->_length <= QS_INTERNAL_BUFFER_UCHARS){
+            dataHandle[0]->_maxUnicode = QS_INTERNAL_BUFFER_UCHARS;
+            tp = (QChar *)&dataHandle[0]->_internalBuffer[0];
+            dataHandle[0]->_isUnicodeInternal = 1;
         }
         else {
-            (*dataHandle)->_maxUnicode = ALLOC_QCHAR_GOOD_SIZE((*dataHandle)->_length);
-            tp = ALLOC_QCHAR( (*dataHandle)->_maxUnicode );
-            (*dataHandle)->_isUnicodeInternal = 0;
+            dataHandle[0]->_maxUnicode = ALLOC_QCHAR_GOOD_SIZE(dataHandle[0]->_length);
+            tp = ALLOC_QCHAR( dataHandle[0]->_maxUnicode );
+            dataHandle[0]->_isUnicodeInternal = 0;
         }
-        memcpy( tp, fp, (*dataHandle)->_length*sizeof(QChar) );
-        (*dataHandle)->_unicode = tp;
-	(*dataHandle)->_isUnicodeValid = 1;
-        (*dataHandle)->_isAsciiValid = 0;
+        memcpy( tp, fp, dataHandle[0]->_length*sizeof(QChar) );
+        dataHandle[0]->_unicode = tp;
+	dataHandle[0]->_isUnicodeValid = 1;
+        dataHandle[0]->_isAsciiValid = 0;
     } else {
-	(*dataHandle)->_unicode = 0;
+	dataHandle[0]->_unicode = 0;
     }
 }
 
diff --git a/WebCore/kwq/KWQStringList.mm b/WebCore/kwq/KWQStringList.mm
index 5ae691f..e334ccf 100644
--- a/WebCore/kwq/KWQStringList.mm
+++ b/WebCore/kwq/KWQStringList.mm
@@ -30,7 +30,7 @@
 // No need to CFRelease return value
 static CFStringRef GetCFString(const QString &s)
 {
-    CFStringRef cfs = s.getCFMutableString();
+    CFStringRef cfs = s.getCFString();
     if (cfs == NULL) {
         cfs = CFSTR("");
     }
diff --git a/WebCore/kwq/KWQTextCodec.mm b/WebCore/kwq/KWQTextCodec.mm
index 63f2702..004de4c 100644
--- a/WebCore/kwq/KWQTextCodec.mm
+++ b/WebCore/kwq/KWQTextCodec.mm
@@ -100,7 +100,7 @@ QTextDecoder *QTextCodec::makeDecoder() const
 
 QCString QTextCodec::fromUnicode(const QString &qcs) const
 {
-    CFStringRef cfs = qcs.getCFMutableString();
+    CFStringRef cfs = qcs.getCFString();
     CFRange range = CFRangeMake(0, CFStringGetLength(cfs));
     CFIndex bufferLength;
     CFStringGetBytes(cfs, range, encoding, '?', false, NULL, 0x7FFFFFFF, &bufferLength);
diff --git a/WebCore/kwq/KWQTextField.mm b/WebCore/kwq/KWQTextField.mm
index 885c2dd..c3e1606 100644
--- a/WebCore/kwq/KWQTextField.mm
+++ b/WebCore/kwq/KWQTextField.mm
@@ -227,14 +227,14 @@
 - (NSView *)nextKeyView
 {
     return inNextValidKeyView
-        ? KWQKHTMLPartImpl::nextKeyView(widget, KWQSelectingNext)
+        ? KWQKHTMLPartImpl::nextKeyViewForWidget(widget, KWQSelectingNext)
         : [super nextKeyView];
 }
 
 - (NSView *)previousKeyView
 {
    return inNextValidKeyView
-        ? KWQKHTMLPartImpl::nextKeyView(widget, KWQSelectingPrevious)
+        ? KWQKHTMLPartImpl::nextKeyViewForWidget(widget, KWQSelectingPrevious)
         : [super previousKeyView];
 }
 
@@ -350,14 +350,14 @@
 - (NSView *)nextKeyView
 {
     return inNextValidKeyView
-        ? KWQKHTMLPartImpl::nextKeyView(widget, KWQSelectingNext)
+        ? KWQKHTMLPartImpl::nextKeyViewForWidget(widget, KWQSelectingNext)
         : [super nextKeyView];
 }
 
 - (NSView *)previousKeyView
 {
    return inNextValidKeyView
-        ? KWQKHTMLPartImpl::nextKeyView(widget, KWQSelectingPrevious)
+        ? KWQKHTMLPartImpl::nextKeyViewForWidget(widget, KWQSelectingPrevious)
         : [super previousKeyView];
 }
 
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index f328cd4..e2dde34 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -112,6 +112,9 @@ typedef khtml::RenderPart KHTMLRenderPart;
 - (NSView *)nextKeyView;
 - (NSView *)previousKeyView;
 
+- (NSView *)nextKeyViewInsideWebViews;
+- (NSView *)previousKeyViewInsideWebViews;
+
 - (NSObject *)copyDOMTree:(id <WebCoreDOMTreeCopier>)copier;
 - (NSObject *)copyRenderTree:(id <WebCoreRenderTreeCopier>)copier;
 
@@ -175,6 +178,9 @@ typedef khtml::RenderPart KHTMLRenderPart;
 
 - (void)addBackForwardItemWithURL:(NSURL *)URL anchor:(NSString *)anchor;
 
+- (NSView *)nextKeyViewOutsideWebViews;
+- (NSView *)previousKeyViewOutsideWebViews;
+
 @end
 
 // This interface definition allows those who hold a WebCoreBridge * to call all the methods
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index aaff364..ba3455c 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -445,19 +445,27 @@ using khtml::RenderPart;
 
 - (CFStringEncoding)textEncoding
 {
-    return KWQCFStringEncodingFromIANACharsetName(part->encoding().getCFMutableString());
+    return KWQCFStringEncodingFromIANACharsetName(part->encoding().getCFString());
 }
 
 - (NSView *)nextKeyView
 {
-    NodeImpl *nullNode = 0;
-    return part->impl->nextKeyView(nullNode, KWQSelectingNext);
+    return part->impl->nextKeyView(0, KWQSelectingNext);
 }
 
 - (NSView *)previousKeyView
 {
-    NodeImpl *nullNode = 0;
-    return part->impl->nextKeyView(nullNode, KWQSelectingPrevious);
+    return part->impl->nextKeyView(0, KWQSelectingPrevious);
+}
+
+- (NSView *)nextKeyViewInsideWebViews
+{
+    return part->impl->nextKeyViewInFrameHierarchy(0, KWQSelectingNext);
+}
+
+- (NSView *)previousKeyViewInsideWebViews
+{
+    return part->impl->nextKeyViewInFrameHierarchy(0, KWQSelectingPrevious);
 }
 
 @end
diff --git a/WebCore/kwq/qt/qstring.h b/WebCore/kwq/qt/qstring.h
index a971e5b..692e649 100644
--- a/WebCore/kwq/qt/qstring.h
+++ b/WebCore/kwq/qt/qstring.h
@@ -265,7 +265,7 @@ inline bool operator<(char ch, QChar qc)
 }
 
 // Keep this struct to <= 46 bytes, that's what the system will allocate.
-// Will be rounded up even multiple of for, so we're stuck at 44.
+// Will be rounded up to a multiple of 4, so we're stuck at 44.
 
 #define QS_INTERNAL_BUFFER_SIZE 20
 #define QS_INTERNAL_BUFFER_CHARS QS_INTERNAL_BUFFER_SIZE-1
@@ -295,7 +295,6 @@ struct QStringData {
     void operator delete(void*p);
 #endif
 
-
     inline void ref() { refCount++; }
     inline void deref() { if (--refCount == 0 && _isHeapAllocated) delete this; }
         
@@ -334,23 +333,19 @@ public:
     QString(const char *, int len);
     
     QString(const QString &);
+    QString &operator=(const QString &);
 
     ~QString();
 
-    static QString fromLatin1(const char * /* NOTE: len NOT used */ );
+    static QString fromLatin1(const char *);
     static QString fromStringWithEncoding(const char *, int, CFStringEncoding);
-    static QString fromCFMutableString(CFMutableStringRef);
     static QString fromCFString(CFStringRef);
     static QString fromNSString(NSString *);
     
-    static QString gstring_toQString(CFMutableStringRef *ref, UniChar *uchars, int len);
-    static CFMutableStringRef gstring_toCFString(CFMutableStringRef *ref, UniChar *uchars, int len);
-
-    QString &operator=(const QString &);
-    QString &operator=(const QCString &);
-    QString &operator=(const char *);
-    QString &operator=(QChar);
     QString &operator=(char);
+    QString &operator=(QChar);
+    QString &operator=(const char *);
+    QString &operator=(const QCString &);
 
     uint length() const;
 
@@ -366,23 +361,24 @@ public:
     QChar at(uint) const;
 
     int compare(const QString &) const;
+    int compare(const char *) const;
 
     bool startsWith(const QString &) const;
 
-    int find(char, int index=0) const;
-    int find(QChar, int index=0) const;
-    int find(const char *, int index=0, bool cs=true) const;
-    int find(const QString &, int index=0, bool cs=true) const;
-    int find(const QRegExp &, int index=0) const;
+    int find(char, int index = 0) const;
+    int find(QChar, int index = 0) const;
+    int find(const char *, int index = 0, bool cs = true) const;
+    int find(const QString &, int index = 0, bool cs = true) const;
+    int find(const QRegExp &, int index = 0) const;
 
-    int findRev(char, int index=-1) const;
-    int findRev(const QString& str, int index, bool cs=true ) const;
-    int findRev(const char *, int index=-1) const;
+    int findRev(char, int index = -1) const;
+    int findRev(const QString& str, int index, bool cs = true) const;
+    int findRev(const char *, int index = -1) const;
 
     int contains(char) const;
-    int contains(const char *, bool cs=true) const;
-    int contains(const QString &, bool cs=true) const;
-    int contains( QChar c, bool cs=true ) const;
+    int contains(const char *, bool cs = true) const;
+    int contains(const QString &, bool cs = true) const;
+    int contains(QChar c, bool cs = true) const;
 
     bool endsWith(const QString &) const;
 
@@ -456,7 +452,7 @@ public:
     void compose();
     QString visual();
 
-    CFMutableStringRef getCFMutableString() const;
+    CFStringRef getCFString() const;
     NSString *getNSString() const;
 
     bool operator!() const;
@@ -467,7 +463,7 @@ public:
     QString &operator+=(QChar);
     QString &operator+=(char);
 
-    void setBufferFromCFString(CFStringRef cfs);
+    void setBufferFromCFString(CFStringRef);
     
 private:
     // Used by QConstString.
@@ -476,14 +472,11 @@ private:
     void detachInternal();
     void deref();
     void forceUnicode();
-    void setLength( uint pos );
+    void setLength(uint);
 
     struct QStringData *data() const;
     
-    enum CacheType { CacheInvalid, CacheUnicode, CacheLatin1 };
-
     QCString convertToQCString(CFStringEncoding) const;
-    int compareToLatin1(const char *chs) const;
 
     struct QStringData **dataHandle;
     struct QStringData internalData;
@@ -495,27 +488,6 @@ private:
 
     friend bool operator==(const QString &, const QString &);
     friend bool operator==(const QString &, const char *);
-    friend bool operator==(const char *, const QString &);
-
-    friend bool operator!=(const QString &, const QString &);
-    friend bool operator!=(const QString &, const char *);
-    friend bool operator!=(const char *, const QString &);
-
-    friend bool operator>(const QString &, const QString &);
-    friend bool operator>(const QString &, const char *);
-    friend bool operator>(const char *, const QString &);
-
-    friend bool operator>=(const QString &, const QString &);
-    friend bool operator>=(const QString &, const char *);
-    friend bool operator>=(const char *, const QString &);
-
-    friend bool operator<=(const QString &, const QString &);
-    friend bool operator<=(const QString &, const char *);
-    friend bool operator<=(const char *, const QString &);
-
-    friend bool operator<(const QString &, const QString &);
-    friend bool operator<(const QString &, const char *);
-    friend bool operator<(const char *, const QString &);
 
     friend class QConstString;
     friend class QGDict;
@@ -594,12 +566,12 @@ inline bool operator<(const QString &qs1, const QString &qs2)
 
 inline bool operator<(const QString &qs, const char *chs)
 {
-    return qs.compareToLatin1(chs) < 0;
+    return qs.compare(chs) < 0;
 }
 
 inline bool operator<(const char *chs, const QString &qs)
 {
-    return qs.compareToLatin1(chs) > 0;
+    return qs.compare(chs) > 0;
 }
 
 inline bool operator<=(const QString &qs1, const QString &qs2)
@@ -609,12 +581,12 @@ inline bool operator<=(const QString &qs1, const QString &qs2)
 
 inline bool operator<=(const QString &qs, const char *chs)
 {
-    return qs.compareToLatin1(chs) <= 0;
+    return qs.compare(chs) <= 0;
 }
 
 inline bool operator<=(const char *chs, const QString &qs)
 {
-    return qs.compareToLatin1(chs) >= 0;
+    return qs.compare(chs) >= 0;
 }
 
 inline bool operator>(const QString &qs1, const QString &qs2)
@@ -624,12 +596,12 @@ inline bool operator>(const QString &qs1, const QString &qs2)
 
 inline bool operator>(const QString &qs, const char *chs)
 {
-    return qs.compareToLatin1(chs) > 0;
+    return qs.compare(chs) > 0;
 }
 
 inline bool operator>(const char *chs, const QString &qs)
 {
-    return qs.compareToLatin1(chs) < 0;
+    return qs.compare(chs) < 0;
 }
 
 inline bool operator>=(const QString &qs1, const QString &qs2)
@@ -639,12 +611,12 @@ inline bool operator>=(const QString &qs1, const QString &qs2)
 
 inline bool operator>=(const QString &qs, const char *chs)
 {
-    return qs.compareToLatin1(chs) >= 0;
+    return qs.compare(chs) >= 0;
 }
 
 inline bool operator>=(const char *chs, const QString &qs)
 {
-    return qs.compareToLatin1(chs) <= 0;
+    return qs.compare(chs) <= 0;
 }
 
 class QConstString : private QString {
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index cea4799..db3a582 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,21 @@
+2002-08-20  Darin Adler  <darin at apple.com>
+
+	WebKit part of support for tabbing into and out of the toolbar.
+
+        * WebCoreSupport.subproj/WebBridge.m:
+        (-[WebBridge nextKeyViewOutsideWebViews]): Ask the main WebView for its
+	nextKeyView on behalf of WebCore.
+        (-[WebBridge previousKeyViewOutsideWebViews]): Ask the main WebView for its
+	previousKeyView on behalf of WebCore.
+
+        * WebView.subproj/WebHTMLView.m: (-[WebHTMLView becomeFirstResponder]):
+	When we are being tabbed-into, make the first or last view in the bridge
+	first responder, instead of taking it ourselves.
+
+        * WebView.subproj/WebView.m: (-[WebView becomeFirstResponder]):
+	Always make the document view the first responder instead of taking it
+	ourselves.
+
 2002-08-19  Chris Blumenberg  <cblu at apple.com>
 
 	Fixed 3025019: "only-if-cached" attribute fetches data from network if cached but expired
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index cea4799..db3a582 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,21 @@
+2002-08-20  Darin Adler  <darin at apple.com>
+
+	WebKit part of support for tabbing into and out of the toolbar.
+
+        * WebCoreSupport.subproj/WebBridge.m:
+        (-[WebBridge nextKeyViewOutsideWebViews]): Ask the main WebView for its
+	nextKeyView on behalf of WebCore.
+        (-[WebBridge previousKeyViewOutsideWebViews]): Ask the main WebView for its
+	previousKeyView on behalf of WebCore.
+
+        * WebView.subproj/WebHTMLView.m: (-[WebHTMLView becomeFirstResponder]):
+	When we are being tabbed-into, make the first or last view in the bridge
+	first responder, instead of taking it ourselves.
+
+        * WebView.subproj/WebView.m: (-[WebView becomeFirstResponder]):
+	Always make the document view the first responder instead of taking it
+	ourselves.
+
 2002-08-19  Chris Blumenberg  <cblu at apple.com>
 
 	Fixed 3025019: "only-if-cached" attribute fetches data from network if cached but expired
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 7de4611..4d3f8b9 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -313,4 +313,14 @@
     return [[frame controller] userAgentForURL:URL];
 }
 
+- (NSView *)nextKeyViewOutsideWebViews
+{
+    return [[[[frame controller] mainFrame] webView] nextKeyView];
+}
+
+- (NSView *)previousKeyViewOutsideWebViews
+{
+    return [[[[frame controller] mainFrame] webView] previousKeyView];
+}
+
 @end
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index 03ece29..2eecb8c 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -179,6 +179,14 @@ enum {
     return YES;
 }
 
+- (BOOL)becomeFirstResponder
+{
+    if ([self documentView]) {
+        [[self window] makeFirstResponder:[self documentView]];
+    }
+    return YES;
+}
+
 - (BOOL)isOpaque
 {
     return YES;
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index fb54d04..5a143f2 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -557,12 +557,16 @@
 
 - (NSView *)nextKeyView
 {
-    return (_private && _private->inNextValidKeyView) ? [[self _bridge] nextKeyView] : [super nextKeyView];
+    return (_private && _private->inNextValidKeyView)
+        ? [[self _bridge] nextKeyView]
+        : [super nextKeyView];
 }
 
 - (NSView *)previousKeyView
 {
-    return (_private && _private->inNextValidKeyView) ? [[self _bridge] previousKeyView] : [super previousKeyView];
+    return (_private && _private->inNextValidKeyView)
+        ? [[self _bridge] previousKeyView]
+        : [super previousKeyView];
 }
 
 - (NSView *)nextValidKeyView
@@ -581,4 +585,23 @@
     return view;
 }
 
+- (BOOL)becomeFirstResponder
+{
+    NSView *view = nil;
+    switch ([[self window] keyViewSelectionDirection]) {
+    case NSDirectSelection:
+        break;
+    case NSSelectingNext:
+        view = [[self _bridge] nextKeyViewInsideWebViews];
+        break;
+    case NSSelectingPrevious:
+        view = [[self _bridge] previousKeyViewInsideWebViews];
+        break;
+    }
+    if (view) {
+        [[self window] makeFirstResponder:view];
+    } 
+    return YES;
+}
+
 @end

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list