[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

kocienda kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:51:00 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 53f0289300b45306d5dc7d03dc6ac8a1d2bd0b46
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 23 15:24:42 2001 +0000

    A numer of changes that (hopefully) move ahead our efforts with
    rendering. This set of changes includes:
    	- More fully implemented colors, color groups, and palettes
    	- Re-worked constructors that create fewer temporaries and
    	  eliminate problems with some attempts at assignment
    	- An implementation of QRegion
    	- Tweaks to the html view and the html part
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@378 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/borrowed-classes.txt b/WebCore/borrowed-classes.txt
index e112c89..fe43b68 100644
--- a/WebCore/borrowed-classes.txt
+++ b/WebCore/borrowed-classes.txt
@@ -13,7 +13,7 @@ QPoint
 QPtrDict
 QRect
 QRegExp
-QRegion
+#QRegion
 QSize
 QSortedList
 QStack
diff --git a/WebCore/khtml/khtmlview.cpp b/WebCore/khtml/khtmlview.cpp
index 87f8850..2fca10a 100644
--- a/WebCore/khtml/khtmlview.cpp
+++ b/WebCore/khtml/khtmlview.cpp
@@ -314,7 +314,7 @@ void KHTMLView::drawContents( QPainter *p, int ex, int ey, int ew, int eh )
         return;
     }
 
-    //kdDebug( 6000 ) << "drawContents x=" << ex << ",y=" << ey << ",w=" << ew << ",h=" << eh << endl;
+    kdDebug( 6000 ) << "drawContents x=" << ex << ",y=" << ey << ",w=" << ew << ",h=" << eh << endl;
 
     if ( d->paintBuffer->width() < visibleWidth() )
         d->paintBuffer->resize(visibleWidth(),PAINT_BUFFER_HEIGHT);
diff --git a/WebCore/kwq/KWQApplication.mm b/WebCore/kwq/KWQApplication.mm
index a0e23fc..c31df53 100644
--- a/WebCore/kwq/KWQApplication.mm
+++ b/WebCore/kwq/KWQApplication.mm
@@ -24,12 +24,16 @@
  */
 
 #include <qapplication.h>
+#include <qpalette.h>
 
 #import "_KWQOwner.h"
 
