[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:27:54 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 04ad623d3147d91c4a4ff6e0e1b6f683e949cf04
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jul 29 20:54:00 2002 +0000

    top level:
    
            * Tests/kde/kurl-test.cpp: (operator<<):
            * Tests/qt/qregexp-test.cpp: (operator<<):
            * Tests/qt/qstring-test.cpp: (operator<<):
            * Tests/qt/qstringlist-test.cpp: (operator<<):
    	Added output streaming so the tests work even without the implicit
    	conversion of QString to const char *.
    
    WebCore:
    
    	- fixed 3010875 -- Find only works for latin characters
    	- dealt with part of 2948387 -- stop button flashes to "go" twice while loading citibank.com
    
            * force-clean-timestamp: Make everyone do a make clean because dependencies won't do
    	the right thing.
    
            * khtml/khtml_part.h:
            * khtml/khtml_part.cpp: (KHTMLPart::slotRedirect): Changed the APPLE_CHANGES ifdefs around
    	in this function so we can start using it again.
    	(KHTMLPart::jumpToSelection): Removed. The bridge goes straight to the impl.
    
            * kwq/WebCoreBridge.mm: (-[WebCoreBridge jumpToSelection]): Go straight to the impl.
    
            * WebCore-tests.exp: One new export needed for tests with change to qstring.h.
    
            * kwq/qt/qevent.h:
            * kwq/KWQEvent.mm: Removed unused stuff.
    
            * kwq/KWQKHTMLPartImpl.h: Removed redirectURL(); we now use KHTMLPart::slotRedirect().
    
            * kwq/KWQKHTMLPartImpl.mm:
            (KWQKHTMLPartImpl::write): Call latin1() explicitly in here for m_documentSource. It was being
    	done implicitly before.
            (KWQKHTMLPartImpl::scheduleRedirection): Get rid of 1-second minimum delay for meta refresh.
            (KWQKHTMLPartImpl::timerEvent): Call KHTMLPart::slotRedirect() instead of redirectURL(), because
    	they were identical, so we don't need our own copy.
    
            * kwq/kdeui/kmessagebox.h:
            * kwq/KWQKMessageBox.mm: (KMessageBox::questionYesNo): Added dontAskAgain string parameter.
    	Before, it was being turned into a bool!
    
            * kwq/KWQKProtocolManager.mm: Tweak and add FIXME.
    
            * kwq/qt/qstring.h: Remove implicit conversion to const char *, which causes only pain.
            * kwq/KWQString.mm:
            (QString::find): Add caseSensitive parameter to the QString overload of this.
            (QString::contains): Add a QString version of this.
    
            * kwq/character-sets.txt: Add the MIB number for ISO-10646-J-1.
            * kwq/make-charset-table.pl: Remove special case for ISO-10646-J-1 MIB number.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1691 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index a1c6214..576aab7 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,46 @@
+2002-07-29  Darin Adler  <darin at apple.com>
+
+	- fixed 3010875 -- Find only works for latin characters
+	- dealt with part of 2948387 -- stop button flashes to "go" twice while loading citibank.com
+
+        * force-clean-timestamp: Make everyone do a make clean because dependencies won't do
+	the right thing.
+
+        * khtml/khtml_part.h:
+        * khtml/khtml_part.cpp: (KHTMLPart::slotRedirect): Changed the APPLE_CHANGES ifdefs around
+	in this function so we can start using it again.
+	(KHTMLPart::jumpToSelection): Removed. The bridge goes straight to the impl. 
+
+        * kwq/WebCoreBridge.mm: (-[WebCoreBridge jumpToSelection]): Go straight to the impl.
+
+        * WebCore-tests.exp: One new export needed for tests with change to qstring.h.
+
+        * kwq/qt/qevent.h:
+        * kwq/KWQEvent.mm: Removed unused stuff.
+
+        * kwq/KWQKHTMLPartImpl.h: Removed redirectURL(); we now use KHTMLPart::slotRedirect().
+
+        * kwq/KWQKHTMLPartImpl.mm:
+        (KWQKHTMLPartImpl::write): Call latin1() explicitly in here for m_documentSource. It was being
+	done implicitly before.
+        (KWQKHTMLPartImpl::scheduleRedirection): Get rid of 1-second minimum delay for meta refresh.
+        (KWQKHTMLPartImpl::timerEvent): Call KHTMLPart::slotRedirect() instead of redirectURL(), because
+	they were identical, so we don't need our own copy.
+
+        * kwq/kdeui/kmessagebox.h:
+        * kwq/KWQKMessageBox.mm: (KMessageBox::questionYesNo): Added dontAskAgain string parameter.
+	Before, it was being turned into a bool!
+
+        * kwq/KWQKProtocolManager.mm: Tweak and add FIXME.
+
+        * kwq/qt/qstring.h: Remove implicit conversion to const char *, which causes only pain.
+        * kwq/KWQString.mm:
+        (QString::find): Add caseSensitive parameter to the QString overload of this.
+        (QString::contains): Add a QString version of this.
+
+        * kwq/character-sets.txt: Add the MIB number for ISO-10646-J-1.
+        * kwq/make-charset-table.pl: Remove special case for ISO-10646-J-1 MIB number.
+
 2002-07-29  Richard Williamson  <rjw at apple.com>
 
         Fixed 3009074.  Added KHTMLPart::jumpToSelection and related scaffolding (part impl, bridge, etc.)
@@ -31,12 +74,6 @@
 	be Mac MSIE, since Mac MSIE incorrectly computes the containing
 	block and sites have to correct for that.
 	
-        * ChangeLog:
-        * kwq/KWQKProtocolManager.mm:
-        (KProtocolManager::userAgentForHost):
-
-2002-07-26  David Hyatt  <hyatt at apple.com>
-
         * kwq/KWQKProtocolManager.mm:
         (KProtocolManager::userAgentForHost):
 
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index a1c6214..576aab7 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,46 @@
+2002-07-29  Darin Adler  <darin at apple.com>
+
+	- fixed 3010875 -- Find only works for latin characters
+	- dealt with part of 2948387 -- stop button flashes to "go" twice while loading citibank.com
+
+        * force-clean-timestamp: Make everyone do a make clean because dependencies won't do
+	the right thing.
+
+        * khtml/khtml_part.h:
+        * khtml/khtml_part.cpp: (KHTMLPart::slotRedirect): Changed the APPLE_CHANGES ifdefs around
+	in this function so we can start using it again.
+	(KHTMLPart::jumpToSelection): Removed. The bridge goes straight to the impl. 
+
+        * kwq/WebCoreBridge.mm: (-[WebCoreBridge jumpToSelection]): Go straight to the impl.
+
+        * WebCore-tests.exp: One new export needed for tests with change to qstring.h.
+
+        * kwq/qt/qevent.h:
+        * kwq/KWQEvent.mm: Removed unused stuff.
+
+        * kwq/KWQKHTMLPartImpl.h: Removed redirectURL(); we now use KHTMLPart::slotRedirect().
+
+        * kwq/KWQKHTMLPartImpl.mm:
+        (KWQKHTMLPartImpl::write): Call latin1() explicitly in here for m_documentSource. It was being
+	done implicitly before.
+        (KWQKHTMLPartImpl::scheduleRedirection): Get rid of 1-second minimum delay for meta refresh.
+        (KWQKHTMLPartImpl::timerEvent): Call KHTMLPart::slotRedirect() instead of redirectURL(), because
+	they were identical, so we don't need our own copy.
+
+        * kwq/kdeui/kmessagebox.h:
+        * kwq/KWQKMessageBox.mm: (KMessageBox::questionYesNo): Added dontAskAgain string parameter.
+	Before, it was being turned into a bool!
+
+        * kwq/KWQKProtocolManager.mm: Tweak and add FIXME.
+
+        * kwq/qt/qstring.h: Remove implicit conversion to const char *, which causes only pain.
+        * kwq/KWQString.mm:
+        (QString::find): Add caseSensitive parameter to the QString overload of this.
+        (QString::contains): Add a QString version of this.
+
+        * kwq/character-sets.txt: Add the MIB number for ISO-10646-J-1.
+        * kwq/make-charset-table.pl: Remove special case for ISO-10646-J-1 MIB number.
+
 2002-07-29  Richard Williamson  <rjw at apple.com>
 
         Fixed 3009074.  Added KHTMLPart::jumpToSelection and related scaffolding (part impl, bridge, etc.)
@@ -31,12 +74,6 @@
 	be Mac MSIE, since Mac MSIE incorrectly computes the containing
 	block and sites have to correct for that.
 	
-        * ChangeLog:
-        * kwq/KWQKProtocolManager.mm:
-        (KProtocolManager::userAgentForHost):
-
-2002-07-26  David Hyatt  <hyatt at apple.com>
-
         * kwq/KWQKProtocolManager.mm:
         (KProtocolManager::userAgentForHost):
 
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index a1c6214..576aab7 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,46 @@
+2002-07-29  Darin Adler  <darin at apple.com>
+
+	- fixed 3010875 -- Find only works for latin characters
+	- dealt with part of 2948387 -- stop button flashes to "go" twice while loading citibank.com
+
+        * force-clean-timestamp: Make everyone do a make clean because dependencies won't do
+	the right thing.
+
+        * khtml/khtml_part.h:
+        * khtml/khtml_part.cpp: (KHTMLPart::slotRedirect): Changed the APPLE_CHANGES ifdefs around
+	in this function so we can start using it again.
+	(KHTMLPart::jumpToSelection): Removed. The bridge goes straight to the impl. 
+
+        * kwq/WebCoreBridge.mm: (-[WebCoreBridge jumpToSelection]): Go straight to the impl.
+
+        * WebCore-tests.exp: One new export needed for tests with change to qstring.h.
+
+        * kwq/qt/qevent.h:
+        * kwq/KWQEvent.mm: Removed unused stuff.
+
+        * kwq/KWQKHTMLPartImpl.h: Removed redirectURL(); we now use KHTMLPart::slotRedirect().
+
+        * kwq/KWQKHTMLPartImpl.mm:
+        (KWQKHTMLPartImpl::write): Call latin1() explicitly in here for m_documentSource. It was being
+	done implicitly before.
+        (KWQKHTMLPartImpl::scheduleRedirection): Get rid of 1-second minimum delay for meta refresh.
+        (KWQKHTMLPartImpl::timerEvent): Call KHTMLPart::slotRedirect() instead of redirectURL(), because
+	they were identical, so we don't need our own copy.
+
+        * kwq/kdeui/kmessagebox.h:
+        * kwq/KWQKMessageBox.mm: (KMessageBox::questionYesNo): Added dontAskAgain string parameter.
+	Before, it was being turned into a bool!
+
+        * kwq/KWQKProtocolManager.mm: Tweak and add FIXME.
+
+        * kwq/qt/qstring.h: Remove implicit conversion to const char *, which causes only pain.
+        * kwq/KWQString.mm:
+        (QString::find): Add caseSensitive parameter to the QString overload of this.
+        (QString::contains): Add a QString version of this.
+
+        * kwq/character-sets.txt: Add the MIB number for ISO-10646-J-1.
+        * kwq/make-charset-table.pl: Remove special case for ISO-10646-J-1 MIB number.
+
 2002-07-29  Richard Williamson  <rjw at apple.com>
 
         Fixed 3009074.  Added KHTMLPart::jumpToSelection and related scaffolding (part impl, bridge, etc.)
@@ -31,12 +74,6 @@
 	be Mac MSIE, since Mac MSIE incorrectly computes the containing
 	block and sites have to correct for that.
 	
-        * ChangeLog:
-        * kwq/KWQKProtocolManager.mm:
-        (KProtocolManager::userAgentForHost):
-
-2002-07-26  David Hyatt  <hyatt at apple.com>
-
         * kwq/KWQKProtocolManager.mm:
         (KProtocolManager::userAgentForHost):
 
diff --git a/WebCore/WebCore-tests.exp b/WebCore/WebCore-tests.exp
index 3ef8f9f..82cf0ed 100644
--- a/WebCore/WebCore-tests.exp
+++ b/WebCore/WebCore-tests.exp
@@ -260,6 +260,7 @@ __ZNK7QString3argEti
 __ZNK7QString3midEjj
 __ZNK7QString4findEPKcib
 __ZNK7QString4findERK7QRegExpi
+__ZNK7QString4findERKS_ib
 __ZNK7QString4leftEj
 __ZNK7QString5lowerEv
 __ZNK7QString5rightEj
diff --git a/WebCore/force-clean-timestamp b/WebCore/force-clean-timestamp
index 1e99be8..cbb00e5 100644
--- a/WebCore/force-clean-timestamp
+++ b/WebCore/force-clean-timestamp
@@ -1 +1 @@
-QWidget change 7/24 (and Project Builder bug 3005427)
+QString change 7/29 (and Project Builder bug 3005427)
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index 1269a6e..5a92f57 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -1760,22 +1760,20 @@ void KHTMLPart::slotRedirect()
     //kdDebug( 6050 ) << "KHTMLPart::slotRedirect script=" << script << endl;
     QVariant res = executeScript( script );
     if ( res.type() == QVariant::String ) {
-#ifndef APPLE_CHANGES
       begin( url() );
       write( res.asString() );
       end();
-#endif
     }
     return;
   }