+// FIXME: 
+static QPalette DEFAULT_PALETTE = QPalette();
+
 QPalette QApplication::palette(const QWidget *p)
 {
-     NSLog (@"ERROR %s:%s:%d (NOT IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+    return DEFAULT_PALETTE;
 }
 
 
diff --git a/WebCore/kwq/KWQBrush.h b/WebCore/kwq/KWQBrush.h
index 774d9ae..c8222ee 100644
--- a/WebCore/kwq/KWQBrush.h
+++ b/WebCore/kwq/KWQBrush.h
@@ -54,6 +54,9 @@ public:
  
     // member functions --------------------------------------------------------
     
+    const QColor &color() const;
+    void setColor(const QColor &);
+    
     // operators ---------------------------------------------------------------
     
     bool operator==(const QBrush &) const;
diff --git a/WebCore/kwq/KWQBrush.mm b/WebCore/kwq/KWQBrush.mm
index f5bd45f..30287d6 100644
--- a/WebCore/kwq/KWQBrush.mm
+++ b/WebCore/kwq/KWQBrush.mm
@@ -28,7 +28,7 @@
 QBrush::QBrush()
 {
     qcolor = Qt::black;
-    qbrushstyle = NoBrush;
+    qbrushstyle = SolidPattern;
 }
 
 
@@ -58,6 +58,15 @@ QBrush::~QBrush()
 {
 }
 
+const QColor &QBrush::color() const
+{
+    return qcolor;
+}
+
+void QBrush::setColor(const QColor &c)
+{
+    qcolor = c;
+}
 
 bool QBrush::operator==(const QBrush &compareTo) const
 {
diff --git a/WebCore/kwq/KWQChar.mm b/WebCore/kwq/KWQChar.mm
index 3f32cc0..7108eea 100644
--- a/WebCore/kwq/KWQChar.mm
+++ b/WebCore/kwq/KWQChar.mm
@@ -199,8 +199,6 @@ QChar QChar::upper() const
 QChar::Direction QChar::direction() const
 {
     // FIXME: unimplemented because we don't do BIDI yet
-    NSLog(@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__,
-            __LINE__);
     return DirL;
 }
 
diff --git a/WebCore/kwq/KWQColor.mm b/WebCore/kwq/KWQColor.mm
index b23e65c..9989981 100644
--- a/WebCore/kwq/KWQColor.mm
+++ b/WebCore/kwq/KWQColor.mm
@@ -227,8 +227,33 @@ QColor QColor::light(int f = 150) const
 
 QColor QColor::dark(int f = 200) const
 {
-    _logNotYetImplemented();
-    return *this;
+    QColor result;
+    NSColor *newColor;
+    float factor;
+
+    if (f <= 0) {
+        result.setRgb(red(), green(), blue());
+        return result;
+    }
+    else if (f < 100) {
+        // NOTE: this is actually a lighten operation
+        factor = 10000.0f / (float)f; 
+        newColor = [color highlightWithLevel:factor];    
+    }
+    else if (f > 10000) {
+        newColor = [color shadowWithLevel:1.0f];    
+    }
+    else {
+        factor = (float)f / 10000.0f;
+        newColor = [color shadowWithLevel:factor];    
+    }
+
+    result.setRgb(
+        (int)([color redComponent] * 255),
+        (int)([color greenComponent] * 255),
+        (int)([color blueComponent] * 255)
+    );
+    return result;
 }
 
 
diff --git a/WebCore/kwq/KWQColorGroup.mm b/WebCore/kwq/KWQColorGroup.mm
index 6887784..fdcfd4b 100644
--- a/WebCore/kwq/KWQColorGroup.mm
+++ b/WebCore/kwq/KWQColorGroup.mm
@@ -26,113 +26,147 @@
 #include <qpalette.h>
 #include <qcolor.h>
 
+#define QCOLOR_GROUP_SIZE 11
+
+class QColorGroupPrivate
+{
+friend class QColorGroup;
+public:
+    QColorGroupPrivate() {
+        brushes = new QBrush[QCOLOR_GROUP_SIZE];    
+        //brushes[QColorGroup::Foreground] = QColor(0,0,0);    
+        //brushes[QColorGroup::Shadow] = QColor(0,0,0);    
+        brushes[QColorGroup::Foreground] = QColor(255,255,255);    
+        brushes[QColorGroup::Shadow] = QColor(255,255,255);    
+        brushes[QColorGroup::Light] = QColor(224,224,224);    
+        brushes[QColorGroup::Midlight] = QColor(192,192,192);    
+        brushes[QColorGroup::Mid] = QColor(128,128,128);    
+        brushes[QColorGroup::Dark] = QColor(64,64,64);    
+        brushes[QColorGroup::Base] = QColor(255,255,255);    
+        brushes[QColorGroup::ButtonText] = QColor(0,0,0);    
+        brushes[QColorGroup::Button] = QColor(192,192,192);    
+        brushes[QColorGroup::Background] = QColor(255,255,255);    
+        brushes[QColorGroup::Text] = QColor(0,0,0);    
+    }
+
+    QColorGroupPrivate(const QColorGroupPrivate *other) {
+        brushes = new QBrush[QCOLOR_GROUP_SIZE];    
+        for (int i = 0; i < QCOLOR_GROUP_SIZE; i++) {
+            brushes[i] = other->brushes[i];    
+        }
+    }
+
+    ~QColorGroupPrivate() {
+        delete [] brushes;
+    }
+
+private:
+    QBrush *brushes;  
+};
+
 #include <kwqdebug.h>
 
 QColorGroup::QColorGroup()
 {
-    _logNotYetImplemented();
+    d = new QColorGroupPrivate();
 }
 
 
-QColorGroup::QColorGroup(const QColorGroup &)
+QColorGroup::QColorGroup(const QColorGroup &other)
 {
-    _logNotYetImplemented();
+    d = new QColorGroupPrivate(other.d);
 }
 
 
 QColorGroup::~QColorGroup()
 {
-    _logNotYetImplemented();
+    delete d;
 }
 
 
 const QBrush &QColorGroup::brush(QColorGroup::ColorRole cr) const
 {
-    _logNotYetImplemented();
-    // FIXME Gross leak
-    return *(new QBrush (Qt::white));
+    return d->brushes[cr];
 }
 
 const QColor &QColorGroup::color(QColorGroup::ColorRole cr) const
 {
-    _logNotYetImplemented();
-    return Qt::white;
+    return d->brushes[cr].color();
 }
 
 
-void setColor(QColorGroup::ColorRole cr, const QColor &)
+void QColorGroup::setColor(QColorGroup::ColorRole cr, const QColor &color)
 {
-    _logNotYetImplemented();
+    d->brushes[cr].setColor(color);
 }
 
 
 const QColor &QColorGroup::foreground() const
 {
-    _logNotYetImplemented();
-    return Qt::white;
+    return d->brushes[Foreground].color();
 }
 
 
 const QColor &QColorGroup::shadow() const
 {
-    _logNotYetImplemented();
-    return Qt::white;
+    return d->brushes[Shadow].color();
 }
 
 
 const QColor &QColorGroup::light() const
 {
-    _logNotYetImplemented();
-    return Qt::white;
+    return d->brushes[Light].color();
 }
 
 
 const QColor &QColorGroup::midlight() const
 {
-    _logNotYetImplemented();
-    return Qt::white;
+    return d->brushes[Midlight].color();
 }
 
 
 const QColor &QColorGroup::dark() const
 {
-    _logNotYetImplemented();
-    return Qt::white;
+    return d->brushes[Dark].color();
 }
 
 
 const QColor &QColorGroup::base() const
 {
-    _logNotYetImplemented();
-    return Qt::white;
+    return d->brushes[Base].color();
 }
 
 
 const QColor &QColorGroup::buttonText() const
 {
-    _logNotYetImplemented();
-    return Qt::white;
+    return d->brushes[ButtonText].color();
 }
 
 
 const QColor &QColorGroup::button() const
 {
-    _logNotYetImplemented();
-    return Qt::white;
+    return d->brushes[Button].color();
 }
 
 
 const QColor &QColorGroup::text() const
 {
-    _logNotYetImplemented();
-    return Qt::black;
+    return d->brushes[Text].color();
 }
 
 
 const QColor &QColorGroup::background() const
 {
-    _logNotYetImplemented();
-    return Qt::white;
+    return d->brushes[Background].color();
+}
+
+
+QColorGroup &QColorGroup::operator=(const QColorGroup &other)
+{
+    for (int i = 0; i < QCOLOR_GROUP_SIZE; i++) {
+        d->brushes[i] = other.d->brushes[i];    
+    }
+    return *this;
 }
 
 
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index f5d3850..c22c487 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -205,7 +205,9 @@ bool KHTMLPart::openURL( const KURL &url )
     cache = WCGetDefaultURICache();
     nsurl = [NSString stringWithCString:url.url().latin1()];
     
-    [cache requestWithString:nsurl requestor:d->m_recv];
+    id jobID = [cache requestWithString:nsurl requestor:d->m_recv];
+    
+    NSLog(@"part: %@", jobID);
 
     return true;
 }
@@ -410,7 +412,7 @@ void KHTMLPart::write( const char *str, int len)
     // begin lines added in lieu of big fixme
     
     QString decoded = QString(str);
-    //d->m_doc->applyChanges(true, true);
+    d->m_doc->applyChanges(true, true);
     
     // end lines added in lieu of big fixme
     
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index f5d3850..c22c487 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -205,7 +205,9 @@ bool KHTMLPart::openURL( const KURL &url )
     cache = WCGetDefaultURICache();
     nsurl = [NSString stringWithCString:url.url().latin1()];
     
-    [cache requestWithString:nsurl requestor:d->m_recv];
+    id jobID = [cache requestWithString:nsurl requestor:d->m_recv];
+    
+    NSLog(@"part: %@", jobID);
 
     return true;
 }
@@ -410,7 +412,7 @@ void KHTMLPart::write( const char *str, int len)
     // begin lines added in lieu of big fixme
     
     QString decoded = QString(str);
-    //d->m_doc->applyChanges(true, true);
+    d->m_doc->applyChanges(true, true);
     
     // end lines added in lieu of big fixme
     
diff --git a/WebCore/kwq/KWQPainter.mm b/WebCore/kwq/KWQPainter.mm
index 909c8b1..094d1fb 100644
--- a/WebCore/kwq/KWQPainter.mm
+++ b/WebCore/kwq/KWQPainter.mm
@@ -175,6 +175,7 @@ void QPainter::restore()
 // Draws a filled rectangle with a stroked border.
 void QPainter::drawRect(int x, int y, int w, int h)
 {
+    /*
     _lockFocus();
     if (data->qbrush.qbrushstyle == SolidPattern){
         //_setColorFromBrush();
@@ -183,6 +184,7 @@ void QPainter::drawRect(int x, int y, int w, int h)
     _setColorFromPen();
     [NSBezierPath strokeRect:NSMakeRect(x, y, w, h)];
     _unlockFocus();
+    */
 }
 
 
@@ -461,12 +463,14 @@ void QPainter::drawText(int x, int y, int w, int h, int flags, const QString&qst
 
 void QPainter::fillRect(int x, int y, int w, int h, const QBrush &brush)
 {
+    /*
     _lockFocus();
     if (brush.qbrushstyle == SolidPattern){
         //[brush.qcolor.color set];
         //[NSBezierPath fillRect:NSMakeRect(x, y, w, h)];
     }
     _unlockFocus();
+    */
 }
 
 
diff --git a/WebCore/kwq/KWQPalette.h b/WebCore/kwq/KWQPalette.h
index d578a01..cc6a96b 100644
--- a/WebCore/kwq/KWQPalette.h
+++ b/WebCore/kwq/KWQPalette.h
@@ -33,6 +33,9 @@
 #include <qcolor.h>
 #include <qbrush.h>
 
+class QColorGroupPrivate;
+class QPalettePrivate;
+
 // class QColorGroup ===========================================================
 
 class QColorGroup {
@@ -41,17 +44,17 @@ public:
     // typedefs ----------------------------------------------------------------
 
     enum ColorRole { 
-        Foreground, 
-        Shadow, 
-        Light, 
-        Mid, 
-        Midlight, 
-        Dark, 
-        Base, 
-        ButtonText, 
-        Button, 
-        Background, 
-        Text 
+        Foreground = 0, 
+        Shadow = 1, 
+        Light = 2, 
+        Midlight = 3, 
+        Mid = 4, 
+        Dark = 5, 
+        Base = 6, 
+        ButtonText = 7, 
+        Button = 8, 
+        Background = 9, 
+        Text = 10 
     };
 
     // enums -------------------------------------------------------------------
@@ -83,8 +86,12 @@ public:
 
     // operators ---------------------------------------------------------------
 
+    QColorGroup &operator=(const QColorGroup &);
+
 // protected -------------------------------------------------------------------
 // private ---------------------------------------------------------------------
+private:
+    QColorGroupPrivate *d;
 
 }; // class QColorGroup ========================================================
 
@@ -98,7 +105,11 @@ public:
  
     // enums -------------------------------------------------------------------
 
-    enum ColorGroup { Active, Inactive, Disabled };
+    enum ColorGroup { 
+        Active = 0, 
+        Inactive = 1, 
+        Disabled = 2, 
+    };
 
     // constants ---------------------------------------------------------------
     // static member functions -------------------------------------------------
@@ -124,13 +135,9 @@ public:
 
 // protected -------------------------------------------------------------------
 // private ---------------------------------------------------------------------
+
 private:
-    struct QPalData : public QShared {
-	QColorGroup normal; // ##### alias for active due to inline functions above, remove 3.0
-	QColorGroup disabled;
-	QColorGroup active;
-	QColorGroup inactive;
-    } *data;
+    QPalettePrivate *d;
 
 }; // class QPalette ===========================================================
 
diff --git a/WebCore/kwq/KWQPalette.mm b/WebCore/kwq/KWQPalette.mm
index 7bebb96..6dfe312 100644
--- a/WebCore/kwq/KWQPalette.mm
+++ b/WebCore/kwq/KWQPalette.mm
@@ -25,67 +25,92 @@
 
 #include <qpalette.h>
 
+
+class QPalettePrivate
+{
+friend class QPalette;
+public:
+    QPalettePrivate() : active(), inactive(), disabled() 
+    {
+    }
+
+    QPalettePrivate(const QPalettePrivate *other) :
+        active(other->active),
+        inactive(other->inactive),
+        disabled(other->disabled)
+    {
+    }
+
+private:
+    QColorGroup active;  
+    QColorGroup inactive;  
+    QColorGroup disabled;  
+};
+
 #include <kwqdebug.h>
 
 QPalette::QPalette()
 {
-    _logNotYetImplemented();
+    d = new QPalettePrivate(); 
 }
 
 
-QPalette::QPalette(const QPalette &)
+QPalette::QPalette(const QPalette &other)
 {
-    _logNotYetImplemented();
+    d = new QPalettePrivate(other.d); 
 }
 
 
 QPalette::~QPalette()
 {
-    _logNotYetImplemented();
+    delete d;
 }
 
 
-void QPalette::setColor(ColorGroup, QColorGroup::ColorRole role, const QColor &color)
+void QPalette::setColor(ColorGroup cg, QColorGroup::ColorRole role, const QColor &color)
 {
-    _logNotYetImplemented();
+    switch (cg) {
+        case Active:
+            d->active.setColor(role, color);
+            break;
+        case Inactive:
+            d->inactive.setColor(role, color);
+            break;
+        case Disabled:
+            d->disabled.setColor(role, color);
+            break;
+    }
 }
 
 
 const QColorGroup &QPalette::active() const
 {
-    _logNotYetImplemented();
-    return data->active;
+    return d->active;
 }
 
 
 const QColorGroup &QPalette::inactive() const
 {
-    _logNotYetImplemented();
-    return data->inactive;
+    return d->inactive;
 }
 
 
 const QColorGroup &QPalette::disabled() const
 {
-    _logNotYetImplemented();
-    return data->disabled;
+    return d->disabled;
 }
 
 
 const QColorGroup &QPalette::normal() const
 {
-    _logNotYetImplemented();
-    return data->normal;
+    return d->active;
 }
 
 
-QPalette &QPalette::operator=(const QPalette &p)
+QPalette &QPalette::operator=(const QPalette &other)
 {
-    _logNotYetImplemented();
-    //p.data->ref();
-    //if ( data->deref() )
-    //    delete data;
-    data = p.data;
+    d->active = other.d->active;
+    d->inactive = other.d->inactive;
+    d->disabled = other.d->disabled;
     return *this;
 }
-
diff --git a/WebCore/kwq/KWQRegion.h b/WebCore/kwq/KWQRegion.h
index 142f2d8..b087a40 100644
--- a/WebCore/kwq/KWQRegion.h
+++ b/WebCore/kwq/KWQRegion.h
@@ -43,6 +43,18 @@
 #include "qimage.h"
 #include "qrect.h"
 
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#define Fixed MacFixed
+#define Rect MacRect
+#define Boolean MacBoolean
+
+#import <Cocoa/Cocoa.h>
+
+#undef Fixed
+#undef Rect
+#undef Boolean
+#endif
+
 // class QRegion ===============================================================
 
 class QRegion {
@@ -61,7 +73,7 @@ public:
 
     QRegion();
     QRegion(const QRect &);
-    QRegion(int, int, int, int, RegionType = Rectangle);
+    QRegion(int, int, int, int, RegionType t=Rectangle);
     QRegion(const QPointArray &);
     QRegion(const QRegion &);
     ~QRegion();
@@ -78,7 +90,20 @@ public:
 
 // protected -------------------------------------------------------------------
 // private ---------------------------------------------------------------------
+private:
+    struct KWQRegionData {
+        RegionType type;
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+        NSBezierPath *path;
+#else
+        void *path;
+#endif    
+    } *data;
 
+#ifdef _KWQ_
+    void _initialize();
+#endif
+    
 }; // class QRegion ============================================================
 
 #endif // USING_BORROWED_QREGION