-#ifndef APPLE_CHANGES
   KParts::URLArgs args;
+#ifndef APPLE_CHANGES
   if ( urlcmp( u, m_url.url(), true, true ) )
     args.reload = true;
 
   args.setLockHistory( d->m_redirectLockHistory );
-  urlSelected( u, 0, 0, "_self", args );
 #endif
+  urlSelected( u, 0, 0, "_self", args );
 }
 
 void KHTMLPart::slotRedirection(KIO::Job*, const KURL& url)
@@ -2110,12 +2108,6 @@ QString KHTMLPart::selectedText() const
     return text.mid(start, end-start);
 }
 
-void KHTMLPart::jumpToSelection()
-{
-    impl->jumpToSelection();
-}
-
-
 bool KHTMLPart::hasSelection() const
 {
   return ( !d->m_selectionStart.isNull() &&
diff --git a/WebCore/khtml/khtml_part.h b/WebCore/khtml/khtml_part.h
index 5c0d535..7cda941 100644
--- a/WebCore/khtml/khtml_part.h
+++ b/WebCore/khtml/khtml_part.h
@@ -1091,7 +1091,6 @@ private:
 
 #ifdef APPLE_CHANGES
 public:  
-  void jumpToSelection();
   void setStatusBarText(const QString &);
   KWQKHTMLPartImpl *impl;
   friend class KWQKHTMLPartImpl;
diff --git a/WebCore/kwq/KWQEvent.h b/WebCore/kwq/KWQEvent.h
index bc8ebcc..c4d09a4 100644
--- a/WebCore/kwq/KWQEvent.h
+++ b/WebCore/kwq/KWQEvent.h
@@ -54,7 +54,7 @@ public:
     QEvent( Type t ) : _type(t) {}
     virtual ~QEvent();
 
-    Type type() const;
+    Type type() const { return _type; }
 
 private:
     QEvent(const QEvent &);
@@ -68,13 +68,13 @@ public:
     QMouseEvent(Type type, const QPoint &pos, int button, int state);
     QMouseEvent(Type type, const QPoint &pos, const QPoint &global, int button, int state);
 
-    int x();
-    int y();
-    int globalX();
-    int globalY();
-    const QPoint &pos() const;
-    ButtonState button();
-    ButtonState state();
+    int x() { return _position.x(); }
+    int y() { return _position.y(); }
+    int globalX() { return _position.x(); } // we never really return global X
+    int globalY() { return _position.y(); } // we never really return global Y
+    const QPoint &pos() const { return _position; }
+    ButtonState button() { return _button; }
+    ButtonState state() { return _state; }
     ButtonState stateAfter();
 
 private:
@@ -87,7 +87,6 @@ private:
 class QTimerEvent : public QEvent {
 public:
     QTimerEvent(int timerId);
-    ~QTimerEvent();
 
     int timerId() const { return _timerId; }
 
@@ -110,67 +109,26 @@ public:
     int ascii() const;
 };
 
-class QFocusEvent : public QEvent {
+class QFocusEvent {
 public:
-    enum Reason { Mouse, Tab, ActiveWindow, Popup, Shortcut, Other };
-    
-    QFocusEvent(Type);
-
-    static Reason reason();
-};
-
-class QHideEvent : public QEvent {
-public:
-    QHideEvent(Type);
-};
-
-class QResizeEvent : public QEvent {
-public:
-    QResizeEvent(Type);
-};
-
-class QShowEvent : public QEvent {
-public:
-    QShowEvent(Type);
+    enum Reason { Popup, Other };
+    static Reason reason() { return Other; }
 };
 
-class QWheelEvent : public QEvent {
-public:
-    QWheelEvent(Type);
-
-    void accept();
-    void ignore();
-};
+class QHideEvent;
+class QResizeEvent;
+class QShowEvent;
+class QWheelEvent;
+class QContextMenuEvent;
 
 class QCustomEvent : public QEvent {
 public:
-    QCustomEvent( int type );
-    QCustomEvent( Type type, void *data )
-	: QEvent(type), d(data) {};
-
-    void       *data()	const	{ return d; }
-    void	setData( void* data )	{ d = data; }
+    QCustomEvent(Type type, void *data = 0) : QEvent(type), d(data) { }
+    void *data() const { return d; }
+    void setData(void *data) { d = data; }
 
 private:
-    void       *d;
-};
-
-class QContextMenuEvent : public QEvent
-{
- public:
-    QContextMenuEvent(int, const QPoint &, const QPoint &, Qt::ButtonState);
-
-    int x() const;
-    int y() const;
-    ButtonState state() const;
-    int reason() const;
-    QPoint globalPos() const;
-
- private:
-    int m_reason;
-    QPoint m_pos;
-    QPoint m_globalPos;
-    ButtonState m_state;
+    void *d;
 };
 
 #endif
diff --git a/WebCore/kwq/KWQEvent.mm b/WebCore/kwq/KWQEvent.mm
index aee17fc..05ef378 100644
--- a/WebCore/kwq/KWQEvent.mm
+++ b/WebCore/kwq/KWQEvent.mm
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2001 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -23,26 +23,14 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#import <kwqdebug.h>
 #import <qevent.h>
-
-// class QEvent ================================================================
-
+#import <kwqdebug.h>
 
 QEvent::~QEvent()
 {
-    //_logNotYetImplemented();
-}
-
-
-QEvent::Type QEvent::type() const
-{
-    return _type;
 }
 
 
-// class QMouseEvent ===========================================================
-
 QMouseEvent::QMouseEvent( Type t, const QPoint &pos, int b, int s )
     : QEvent(t), _position(pos), _button((ButtonState)b), _state((ButtonState)s)
 {
@@ -53,58 +41,12 @@ QMouseEvent::QMouseEvent(Type t, const QPoint &pos, const QPoint &, int b, int s
 {
 }
 
-int QMouseEvent::x()
-{
-    return (int)_position.x();
-}
-
-
-int QMouseEvent::y()
-{
-    return (int)_position.y();
-}
-
-
-int QMouseEvent::globalX()
-{
-    _logNotYetImplemented();
-    return 0;
-}
-
-
-int QMouseEvent::globalY()
-{
-    _logNotYetImplemented();
-    return 0;
-}
-
-
-const QPoint &QMouseEvent::pos() const
-{
-    return _position;
-}
-
-
-Qt::ButtonState QMouseEvent::button()
-{
-    return _button;
-}
-
-
-Qt::ButtonState QMouseEvent::state()
-{
-    return _state;
-}
-
-
 Qt::ButtonState QMouseEvent::stateAfter()
 {
     return _state;
 }
 
 
-// class QTimerEvent ===========================================================
-
 QTimerEvent::QTimerEvent(int t)
     : QEvent(Timer)
 {
@@ -112,46 +54,34 @@ QTimerEvent::QTimerEvent(int t)
 }
 
 
-QTimerEvent::~QTimerEvent()
-{
-}
-
-
-// class QKeyEvent =============================================================
-
 QKeyEvent::QKeyEvent(Type t, int, int, int, const QString &, bool, ushort)
     : QEvent(t)
 {
     _logNotYetImplemented();
 }
 
-
 int QKeyEvent::key() const
 {
     _logNotYetImplemented();
     return 0;
 }
 
-
 Qt::ButtonState QKeyEvent::state() const
 {
     _logNotYetImplemented();
     return Qt::NoButton;
 }
 
-
 void QKeyEvent::accept()
 {
     _logNotYetImplemented();
 }
 
-
 void QKeyEvent::ignore()
 {
     _logNotYetImplemented();
 }
 
-
 bool QKeyEvent::isAutoRepeat() const
 {
     _logNotYetImplemented();
@@ -164,7 +94,6 @@ QString QKeyEvent::text(void) const
     return QString();
 }
 
-
 int QKeyEvent::ascii(void) const
 {
     _logNotYetImplemented();
@@ -182,109 +111,3 @@ bool QKeyEvent::isAccepted(void) const
     _logNotYetImplemented();
     return false;
 }
-
-
-// class QFocusEvent ===========================================================
-
-QFocusEvent::QFocusEvent(Type t)
-    : QEvent(t)
-{
-    _logNotYetImplemented();
-}
-
-QFocusEvent::Reason QFocusEvent::reason()
-{
-    _logNotYetImplemented();
-    return Other;
-}
-
-// class QHideEvent ============================================================
-
-QHideEvent::QHideEvent(Type t)
-    : QEvent(t)
-{
-    _logNotYetImplemented();
-}
-
-
-// class QResizeEvent ==========================================================
-
-QResizeEvent::QResizeEvent(Type t)
-    : QEvent(t)
-{
-    _logNotYetImplemented();
-}
-
-
-// class QShowEvent ============================================================
-
-QShowEvent::QShowEvent(Type t)
-    : QEvent(t)
-{
-    _logNotYetImplemented();
-}
-
-
-// class QWheelEvent ===========================================================
-
-QWheelEvent::QWheelEvent(Type t)
-    : QEvent(t)
-{
-    _logNotYetImplemented();
-}
-
-
-void QWheelEvent::accept()
-{
-    _logNotYetImplemented();
-}
-
-
-void QWheelEvent::ignore()
-{
-    _logNotYetImplemented();
-}
-
-
-// class QCustomEvent ===========================================================
-
-QCustomEvent::QCustomEvent( int type )
-    : QEvent( (QEvent::Type)type ), d( 0 )
-{
-}
-
-// class QContextMenuEvent ======================================================
-
-QContextMenuEvent::QContextMenuEvent(int r, const QPoint &p, const QPoint &gp, Qt::ButtonState s) :
-    QEvent(MouseButtonPress),
-    m_reason(r),
-    m_pos(p),
-    m_globalPos(gp),
-    m_state(s)
-{
-}
-
-QPoint QContextMenuEvent::globalPos(void) const
-{
-    return m_globalPos;
-}
-
-int QContextMenuEvent::reason(void) const
-{
-    return m_reason;
-}
-
-QContextMenuEvent::ButtonState QContextMenuEvent::state(void) const
-{
-    return m_state;
-}
-
-int QContextMenuEvent::x(void) const
-{
-    return m_pos.x();
-}
-
-int QContextMenuEvent::y(void) const
-{
-    return m_pos.y();
-}
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index a959617..9127009 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -75,7 +75,6 @@ public:
     void slotData(NSString *, const char *bytes, int length, bool complete = false);
 
     void scheduleRedirection(int delay, const QString &url);
-    void redirectURL();
     virtual void timerEvent(QTimerEvent *);
 
     bool gotoBaseAnchor();
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 477dae4..dd8a518 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -259,7 +259,7 @@ void KWQKHTMLPartImpl::write( const char *str, int len )
     if (m_decodingStarted)
         decoded = d->m_decoder->decode( str, len );
     else    
-        decoded = d->m_decoder->decode( m_documentSource, m_documentSource.length() );
+        decoded = d->m_decoder->decode( m_documentSource.latin1(), m_documentSource.length() );
 
     if(decoded.isEmpty()){
         // Check flag to tell whether the load has completed.
@@ -320,13 +320,13 @@ bool KWQKHTMLPartImpl::gotoBaseAnchor()
 }
 
 // FIXME: Need to remerge this with code in khtml_part.cpp?
+// Specifically, it seems that if we implement QTimer, including
+// some sort of special case to make connect work, we could use
+// KHTMLPart::scheduleRedirection as-is.
 void KWQKHTMLPartImpl::scheduleRedirection(int delay, const QString &url)
 {
     if( d->m_redirectURL.isEmpty() || delay < d->m_delayRedirect )
     {
-        if (delay < 1) {
-            delay = 1;
-        }
         d->m_delayRedirect = delay;
         d->m_redirectURL = url;
         killTimer(m_redirectionTimer);
@@ -336,50 +336,16 @@ void KWQKHTMLPartImpl::scheduleRedirection(int delay, const QString &url)
 
 void KWQKHTMLPartImpl::timerEvent(QTimerEvent *e)
 {
-    if (e->timerId()==m_redirectionTimer)
-    {
-    	redirectURL();
-    	return;
-    }
+    part->slotRedirect();
 }
 
-void KWQKHTMLPartImpl::redirectURL()
-{
-  QString u = d->m_redirectURL;
-  d->m_delayRedirect = 0;
-  d->m_redirectURL = QString::null;
-  if ( u.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 )
-  {
-    QString script = KURL::decode_string( u.right( u.length() - 11 ) );
-    //kdDebug( 6050 ) << "KHTMLPart::slotRedirect script=" << script << endl;
-    QVariant res = part->executeScript( script );
-    if ( res.type() == QVariant::String ) {
-      part->begin( part->url() );
-      part->write( res.asString() );
-      part->end();
-    }
-    return;
-  }
-
-  KParts::URLArgs args;
-#if 0
-  if ( urlcmp( u, m_url.url(), true, true ) )
-    args.reload = true;
-
-  args.setLockHistory( true );
-#endif
-  part->urlSelected( u, 0, 0, QString::null, args );
-}
-
-
-
 void KWQKHTMLPartImpl::urlSelected( const QString &url, int button, int state, const QString &_target, KParts::URLArgs )
 {
     KURL clickedURL(part->completeURL( url));
     KURL refLess(clickedURL);
     WebCoreBridge *frame;
 	
-    if ( url.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 )
+    if ( url.find( "javascript:", 0, false ) == 0 )
     {
         part->executeScript( url.right( url.length() - 11) );
         return;
@@ -500,7 +466,7 @@ void KWQKHTMLPartImpl::submitForm( const char *action, const QString &url, const
 
   QString urlstring = u.url();
 
-  if ( urlstring.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 ) {
+  if ( urlstring.find( "javascript:", 0, false ) == 0 ) {
     urlstring = KURL::decode_string(urlstring);
     part->executeScript( urlstring.right( urlstring.length() - 11) );
     return;
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.h b/WebCore/kwq/KWQKHTMLPartImpl.h
index a959617..9127009 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.h
+++ b/WebCore/kwq/KWQKHTMLPartImpl.h
@@ -75,7 +75,6 @@ public:
     void slotData(NSString *, const char *bytes, int length, bool complete = false);
 
     void scheduleRedirection(int delay, const QString &url);
-    void redirectURL();
     virtual void timerEvent(QTimerEvent *);
 
     bool gotoBaseAnchor();
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index 477dae4..dd8a518 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -259,7 +259,7 @@ void KWQKHTMLPartImpl::write( const char *str, int len )
     if (m_decodingStarted)
         decoded = d->m_decoder->decode( str, len );
     else    
-        decoded = d->m_decoder->decode( m_documentSource, m_documentSource.length() );
+        decoded = d->m_decoder->decode( m_documentSource.latin1(), m_documentSource.length() );
 
     if(decoded.isEmpty()){
         // Check flag to tell whether the load has completed.
@@ -320,13 +320,13 @@ bool KWQKHTMLPartImpl::gotoBaseAnchor()
 }
 
 // FIXME: Need to remerge this with code in khtml_part.cpp?
+// Specifically, it seems that if we implement QTimer, including
+// some sort of special case to make connect work, we could use
+// KHTMLPart::scheduleRedirection as-is.
 void KWQKHTMLPartImpl::scheduleRedirection(int delay, const QString &url)
 {
     if( d->m_redirectURL.isEmpty() || delay < d->m_delayRedirect )
     {
-        if (delay < 1) {
-            delay = 1;
-        }
         d->m_delayRedirect = delay;
         d->m_redirectURL = url;
         killTimer(m_redirectionTimer);
@@ -336,50 +336,16 @@ void KWQKHTMLPartImpl::scheduleRedirection(int delay, const QString &url)
 
 void KWQKHTMLPartImpl::timerEvent(QTimerEvent *e)
 {
-    if (e->timerId()==m_redirectionTimer)
-    {
-    	redirectURL();
-    	return;
-    }
+    part->slotRedirect();
 }
 
-void KWQKHTMLPartImpl::redirectURL()
-{
-  QString u = d->m_redirectURL;
-  d->m_delayRedirect = 0;
-  d->m_redirectURL = QString::null;
-  if ( u.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 )
-  {
-    QString script = KURL::decode_string( u.right( u.length() - 11 ) );
-    //kdDebug( 6050 ) << "KHTMLPart::slotRedirect script=" << script << endl;
-    QVariant res = part->executeScript( script );
-    if ( res.type() == QVariant::String ) {
-      part->begin( part->url() );
-      part->write( res.asString() );
-      part->end();
-    }
-    return;
-  }
-
-  KParts::URLArgs args;
-#if 0
-  if ( urlcmp( u, m_url.url(), true, true ) )
-    args.reload = true;
-
-  args.setLockHistory( true );
-#endif
-  part->urlSelected( u, 0, 0, QString::null, args );
-}
-
-
-
 void KWQKHTMLPartImpl::urlSelected( const QString &url, int button, int state, const QString &_target, KParts::URLArgs )
 {
     KURL clickedURL(part->completeURL( url));
     KURL refLess(clickedURL);
     WebCoreBridge *frame;
 	
-    if ( url.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 )
+    if ( url.find( "javascript:", 0, false ) == 0 )
     {
         part->executeScript( url.right( url.length() - 11) );
         return;
@@ -500,7 +466,7 @@ void KWQKHTMLPartImpl::submitForm( const char *action, const QString &url, const
 
   QString urlstring = u.url();
 
-  if ( urlstring.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 ) {
+  if ( urlstring.find( "javascript:", 0, false ) == 0 ) {
     urlstring = KURL::decode_string(urlstring);
     part->executeScript( urlstring.right( urlstring.length() - 11) );
     return;
diff --git a/WebCore/kwq/KWQKMessageBox.mm b/WebCore/kwq/KWQKMessageBox.mm
index bb987fb..cdd83d7 100644
--- a/WebCore/kwq/KWQKMessageBox.mm
+++ b/WebCore/kwq/KWQKMessageBox.mm
@@ -58,7 +58,8 @@ int KMessageBox::warningYesNo(QWidget *, const QString &message,
 int KMessageBox::questionYesNo(QWidget *, const QString &message, 
     const QString &caption, 
     const QString &buttonYes, 
-    const QString &buttonNo, bool notify)
+    const QString &buttonNo,
+    const QString &dontAskAgain)
 {
     NSString *yes = buttonYes.isNull() ? nil : @"OK";
     NSString *no = buttonNo.isNull() ? nil : @"Cancel";
diff --git a/WebCore/kwq/KWQKProtocolManager.mm b/WebCore/kwq/KWQKProtocolManager.mm
index f45fedf..15e3835 100644
--- a/WebCore/kwq/KWQKProtocolManager.mm
+++ b/WebCore/kwq/KWQKProtocolManager.mm
@@ -27,8 +27,9 @@
 
 #import <qstring.h>
 
-QString KProtocolManager::userAgentForHost( const QString& )
+QString KProtocolManager::userAgentForHost(const QString &)
 {
-    // make us look like msie for now
-    return QString("Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.0) Gecko/20020715");
+    // FIXME: Should get this from WebFoundation so that we don't have two copies of the
+    // user agent string that we need to keep in sync.
+    return "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.0) Gecko/20020715";
 }
diff --git a/WebCore/kwq/KWQString.h b/WebCore/kwq/KWQString.h
index 69f91f2..8478e6e 100644
--- a/WebCore/kwq/KWQString.h
+++ b/WebCore/kwq/KWQString.h
@@ -311,17 +311,18 @@ public:
 
     bool startsWith(const QString &) const;
 
-    int find(QChar, int) const;
     int find(char, int index=0) const;
-    int find(const QString &, int index=0) const;
-    int find(const char *, int index=0, bool cs=TRUE) 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 char *, int index=-1) const;
 
     int contains(char) const;
-    int contains(const char *, bool cs=TRUE) const;
+    int contains(const char *, bool cs=true) const;
+    int contains(const QString &, bool cs=true) const;
 
     bool endsWith(const QString &) const;
 
@@ -396,8 +397,6 @@ public:
 
     bool operator!() const;
 
-    operator const char *() const;
-
     const QChar operator[](int) const;
 
     QString &operator+=(const QString &);
@@ -505,11 +504,6 @@ inline const QChar QString::operator[](int index) const
     return at(index);
 }
 
-inline QString::operator const char *() const
-{
-    return latin1();
-}
-
 inline CFMutableStringRef QString::getCFMutableString() const
 {
     return s;
diff --git a/WebCore/kwq/KWQString.mm b/WebCore/kwq/KWQString.mm
index f0a2bea..7904367 100644
--- a/WebCore/kwq/KWQString.mm
+++ b/WebCore/kwq/KWQString.mm
@@ -348,7 +348,7 @@ int QString::find(char ch, int index) const
     return find(QChar(ch), index);
 }
 
-int QString::find(const QString &qs, int index) const
+int QString::find(const QString &qs, int index, bool caseSensitive) const
 {
     CFIndex len = CFStringGetLength(s);
     if (index < 0)
@@ -356,7 +356,7 @@ int QString::find(const QString &qs, int index) const
     if (len && (index >= 0) && (index < len)) {
         CFRange r;
         CFRange start = CFRangeMake(index, len - index); 
-        if (CFStringFindWithOptions(s, qs.s, start, 0, &r))
+        if (CFStringFindWithOptions(s, qs.s, start, caseSensitive ? 0 : kCFCompareCaseInsensitive, &r))
             return r.location;
     }
     return -1;
@@ -552,6 +552,25 @@ int QString::contains(const char *chs, bool cs) const
     return c;
 }
 
+int QString::contains(const QString &cfs, bool cs) const
+{
+    int c = 0;
+    CFIndex pos = 0;
+    CFIndex len = CFStringGetLength(s);
+    while (pos < len) {
+        CFRange r;
+        if (!CFStringFindWithOptions(s, cfs.s,
+                CFRangeMake(pos, len - pos),
+                cs ? 0 : kCFCompareCaseInsensitive, &r)) {
+            break;
+        }
+        c++;
+        // move to next possible overlapping match
+        pos += r.location + 1;
+    }
+    return c;
+}
+
 short QString::toShort(bool *ok, int base) const
 {
     bool neg;
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index 71dd377..5dbb6a4 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -442,15 +442,14 @@ using namespace khtml;
     return elementInfo;
 }
 
-
-- (BOOL)searchFor: (NSString *)string direction: (BOOL)forward caseSensitive: (BOOL)caseFlag
+- (BOOL)searchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag
 {
-    return part->findTextNext (QString::fromCFString((CFStringRef)string), forward, caseFlag, FALSE);
+    return part->findTextNext(QString::fromNSString(string), forward, caseFlag, FALSE);
 }
 
 - (void)jumpToSelection
 {
-    part->jumpToSelection();
+    part->impl->jumpToSelection();
 }
 
 @end
diff --git a/WebCore/kwq/character-sets.txt b/WebCore/kwq/character-sets.txt
index 48b449b..2f8b64c 100644
--- a/WebCore/kwq/character-sets.txt
+++ b/WebCore/kwq/character-sets.txt
@@ -3,7 +3,8 @@
 CHARACTER SETS
 
 (last updated 2001 August 23)
-(Apple Changes: added x-sjis alias for Shift JIS 2002 July 10) 
+(Apple Changes: added x-sjis alias for Shift JIS, 2002 July 10) 
+(Apple Changes: added MIBenum: 1004 for ISO-10646-J-1, 2002 July 26) 
 
 These are the official names for character sets that may be used in
 the Internet and may be referred to in Internet documentation.  These
@@ -1414,6 +1415,7 @@ Alias: csUnicodeLatin1
 Alias: ISO-10646
 
 Name: ISO-10646-J-1
+MIBenum: 1004
 Source: ISO 10646 Japanese, see RFC 1815.
 
 Name: ISO-Unicode-IBM-1261
diff --git a/WebCore/kwq/kdeui/kmessagebox.h b/WebCore/kwq/kdeui/kmessagebox.h
index 4cd3e7a..986c59d 100644
--- a/WebCore/kwq/kdeui/kmessagebox.h
+++ b/WebCore/kwq/kdeui/kmessagebox.h
@@ -45,7 +45,8 @@ public:
     static int questionYesNo(QWidget *, const QString &, 
         const QString &caption=QString::null, 
         const QString &buttonYes=QString::null, 
-        const QString &buttonNo=QString::null, bool notify=true);
+        const QString &buttonNo=QString::null,
+        const QString &dontAskAgainName=QString::null);
    
     static void sorry(QWidget *, const QString &, 
         const QString &caption=QString::null, bool notify=true);
diff --git a/WebCore/kwq/make-charset-table.pl b/WebCore/kwq/make-charset-table.pl
index b2af6d6..3236847 100755
--- a/WebCore/kwq/make-charset-table.pl
+++ b/WebCore/kwq/make-charset-table.pl
@@ -30,11 +30,6 @@ sub emit_output
 {
     my ($canonical_name, $mib_enum, @aliases) = @_;
     
-    # Bug in the August 23 version of IANA's character-sets document
-    if ($canonical_name eq "ISO-10646-J-1" && ! $mib_enum) {
-	$mib_enum = "1004";
-    }
-
     my $mac_string_encoding = $invalid_encoding;
 
     foreach my $name ($canonical_name, @aliases) {
diff --git a/WebCore/kwq/qt/qevent.h b/WebCore/kwq/qt/qevent.h
index bc8ebcc..c4d09a4 100644
--- a/WebCore/kwq/qt/qevent.h
+++ b/WebCore/kwq/qt/qevent.h
@@ -54,7 +54,7 @@ public:
     QEvent( Type t ) : _type(t) {}
     virtual ~QEvent();
 
-    Type type() const;
+    Type type() const { return _type; }
 
 private:
     QEvent(const QEvent &);
@@ -68,13 +68,13 @@ public:
     QMouseEvent(Type type, const QPoint &pos, int button, int state);
     QMouseEvent(Type type, const QPoint &pos, const QPoint &global, int button, int state);
 
-    int x();
-    int y();
-    int globalX();
-    int globalY();
-    const QPoint &pos() const;
-    ButtonState button();
-    ButtonState state();
+    int x() { return _position.x(); }
+    int y() { return _position.y(); }
+    int globalX() { return _position.x(); } // we never really return global X
+    int globalY() { return _position.y(); } // we never really return global Y
+    const QPoint &pos() const { return _position; }
+    ButtonState button() { return _button; }
+    ButtonState state() { return _state; }
     ButtonState stateAfter();
 
 private:
@@ -87,7 +87,6 @@ private:
 class QTimerEvent : public QEvent {
 public:
     QTimerEvent(int timerId);
-    ~QTimerEvent();
 
     int timerId() const { return _timerId; }
 
@@ -110,67 +109,26 @@ public:
     int ascii() const;
 };
 
-class QFocusEvent : public QEvent {
+class QFocusEvent {
 public:
-    enum Reason { Mouse, Tab, ActiveWindow, Popup, Shortcut, Other };
-    
-    QFocusEvent(Type);
-
-    static Reason reason();
-};
-
-class QHideEvent : public QEvent {
-public:
-    QHideEvent(Type);
-};
-
-class QResizeEvent : public QEvent {
-public:
-    QResizeEvent(Type);
-};
-
-class QShowEvent : public QEvent {
-public:
-    QShowEvent(Type);
+    enum Reason { Popup, Other };
+    static Reason reason() { return Other; }
 };
 
-class QWheelEvent : public QEvent {
-public:
-    QWheelEvent(Type);
-
-    void accept();
-    void ignore();
-};
+class QHideEvent;
+class QResizeEvent;
+class QShowEvent;
+class QWheelEvent;
+class QContextMenuEvent;
 
 class QCustomEvent : public QEvent {
 public:
-    QCustomEvent( int type );
-    QCustomEvent( Type type, void *data )
-	: QEvent(type), d(data) {};
-
-    void       *data()	const	{ return d; }
-    void	setData( void* data )	{ d = data; }
+    QCustomEvent(Type type, void *data = 0) : QEvent(type), d(data) { }
+    void *data() const { return d; }
+    void setData(void *data) { d = data; }
 
 private:
-    void       *d;
-};
-
-class QContextMenuEvent : public QEvent
-{
- public:
-    QContextMenuEvent(int, const QPoint &, const QPoint &, Qt::ButtonState);
-
-    int x() const;
-    int y() const;
-    ButtonState state() const;
-    int reason() const;
-    QPoint globalPos() const;
-
- private:
-    int m_reason;
-    QPoint m_pos;
-    QPoint m_globalPos;
-    ButtonState m_state;
+    void *d;
 };
 
 #endif
diff --git a/WebCore/kwq/qt/qstring.h b/WebCore/kwq/qt/qstring.h
index 69f91f2..8478e6e 100644
--- a/WebCore/kwq/qt/qstring.h
+++ b/WebCore/kwq/qt/qstring.h
@@ -311,17 +311,18 @@ public:
 
     bool startsWith(const QString &) const;
 
-    int find(QChar, int) const;
     int find(char, int index=0) const;
-    int find(const QString &, int index=0) const;
-    int find(const char *, int index=0, bool cs=TRUE) 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 char *, int index=-1) const;
 
     int contains(char) const;
-    int contains(const char *, bool cs=TRUE) const;
+    int contains(const char *, bool cs=true) const;
+    int contains(const QString &, bool cs=true) const;
 
     bool endsWith(const QString &) const;
 
@@ -396,8 +397,6 @@ public:
 
     bool operator!() const;
 
-    operator const char *() const;
-
     const QChar operator[](int) const;
 
     QString &operator+=(const QString &);
@@ -505,11 +504,6 @@ inline const QChar QString::operator[](int index) const
     return at(index);
 }
 
-inline QString::operator const char *() const
-{
-    return latin1();
-}
-
 inline CFMutableStringRef QString::getCFMutableString() const
 {
     return s;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list