diff --git a/WebCore/kwq/KWQToolTip.mm b/WebCore/kwq/KWQToolTip.mm
index 3653c27..9eb29fb 100644
--- a/WebCore/kwq/KWQToolTip.mm
+++ b/WebCore/kwq/KWQToolTip.mm
@@ -24,9 +24,12 @@
  */
 #include <qtooltip.h>
 
+// FIXME: 
+static QPalette DEFAULT_PALETTE = QPalette();
 
 QPalette QToolTip::palette()
 {
+    return DEFAULT_PALETTE;
 }
 
 
diff --git a/WebCore/kwq/KWQWidget.h b/WebCore/kwq/KWQWidget.h
index e75bcb4..143d775 100644
--- a/WebCore/kwq/KWQWidget.h
+++ b/WebCore/kwq/KWQWidget.h
@@ -53,6 +53,8 @@
 #undef Boolean
 #endif
 
+class QWidgetPrivate;
+
 // class QWidget ===============================================================
 
 // FIX ME!  RJW - need to check if inheritance from QPaintDevice is really necessary.
@@ -178,21 +180,8 @@ private:
     void internalSetGeometry( int x, int y, int w, int h, bool updateView );
 
     void _initialize();
-
-    struct KWQWidgetData {	// Widget data.
-        QPoint	pos;
-        QRect	rect;
-        FocusPolicy focusPolicy;
-        QStyle	*style;
-        QFont	*font;
-        QCursor	*cursor;
-        QPalette pal;
-#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
-        NSView	*view;
-#else
-        void 	*view;
-#endif
-    } *data;
+    
+    QWidgetPrivate *data;
 
 }; // class QWidget ============================================================
 
diff --git a/WebCore/kwq/KWQWidget.mm b/WebCore/kwq/KWQWidget.mm
index b55f706..6e3c28f 100644
--- a/WebCore/kwq/KWQWidget.mm
+++ b/WebCore/kwq/KWQWidget.mm
@@ -49,6 +49,37 @@
     rework work that code rather than add NSWindow glue code.
 */
 
+
+class QWidgetPrivate
+{
+friend class QWidget;
+public:
+    
+    QWidgetPrivate(QWidget *widget) : pos(0,0), rect(0,0,0,0), pal()
+    {
+        view = [[KWQView alloc] initWithFrame: NSMakeRect (0,0,0,0) widget: widget];
+        style = 0L;
+        font = 0L;
+        cursor = 0L;
+    }
+    
+    ~QWidgetPrivate() {}
+    
+private:
+    QPoint	pos;
+    QRect	rect;
+    QWidget::FocusPolicy focusPolicy;
+    QStyle	*style;
+    QFont	*font;
+    QCursor	*cursor;
+    QPalette pal;
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+    NSView	*view;
+#else
+    void 	*view;
+#endif
+};
+
 QWidget::QWidget(QWidget *parent=0, const char *name=0, WFlags f=0) 
 {
     _initialize();
@@ -57,8 +88,7 @@ QWidget::QWidget(QWidget *parent=0, const char *name=0, WFlags f=0)
 
 void QWidget::_initialize()
 {
-    data = (struct KWQWidgetData *)calloc (1, sizeof (struct KWQWidgetData));
-    data->view = [[KWQView alloc] initWithFrame: NSMakeRect (0,0,0,0) widget: this];
+    data = new QWidgetPrivate(this);
 }
 
 
@@ -72,7 +102,7 @@ QWidget::~QWidget()
     // 	data->font
     // 	data->cursor
     
-    free (data);
+    delete data;
 }
 
 
diff --git a/WebCore/kwq/Makefile.in b/WebCore/kwq/Makefile.in
index 8b802f4..b794eb6 100644
--- a/WebCore/kwq/Makefile.in
+++ b/WebCore/kwq/Makefile.in
@@ -119,6 +119,7 @@ MMOBJECTS = \
 	KWQChar.o \
 	KWQString.o \
 	KWQCString.o \
+	KWQRegion.o \
 	$(NULL)
 
 MOBJECTS = \
diff --git a/WebCore/kwq/qt/qbrush.h b/WebCore/kwq/qt/qbrush.h
index 774d9ae..c8222ee 100644
--- a/WebCore/kwq/qt/qbrush.h
+++ b/WebCore/kwq/qt/qbrush.h
@@ -54,6 +54,9 @@ public:
  
     // member functions --------------------------------------------------------
     
+    const QColor &color() const;
+    void setColor(const QColor &);
+    
     // operators ---------------------------------------------------------------
     
     bool operator==(const QBrush &) const;
diff --git a/WebCore/kwq/qt/qpalette.h b/WebCore/kwq/qt/qpalette.h
index d578a01..cc6a96b 100644
--- a/WebCore/kwq/qt/qpalette.h
+++ b/WebCore/kwq/qt/qpalette.h
@@ -33,6 +33,9 @@
 #include <qcolor.h>
 #include <qbrush.h>
 
+class QColorGroupPrivate;
+class QPalettePrivate;
+
 // class QColorGroup ===========================================================
 
 class QColorGroup {
@@ -41,17 +44,17 @@ public:
     // typedefs ----------------------------------------------------------------
 
     enum ColorRole { 
-        Foreground, 
-        Shadow, 
-        Light, 
-        Mid, 
-        Midlight, 
-        Dark, 
-        Base, 
-        ButtonText, 
-        Button, 
-        Background, 
-        Text 
+        Foreground = 0, 
+        Shadow = 1, 
+        Light = 2, 
+        Midlight = 3, 
+        Mid = 4, 
+        Dark = 5, 
+        Base = 6, 
+        ButtonText = 7, 
+        Button = 8, 
+        Background = 9, 
+        Text = 10 
     };
 
     // enums -------------------------------------------------------------------
@@ -83,8 +86,12 @@ public:
 
     // operators ---------------------------------------------------------------
 
+    QColorGroup &operator=(const QColorGroup &);
+
 // protected -------------------------------------------------------------------
 // private ---------------------------------------------------------------------
+private:
+    QColorGroupPrivate *d;
 
 }; // class QColorGroup ========================================================
 
@@ -98,7 +105,11 @@ public:
  
     // enums -------------------------------------------------------------------
 
-    enum ColorGroup { Active, Inactive, Disabled };
+    enum ColorGroup { 
+        Active = 0, 
+        Inactive = 1, 
+        Disabled = 2, 
+    };
 
     // constants ---------------------------------------------------------------
     // static member functions -------------------------------------------------
@@ -124,13 +135,9 @@ public:
 
 // protected -------------------------------------------------------------------
 // private ---------------------------------------------------------------------
+
 private:
-    struct QPalData : public QShared {
-	QColorGroup normal; // ##### alias for active due to inline functions above, remove 3.0
-	QColorGroup disabled;
-	QColorGroup active;
-	QColorGroup inactive;
-    } *data;
+    QPalettePrivate *d;
 
 }; // class QPalette ===========================================================
 
diff --git a/WebCore/kwq/qt/qregion.h b/WebCore/kwq/qt/qregion.h
index 142f2d8..b087a40 100644
--- a/WebCore/kwq/qt/qregion.h
+++ b/WebCore/kwq/qt/qregion.h
@@ -43,6 +43,18 @@
 #include "qimage.h"
 #include "qrect.h"
 
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#define Fixed MacFixed
+#define Rect MacRect
+#define Boolean MacBoolean
+
+#import <Cocoa/Cocoa.h>
+
+#undef Fixed
+#undef Rect
+#undef Boolean
+#endif
+
 // class QRegion ===============================================================
 
 class QRegion {
@@ -61,7 +73,7 @@ public:
 
     QRegion();
     QRegion(const QRect &);
-    QRegion(int, int, int, int, RegionType = Rectangle);
+    QRegion(int, int, int, int, RegionType t=Rectangle);
     QRegion(const QPointArray &);
     QRegion(const QRegion &);
     ~QRegion();
@@ -78,7 +90,20 @@ public:
 
 // protected -------------------------------------------------------------------
 // private ---------------------------------------------------------------------
+private:
+    struct KWQRegionData {
+        RegionType type;
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+        NSBezierPath *path;
+#else
+        void *path;
+#endif    
+    } *data;
 
+#ifdef _KWQ_
+    void _initialize();
+#endif
+    
 }; // class QRegion ============================================================
 
 #endif // USING_BORROWED_QREGION
diff --git a/WebCore/kwq/qt/qwidget.h b/WebCore/kwq/qt/qwidget.h
index e75bcb4..143d775 100644
--- a/WebCore/kwq/qt/qwidget.h
+++ b/WebCore/kwq/qt/qwidget.h
@@ -53,6 +53,8 @@
 #undef Boolean
 #endif
 
+class QWidgetPrivate;
+
 // class QWidget ===============================================================
 
 // FIX ME!  RJW - need to check if inheritance from QPaintDevice is really necessary.
@@ -178,21 +180,8 @@ private:
     void internalSetGeometry( int x, int y, int w, int h, bool updateView );
 
     void _initialize();
-
-    struct KWQWidgetData {	// Widget data.
-        QPoint	pos;
-        QRect	rect;
-        FocusPolicy focusPolicy;
-        QStyle	*style;
-        QFont	*font;
-        QCursor	*cursor;
-        QPalette pal;
-#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
-        NSView	*view;
-#else
-        void 	*view;
-#endif
-    } *data;
+    
+    QWidgetPrivate *data;
 
 }; // class QWidget ============================================================
 
diff --git a/WebCore/kwq/tests/khtmlview/draw.mm b/WebCore/kwq/tests/khtmlview/draw.mm
index 2ac09bb..e65f0c0 100644
--- a/WebCore/kwq/tests/khtmlview/draw.mm
+++ b/WebCore/kwq/tests/khtmlview/draw.mm
@@ -60,7 +60,7 @@ int main( int argc, char **argv )
     QApplication app( argc, argv );
 
     // This will eventually be replaced with a NSURL.
-    KURL url = "http://www.blivet.com/";
+    KURL url = "http://kocike.apple.com/foo.html";
     
     // Use KHTMLPart as the model for the view.  This will eventually be covered
     // by WebPageDocument.
diff --git a/WebCore/src/kdelibs/khtml/khtmlview.cpp b/WebCore/src/kdelibs/khtml/khtmlview.cpp
index 87f8850..2fca10a 100644
--- a/WebCore/src/kdelibs/khtml/khtmlview.cpp
+++ b/WebCore/src/kdelibs/khtml/khtmlview.cpp
@@ -314,7 +314,7 @@ void KHTMLView::drawContents( QPainter *p, int ex, int ey, int ew, int eh )
         return;
     }
 
-    //kdDebug( 6000 ) << "drawContents x=" << ex << ",y=" << ey << ",w=" << ew << ",h=" << eh << endl;
+    kdDebug( 6000 ) << "drawContents x=" << ex << ",y=" << ey << ",w=" << ew << ",h=" << eh << endl;
 
     if ( d->paintBuffer->width() < visibleWidth() )
         d->paintBuffer->resize(visibleWidth(),PAINT_BUFFER_HEIGHT);
diff --git a/WebCore/src/kwq/KWQApplication.mm b/WebCore/src/kwq/KWQApplication.mm
index a0e23fc..c31df53 100644
--- a/WebCore/src/kwq/KWQApplication.mm
+++ b/WebCore/src/kwq/KWQApplication.mm
@@ -24,12 +24,16 @@
  */
 
 #include <qapplication.h>
+#include <qpalette.h>
 
 #import "_KWQOwner.h"
 
+// FIXME: 
+static QPalette DEFAULT_PALETTE = QPalette();
+
 QPalette QApplication::palette(const QWidget *p)
 {
-     NSLog (@"ERROR %s:%s:%d (NOT IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+    return DEFAULT_PALETTE;
 }
 
 
diff --git a/WebCore/src/kwq/KWQBrush.mm b/WebCore/src/kwq/KWQBrush.mm
index f5bd45f..30287d6 100644
--- a/WebCore/src/kwq/KWQBrush.mm
+++ b/WebCore/src/kwq/KWQBrush.mm
@@ -28,7 +28,7 @@
 QBrush::QBrush()
 {
     qcolor = Qt::black;
-    qbrushstyle = NoBrush;
+    qbrushstyle = SolidPattern;
 }
 
 
@@ -58,6 +58,15 @@ QBrush::~QBrush()
 {
 }
 
+const QColor &QBrush::color() const
+{
+    return qcolor;
+}
+
+void QBrush::setColor(const QColor &c)
+{
+    qcolor = c;
+}
 
 bool QBrush::operator==(const QBrush &compareTo) const
 {
diff --git a/WebCore/src/kwq/KWQChar.mm b/WebCore/src/kwq/KWQChar.mm
index 3f32cc0..7108eea 100644
--- a/WebCore/src/kwq/KWQChar.mm
+++ b/WebCore/src/kwq/KWQChar.mm
@@ -199,8 +199,6 @@ QChar QChar::upper() const
 QChar::Direction QChar::direction() const
 {
     // FIXME: unimplemented because we don't do BIDI yet
-    NSLog(@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__,
-            __LINE__);
     return DirL;
 }
 
diff --git a/WebCore/src/kwq/KWQColor.mm b/WebCore/src/kwq/KWQColor.mm
index b23e65c..9989981 100644
--- a/WebCore/src/kwq/KWQColor.mm
+++ b/WebCore/src/kwq/KWQColor.mm
@@ -227,8 +227,33 @@ QColor QColor::light(int f = 150) const
 
 QColor QColor::dark(int f = 200) const
 {
-    _logNotYetImplemented();
-    return *this;
+    QColor result;
+    NSColor *newColor;
+    float factor;
+
+    if (f <= 0) {
+        result.setRgb(red(), green(), blue());
+        return result;
+    }
+    else if (f < 100) {
+        // NOTE: this is actually a lighten operation
+        factor = 10000.0f / (float)f; 
+        newColor = [color highlightWithLevel:factor];    
+    }
+    else if (f > 10000) {
+        newColor = [color shadowWithLevel:1.0f];    
+    }
+    else {
+        factor = (float)f / 10000.0f;
+        newColor = [color shadowWithLevel:factor];    
+    }
+
+    result.setRgb(
+        (int)([color redComponent] * 255),
+        (int)([color greenComponent] * 255),
+        (int)([color blueComponent] * 255)
+    );
+    return result;
 }
 
 
diff --git a/WebCore/src/kwq/KWQColorGroup.mm b/WebCore/src/kwq/KWQColorGroup.mm
index 6887784..fdcfd4b 100644
--- a/WebCore/src/kwq/KWQColorGroup.mm
+++ b/WebCore/src/kwq/KWQColorGroup.mm
@@ -26,113 +26,147 @@
 #include <qpalette.h>
 #include <qcolor.h>
 
+#define QCOLOR_GROUP_SIZE 11
+
+class QColorGroupPrivate
+{
+friend class QColorGroup;
+public:
+    QColorGroupPrivate() {
+        brushes = new QBrush[QCOLOR_GROUP_SIZE];    
+        //brushes[QColorGroup::Foreground] = QColor(0,0,0);    
+        //brushes[QColorGroup::Shadow] = QColor(0,0,0);    
+        brushes[QColorGroup::Foreground] = QColor(255,255,255);    
+        brushes[QColorGroup::Shadow] = QColor(255,255,255);    
+        brushes[QColorGroup::Light] = QColor(224,224,224);    
+        brushes[QColorGroup::Midlight] = QColor(192,192,192);    
+        brushes[QColorGroup::Mid] = QColor(128,128,128);    
+        brushes[QColorGroup::Dark] = QColor(64,64,64);    
+        brushes[QColorGroup::Base] = QColor(255,255,255);    
+        brushes[QColorGroup::ButtonText] = QColor(0,0,0);    
+        brushes[QColorGroup::Button] = QColor(192,192,192);    
+        brushes[QColorGroup::Background] = QColor(255,255,255);    
+        brushes[QColorGroup::Text] = QColor(0,0,0);    
+    }
+
+    QColorGroupPrivate(const QColorGroupPrivate *other) {
+        brushes = new QBrush[QCOLOR_GROUP_SIZE];    
+        for (int i = 0; i < QCOLOR_GROUP_SIZE; i++) {
+            brushes[i] = other->brushes[i];    
+        }
+    }
+
+    ~QColorGroupPrivate() {
+        delete [] brushes;
+    }
+
+private:
+    QBrush *brushes;  
+};
+
 #include <kwqdebug.h>
 
 QColorGroup::QColorGroup()
 {
-    _logNotYetImplemented();
+    d = new QColorGroupPrivate();
 }
 
 
-QColorGroup::QColorGroup(const QColorGroup &)
+QColorGroup::QColorGroup(const QColorGroup &other)
 {
-    _logNotYetImplemented();
+    d = new QColorGroupPrivate(other.d);
 }
 
 
 QColorGroup::~QColorGroup()
 {
-    _logNotYetImplemented();
+    delete d;
 }
 
 
 const QBrush &QColorGroup::brush(QColorGroup::ColorRole cr) const
 {
-    _logNotYetImplemented();
-    // FIXME Gross leak
-    return *(new QBrush (Qt::white));
+    return d->brushes[cr];
 }
 
 const QColor &QColorGroup::color(QColorGroup::ColorRole cr) const
 {
-    _logNotYetImplemented();
-    return Qt::white;
+    return d->brushes[cr].color();
 }
 
 
-void setColor(QColorGroup::ColorRole cr, const QColor &)
+void QColorGroup::setColor(QColorGroup::ColorRole cr, const QColor &color)
 {
-    _logNotYetImplemented();
+    d->brushes[cr].setColor(color);
 }
 
 
 const QColor &QColorGroup::foreground() const
 {
-    _logNotYetImplemented();
-    return Qt::white;
+    return d->brushes[Foreground].color();
 }
 
 
 const QColor &QColorGroup::shadow() const
 {
-    _logNotYetImplemented();
-    return Qt::white;
+    return d->brushes[Shadow].color();
 }
 
 
 const QColor &QColorGroup::light() const
 {
-    _logNotYetImplemented();
-    return Qt::white;
+    return d->brushes[Light].color();
 }
 
 
 const QColor &QColorGroup::midlight() const
 {
-    _logNotYetImplemented();
-    return Qt::white;
+    return d->brushes[Midlight].color();
 }
 
 
 const QColor &QColorGroup::dark() const
 {
-    _logNotYetImplemented();
-    return Qt::white;
+    return d->brushes[Dark].color();
 }
 
 
 const QColor &QColorGroup::base() const
 {
-    _logNotYetImplemented();
-    return Qt::white;
+    return d->brushes[Base].color();
 }
 
 
 const QColor &QColorGroup::buttonText() const
 {
-    _logNotYetImplemented();
-    return Qt::white;
+    return d->brushes[ButtonText].color();
 }
 
 
 const QColor &QColorGroup::button() const
 {
-    _logNotYetImplemented();
-    return Qt::white;
+    return d->brushes[Button].color();
 }
 
 
 const QColor &QColorGroup::text() const
 {
-    _logNotYetImplemented();
-    return Qt::black;
+    return d->brushes[Text].color();
 }
 
 
 const QColor &QColorGroup::background() const
 {
-    _logNotYetImplemented();
-    return Qt::white;
+    return d->brushes[Background].color();
+}
+
+
+QColorGroup &QColorGroup::operator=(const QColorGroup &other)
+{
+    for (int i = 0; i < QCOLOR_GROUP_SIZE; i++) {
+        d->brushes[i] = other.d->brushes[i];    
+    }
+    return *this;
 }
 
 
diff --git a/WebCore/src/kwq/KWQKHTMLPart.mm b/WebCore/src/kwq/KWQKHTMLPart.mm
index f5d3850..c22c487 100644
--- a/WebCore/src/kwq/KWQKHTMLPart.mm
+++ b/WebCore/src/kwq/KWQKHTMLPart.mm
@@ -205,7 +205,9 @@ bool KHTMLPart::openURL( const KURL &url )
     cache = WCGetDefaultURICache();
     nsurl = [NSString stringWithCString:url.url().latin1()];
     
-    [cache requestWithString:nsurl requestor:d->m_recv];
+    id jobID = [cache requestWithString:nsurl requestor:d->m_recv];
+    
+    NSLog(@"part: %@", jobID);
 
     return true;
 }
@@ -410,7 +412,7 @@ void KHTMLPart::write( const char *str, int len)
     // begin lines added in lieu of big fixme
     
     QString decoded = QString(str);
-    //d->m_doc->applyChanges(true, true);
+    d->m_doc->applyChanges(true, true);
     
     // end lines added in lieu of big fixme
     
diff --git a/WebCore/src/kwq/KWQPainter.mm b/WebCore/src/kwq/KWQPainter.mm
index 909c8b1..094d1fb 100644
--- a/WebCore/src/kwq/KWQPainter.mm
+++ b/WebCore/src/kwq/KWQPainter.mm
@@ -175,6 +175,7 @@ void QPainter::restore()
 // Draws a filled rectangle with a stroked border.
 void QPainter::drawRect(int x, int y, int w, int h)
 {
+    /*
     _lockFocus();
     if (data->qbrush.qbrushstyle == SolidPattern){
         //_setColorFromBrush();
@@ -183,6 +184,7 @@ void QPainter::drawRect(int x, int y, int w, int h)
     _setColorFromPen();
     [NSBezierPath strokeRect:NSMakeRect(x, y, w, h)];
     _unlockFocus();
+    */
 }
 
 
@@ -461,12 +463,14 @@ void QPainter::drawText(int x, int y, int w, int h, int flags, const QString&qst
 
 void QPainter::fillRect(int x, int y, int w, int h, const QBrush &brush)
 {
+    /*
     _lockFocus();
     if (brush.qbrushstyle == SolidPattern){
         //[brush.qcolor.color set];
         //[NSBezierPath fillRect:NSMakeRect(x, y, w, h)];
     }
     _unlockFocus();
+    */
 }
 
 
diff --git a/WebCore/src/kwq/KWQPalette.mm b/WebCore/src/kwq/KWQPalette.mm
index 7bebb96..6dfe312 100644
--- a/WebCore/src/kwq/KWQPalette.mm
+++ b/WebCore/src/kwq/KWQPalette.mm
@@ -25,67 +25,92 @@
 
 #include <qpalette.h>
 
+
+class QPalettePrivate
+{
+friend class QPalette;
+public:
+    QPalettePrivate() : active(), inactive(), disabled() 
+    {
+    }
+
+    QPalettePrivate(const QPalettePrivate *other) :
+        active(other->active),
+        inactive(other->inactive),
+        disabled(other->disabled)
+    {
+    }
+
+private:
+    QColorGroup active;  
+    QColorGroup inactive;  
+    QColorGroup disabled;  
+};
+
 #include <kwqdebug.h>
 
 QPalette::QPalette()
 {
-    _logNotYetImplemented();
+    d = new QPalettePrivate(); 
 }
 
 
-QPalette::QPalette(const QPalette &)
+QPalette::QPalette(const QPalette &other)
 {
-    _logNotYetImplemented();
+    d = new QPalettePrivate(other.d); 
 }
 
 
 QPalette::~QPalette()
 {
-    _logNotYetImplemented();
+    delete d;
 }
 
 
-void QPalette::setColor(ColorGroup, QColorGroup::ColorRole role, const QColor &color)
+void QPalette::setColor(ColorGroup cg, QColorGroup::ColorRole role, const QColor &color)
 {
-    _logNotYetImplemented();
+    switch (cg) {
+        case Active:
+            d->active.setColor(role, color);
+            break;
+        case Inactive:
+            d->inactive.setColor(role, color);
+            break;
+        case Disabled:
+            d->disabled.setColor(role, color);
+            break;
+    }
 }
 
 
 const QColorGroup &QPalette::active() const
 {
-    _logNotYetImplemented();
-    return data->active;
+    return d->active;
 }
 
 
 const QColorGroup &QPalette::inactive() const
 {
-    _logNotYetImplemented();
-    return data->inactive;
+    return d->inactive;
 }
 
 
 const QColorGroup &QPalette::disabled() const
 {
-    _logNotYetImplemented();
-    return data->disabled;
+    return d->disabled;
 }
 
 
 const QColorGroup &QPalette::normal() const
 {
-    _logNotYetImplemented();
-    return data->normal;
+    return d->active;
 }
 
 
-QPalette &QPalette::operator=(const QPalette &p)
+QPalette &QPalette::operator=(const QPalette &other)
 {
-    _logNotYetImplemented();
-    //p.data->ref();
-    //if ( data->deref() )
-    //    delete data;
-    data = p.data;
+    d->active = other.d->active;
+    d->inactive = other.d->inactive;
+    d->disabled = other.d->disabled;
     return *this;
 }
-
diff --git a/WebCore/src/kwq/KWQToolTip.mm b/WebCore/src/kwq/KWQToolTip.mm
index 3653c27..9eb29fb 100644
--- a/WebCore/src/kwq/KWQToolTip.mm
+++ b/WebCore/src/kwq/KWQToolTip.mm
@@ -24,9 +24,12 @@
  */
 #include <qtooltip.h>
 
+// FIXME: 
+static QPalette DEFAULT_PALETTE = QPalette();
 
 QPalette QToolTip::palette()
 {
+    return DEFAULT_PALETTE;
 }
 
 
diff --git a/WebCore/src/kwq/KWQWidget.mm b/WebCore/src/kwq/KWQWidget.mm
index b55f706..6e3c28f 100644
--- a/WebCore/src/kwq/KWQWidget.mm
+++ b/WebCore/src/kwq/KWQWidget.mm
@@ -49,6 +49,37 @@
     rework work that code rather than add NSWindow glue code.
 */
 
+
+class QWidgetPrivate
+{
+friend class QWidget;
+public:
+    
+    QWidgetPrivate(QWidget *widget) : pos(0,0), rect(0,0,0,0), pal()
+    {
+        view = [[KWQView alloc] initWithFrame: NSMakeRect (0,0,0,0) widget: widget];
+        style = 0L;
+        font = 0L;
+        cursor = 0L;
+    }
+    
+    ~QWidgetPrivate() {}
+    
+private:
+    QPoint	pos;
+    QRect	rect;
+    QWidget::FocusPolicy focusPolicy;
+    QStyle	*style;
+    QFont	*font;
+    QCursor	*cursor;
+    QPalette pal;
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+    NSView	*view;
+#else
+    void 	*view;
+#endif
+};
+
 QWidget::QWidget(QWidget *parent=0, const char *name=0, WFlags f=0) 
 {
     _initialize();
@@ -57,8 +88,7 @@ QWidget::QWidget(QWidget *parent=0, const char *name=0, WFlags f=0)
 
 void QWidget::_initialize()
 {
-    data = (struct KWQWidgetData *)calloc (1, sizeof (struct KWQWidgetData));
-    data->view = [[KWQView alloc] initWithFrame: NSMakeRect (0,0,0,0) widget: this];
+    data = new QWidgetPrivate(this);
 }
 
 
@@ -72,7 +102,7 @@ QWidget::~QWidget()
     // 	data->font
     // 	data->cursor
     
-    free (data);
+    delete data;
 }
 
 
diff --git a/WebCore/src/kwq/Makefile.in b/WebCore/src/kwq/Makefile.in
index 8b802f4..b794eb6 100644
--- a/WebCore/src/kwq/Makefile.in
+++ b/WebCore/src/kwq/Makefile.in
@@ -119,6 +119,7 @@ MMOBJECTS = \
 	KWQChar.o \
 	KWQString.o \
 	KWQCString.o \
+	KWQRegion.o \
 	$(NULL)
 
 MOBJECTS = \
diff --git a/WebCore/src/kwq/qt/qbrush.h b/WebCore/src/kwq/qt/qbrush.h
index 774d9ae..c8222ee 100644
--- a/WebCore/src/kwq/qt/qbrush.h
+++ b/WebCore/src/kwq/qt/qbrush.h
@@ -54,6 +54,9 @@ public:
  
     // member functions --------------------------------------------------------
     
+    const QColor &color() const;
+    void setColor(const QColor &);
+    
     // operators ---------------------------------------------------------------
     
     bool operator==(const QBrush &) const;
diff --git a/WebCore/src/kwq/qt/qpalette.h b/WebCore/src/kwq/qt/qpalette.h
index d578a01..cc6a96b 100644
--- a/WebCore/src/kwq/qt/qpalette.h
+++ b/WebCore/src/kwq/qt/qpalette.h
@@ -33,6 +33,9 @@
 #include <qcolor.h>
 #include <qbrush.h>
 
+class QColorGroupPrivate;
+class QPalettePrivate;
+
 // class QColorGroup ===========================================================
 
 class QColorGroup {
@@ -41,17 +44,17 @@ public:
     // typedefs ----------------------------------------------------------------
 
     enum ColorRole { 
-        Foreground, 
-        Shadow, 
-        Light, 
-        Mid, 
-        Midlight, 
-        Dark, 
-        Base, 
-        ButtonText, 
-        Button, 
-        Background, 
-        Text 
+        Foreground = 0, 
+        Shadow = 1, 
+        Light = 2, 
+        Midlight = 3, 
+        Mid = 4, 
+        Dark = 5, 
+        Base = 6, 
+        ButtonText = 7, 
+        Button = 8, 
+        Background = 9, 
+        Text = 10 
     };
 
     // enums -------------------------------------------------------------------
@@ -83,8 +86,12 @@ public:
 
     // operators ---------------------------------------------------------------
 
+    QColorGroup &operator=(const QColorGroup &);
+
 // protected -------------------------------------------------------------------
 // private ---------------------------------------------------------------------
+private:
+    QColorGroupPrivate *d;
 
 }; // class QColorGroup ========================================================
 
@@ -98,7 +105,11 @@ public:
  
     // enums -------------------------------------------------------------------
 
-    enum ColorGroup { Active, Inactive, Disabled };
+    enum ColorGroup { 
+        Active = 0, 
+        Inactive = 1, 
+        Disabled = 2, 
+    };
 
     // constants ---------------------------------------------------------------
     // static member functions -------------------------------------------------
@@ -124,13 +135,9 @@ public:
 
 // protected -------------------------------------------------------------------
 // private ---------------------------------------------------------------------
+
 private:
-    struct QPalData : public QShared {
-	QColorGroup normal; // ##### alias for active due to inline functions above, remove 3.0
-	QColorGroup disabled;
-	QColorGroup active;
-	QColorGroup inactive;
-    } *data;
+    QPalettePrivate *d;
 
 }; // class QPalette ===========================================================
 
diff --git a/WebCore/src/kwq/qt/qregion.h b/WebCore/src/kwq/qt/qregion.h
index 142f2d8..b087a40 100644
--- a/WebCore/src/kwq/qt/qregion.h
+++ b/WebCore/src/kwq/qt/qregion.h
@@ -43,6 +43,18 @@
 #include "qimage.h"
 #include "qrect.h"
 
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#define Fixed MacFixed
+#define Rect MacRect
+#define Boolean MacBoolean
+
+#import <Cocoa/Cocoa.h>
+
+#undef Fixed
+#undef Rect
+#undef Boolean
+#endif
+
 // class QRegion ===============================================================
 
 class QRegion {
@@ -61,7 +73,7 @@ public:
 
     QRegion();
     QRegion(const QRect &);
-    QRegion(int, int, int, int, RegionType = Rectangle);
+    QRegion(int, int, int, int, RegionType t=Rectangle);
     QRegion(const QPointArray &);
     QRegion(const QRegion &);
     ~QRegion();
@@ -78,7 +90,20 @@ public:
 
 // protected -------------------------------------------------------------------
 // private ---------------------------------------------------------------------
+private:
+    struct KWQRegionData {
+        RegionType type;
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+        NSBezierPath *path;
+#else
+        void *path;
+#endif    
+    } *data;
 
+#ifdef _KWQ_
+    void _initialize();
+#endif
+    
 }; // class QRegion ============================================================
 
 #endif // USING_BORROWED_QREGION
diff --git a/WebCore/src/kwq/qt/qwidget.h b/WebCore/src/kwq/qt/qwidget.h
index e75bcb4..143d775 100644
--- a/WebCore/src/kwq/qt/qwidget.h
+++ b/WebCore/src/kwq/qt/qwidget.h
@@ -53,6 +53,8 @@
 #undef Boolean
 #endif
 
+class QWidgetPrivate;
+
 // class QWidget ===============================================================
 
 // FIX ME!  RJW - need to check if inheritance from QPaintDevice is really necessary.
@@ -178,21 +180,8 @@ private:
     void internalSetGeometry( int x, int y, int w, int h, bool updateView );
 
     void _initialize();
-
-    struct KWQWidgetData {	// Widget data.
-        QPoint	pos;
-        QRect	rect;
-        FocusPolicy focusPolicy;
-        QStyle	*style;
-        QFont	*font;
-        QCursor	*cursor;
-        QPalette pal;
-#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
-        NSView	*view;
-#else
-        void 	*view;
-#endif
-    } *data;
+    
+    QWidgetPrivate *data;
 
 }; // class QWidget ============================================================
 
diff --git a/WebCore/src/kwq/tests/khtmlview/draw.mm b/WebCore/src/kwq/tests/khtmlview/draw.mm
index 2ac09bb..e65f0c0 100644
--- a/WebCore/src/kwq/tests/khtmlview/draw.mm
+++ b/WebCore/src/kwq/tests/khtmlview/draw.mm
@@ -60,7 +60,7 @@ int main( int argc, char **argv )
     QApplication app( argc, argv );
 
     // This will eventually be replaced with a NSURL.
-    KURL url = "http://www.blivet.com/";
+    KURL url = "http://kocike.apple.com/foo.html";
     
     // Use KHTMLPart as the model for the view.  This will eventually be covered
     // by WebPageDocument.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list