[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
rjw
rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:50:59 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit cef5a0224a8b49f87a33da51ad997ced40ff2d87
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Oct 20 03:19:14 2001 +0000
Lots of stuff to get WebViewTest to run.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/khtml/khtmlview.cpp b/WebCore/khtml/khtmlview.cpp
index 376c33b..87f8850 100644
--- a/WebCore/khtml/khtmlview.cpp
+++ b/WebCore/khtml/khtmlview.cpp
@@ -288,6 +288,25 @@ void KHTMLView::resizeEvent (QResizeEvent* e)
KApplication::sendPostedEvents(viewport(), QEvent::Paint);
}
+static void printLevel(int level){
+ while (level--)
+ printf (" ");
+}
+
+
+static void printRenderTree(RenderObject *node, int level)
+{
+ printLevel (level);
+ printf ("node %s(%d) (%d,%d) w %d, h %d\n", node->renderName(), level, node->xPos(), node->yPos(), node->width(), node->height());
+ RenderObject *child = node->firstChild();
+ while(child != 0) {
+ printRenderTree(child, level+1);
+ child = child->nextSibling();
+ }
+}
+
+
+
void KHTMLView::drawContents( QPainter *p, int ex, int ey, int ew, int eh )
{
if(!m_part->xmlDocImpl()) {
@@ -315,6 +334,7 @@ void KHTMLView::drawContents( QPainter *p, int ex, int ey, int ew, int eh )
if (doc){
ro = doc->renderer();
if (ro){
+ printRenderTree (ro, 0);
ro->print(d->tp, ex, ey+py, ew, ph, 0, 0);
}
}
diff --git a/WebCore/khtml/misc/helper.cpp b/WebCore/khtml/misc/helper.cpp
index 709cc10..ea1826e 100644
--- a/WebCore/khtml/misc/helper.cpp
+++ b/WebCore/khtml/misc/helper.cpp
@@ -232,9 +232,8 @@ void khtml::setNamedColor(QColor &color, const QString &_name)
}
else
{
- // FIXME: for some reason not yet known, this does not work
//QColor tc = htmlColors->map[name];
- QColor tc = QColor(0,0,0);
+ QColor tc = QColor (0,0,0);
if ( !tc.isValid() )
tc = htmlColors->map[name.lower()];
diff --git a/WebCore/khtml/rendering/render_flow.cpp b/WebCore/khtml/rendering/render_flow.cpp
index a769d5c..6c5b65a 100644
--- a/WebCore/khtml/rendering/render_flow.cpp
+++ b/WebCore/khtml/rendering/render_flow.cpp
@@ -137,7 +137,7 @@ void RenderFlow::print(QPainter *p, int _x, int _y, int _w, int _h,
if((_ty > _y + _h) || (_ty + h < _y))
{
//kdDebug( 6040 ) << "cut!" << endl;
- return;
+ //return;
}
}
diff --git a/WebCore/khtml/rendering/render_text.cpp b/WebCore/khtml/rendering/render_text.cpp
index b3bc8b2..2365b14 100644
--- a/WebCore/khtml/rendering/render_text.cpp
+++ b/WebCore/khtml/rendering/render_text.cpp
@@ -624,8 +624,8 @@ void RenderText::printObject( QPainter *p, int /*x*/, int y, int /*w*/, int h,
void RenderText::print( QPainter *p, int x, int y, int w, int h,
int tx, int ty)
{
- if ( !isVisible() )
- return;
+ //if ( !isVisible() )
+ // return;
int s = m_lines.count() - 1;
if ( s < 0 ) return;
diff --git a/WebCore/kwq/KWQColor.mm b/WebCore/kwq/KWQColor.mm
index c915567..b23e65c 100644
--- a/WebCore/kwq/KWQColor.mm
+++ b/WebCore/kwq/KWQColor.mm
@@ -1,43 +1,33 @@
-/****************************************************************************
-** $Id$
-**
-** Implementation of QColor class
-**
-** Created : 940112
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the kernel module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales at trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info at trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
+/*
+ * Copyright (C) 2001 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
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
#include <qcolor.h>
#include <qstring.h>
+#include <kwqdebug.h>
+
QRgb qRgb(int r, int g, int b)
{
return r << 16 | g << 8 | b;
@@ -225,19 +215,19 @@ void QColor::setRgb(int rgb)
void QColor::hsv(int *, int *, int *) const
{
- NSLog (@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNotYetImplemented();
}
QColor QColor::light(int f = 150) const
{
- NSLog (@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNotYetImplemented();
return *this;
}
QColor QColor::dark(int f = 200) const
{
- NSLog (@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNotYetImplemented();
return *this;
}
diff --git a/WebCore/kwq/KWQColorGroup.mm b/WebCore/kwq/KWQColorGroup.mm
index 74b1171..6887784 100644
--- a/WebCore/kwq/KWQColorGroup.mm
+++ b/WebCore/kwq/KWQColorGroup.mm
@@ -26,87 +26,113 @@
#include <qpalette.h>
#include <qcolor.h>
+#include <kwqdebug.h>
+
QColorGroup::QColorGroup()
{
+ _logNotYetImplemented();
}
QColorGroup::QColorGroup(const QColorGroup &)
{
+ _logNotYetImplemented();
}
QColorGroup::~QColorGroup()
{
+ _logNotYetImplemented();
}
const QBrush &QColorGroup::brush(QColorGroup::ColorRole cr) const
{
+ _logNotYetImplemented();
+ // FIXME Gross leak
+ return *(new QBrush (Qt::white));
}
const QColor &QColorGroup::color(QColorGroup::ColorRole cr) const
{
+ _logNotYetImplemented();
+ return Qt::white;
}
void setColor(QColorGroup::ColorRole cr, const QColor &)
{
+ _logNotYetImplemented();
}
const QColor &QColorGroup::foreground() const
{
+ _logNotYetImplemented();
+ return Qt::white;
}
const QColor &QColorGroup::shadow() const
{
+ _logNotYetImplemented();
+ return Qt::white;
}
const QColor &QColorGroup::light() const
{
+ _logNotYetImplemented();
+ return Qt::white;
}
const QColor &QColorGroup::midlight() const
{
+ _logNotYetImplemented();
+ return Qt::white;
}
const QColor &QColorGroup::dark() const
{
+ _logNotYetImplemented();
+ return Qt::white;
}
const QColor &QColorGroup::base() const
{
+ _logNotYetImplemented();
+ return Qt::white;
}
const QColor &QColorGroup::buttonText() const
{
+ _logNotYetImplemented();
+ return Qt::white;
}
const QColor &QColorGroup::button() const
{
+ _logNotYetImplemented();
+ return Qt::white;
}
const QColor &QColorGroup::text() const
{
+ _logNotYetImplemented();
+ return Qt::black;
}
const QColor &QColorGroup::background() const
{
-}
-
-
-QColorGroup &QColorGroup::operator=(const QColorGroup &)
-{
+ _logNotYetImplemented();
+ return Qt::white;
}
diff --git a/WebCore/kwq/KWQFont.mm b/WebCore/kwq/KWQFont.mm
index 87c72f3..a8e150b 100644
--- a/WebCore/kwq/KWQFont.mm
+++ b/WebCore/kwq/KWQFont.mm
@@ -71,7 +71,7 @@ QFont::~QFont()
}
void QFont::_free(){
- [font release];
+ [font autorelease];
font = 0;
}
diff --git a/WebCore/kwq/KWQKConfigBase.mm b/WebCore/kwq/KWQKConfigBase.mm
index 8da2177..5e41f2f 100644
--- a/WebCore/kwq/KWQKConfigBase.mm
+++ b/WebCore/kwq/KWQKConfigBase.mm
@@ -96,7 +96,7 @@ QStringList KConfigBase::readListEntry(const QString &pKey, char sep=',') const
// class KConfig ===============================================================
-KConfig::KConfig(const QString &, bool bReadOnly=false)
+KConfig::KConfig(const QString &n, bool bReadOnly=false)
{
}
diff --git a/WebCore/kwq/KWQKGlobal.mm b/WebCore/kwq/KWQKGlobal.mm
index b2544e0..0edf4f2 100644
--- a/WebCore/kwq/KWQKGlobal.mm
+++ b/WebCore/kwq/KWQKGlobal.mm
@@ -24,6 +24,7 @@
*/
#include <kwqdebug.h>
+#include <kconfig.h>
#include <kglobal.h>
#define Fixed MacFixed
@@ -61,6 +62,7 @@ KStandardDirs *KGlobal::dirs()
KConfig *KGlobal::config()
{
_logNotYetImplemented();
+ return new KConfig("foo");
}
diff --git a/WebCore/kwq/KWQPaintDeviceMetrics.mm b/WebCore/kwq/KWQPaintDeviceMetrics.mm
index 51bc601..822c4da 100644
--- a/WebCore/kwq/KWQPaintDeviceMetrics.mm
+++ b/WebCore/kwq/KWQPaintDeviceMetrics.mm
@@ -25,6 +25,8 @@
#include <qpaintdevicemetrics.h>
+#include <kwqdebug.h>
+
QPaintDeviceMetrics::QPaintDeviceMetrics(const QPaintDevice *)
{
}
@@ -32,20 +34,28 @@ QPaintDeviceMetrics::QPaintDeviceMetrics(const QPaintDevice *)
int QPaintDeviceMetrics::logicalDpiY() const
{
+ _logPartiallyImplemented();
+ return 72;
}
int QPaintDeviceMetrics::depth() const
{
+ _logPartiallyImplemented();
+ return 32;
}
int QPaintDeviceMetrics::width() const
{
+ _logPartiallyImplemented();
+ return 800;
}
int QPaintDeviceMetrics::height() const
{
+ _logPartiallyImplemented();
+ return 800;
}
diff --git a/WebCore/kwq/KWQPainter.mm b/WebCore/kwq/KWQPainter.mm
index 5d80c63..909c8b1 100644
--- a/WebCore/kwq/KWQPainter.mm
+++ b/WebCore/kwq/KWQPainter.mm
@@ -30,6 +30,7 @@
#include <qstack.h>
#include <qpoint.h>
+#include <kwqdebug.h>
#import <Cocoa/Cocoa.h>
@@ -51,7 +52,7 @@ QPainter::QPainter()
QPainter::QPainter(const QPaintDevice *pdev)
{
- NSLog (@"ERROR %s:%s:%d (NOT IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNeverImplemented();
}
@@ -109,7 +110,7 @@ void QPainter::setPen(const QPen &pen)
void QPainter::setPen(PenStyle)
{
- NSLog (@"WARNING (NOT YET IMPLEMENTED) void QPainter::setPen(PenStyle)\n");
+ _logNotYetImplemented();
}
@@ -128,7 +129,7 @@ void QPainter::setBrush(BrushStyle style)
QRect QPainter::xForm(const QRect &) const
{
- NSLog (@"WARNING (NOT YET IMPLEMENTED) QRect QPainter::xForm(const QRect &) const\n");
+ _logNotYetImplemented();
}
@@ -176,8 +177,8 @@ void QPainter::drawRect(int x, int y, int w, int h)
{
_lockFocus();
if (data->qbrush.qbrushstyle == SolidPattern){
- _setColorFromBrush();
- [NSBezierPath fillRect:NSMakeRect(x, y, w, h)];
+ //_setColorFromBrush();
+ //[NSBezierPath fillRect:NSMakeRect(x, y, w, h)];
}
_setColorFromPen();
[NSBezierPath strokeRect:NSMakeRect(x, y, w, h)];
@@ -462,8 +463,8 @@ 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)];
+ //[brush.qcolor.color set];
+ //[NSBezierPath fillRect:NSMakeRect(x, y, w, h)];
}
_unlockFocus();
}
@@ -471,36 +472,38 @@ void QPainter::fillRect(int x, int y, int w, int h, const QBrush &brush)
void QPainter::setClipping(bool)
{
- NSLog (@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNotYetImplemented();
}
void QPainter::setClipRegion(const QRegion &)
{
- NSLog (@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNotYetImplemented();
}
const QRegion &QPainter::clipRegion() const
{
- NSLog (@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNotYetImplemented();
+ return QRegion();
}
bool QPainter::hasClipping() const
{
- NSLog (@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNotYetImplemented();
+ return 0;
}
void QPainter::setClipRect(const QRect &)
{
- NSLog (@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNotYetImplemented();
}
void QPainter::setClipRect(int,int,int,int)
{
- NSLog (@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNotYetImplemented();
}
@@ -513,7 +516,7 @@ Qt::RasterOp QPainter::rasterOp() const
return XorROP;
return CopyROP;
#else
- NSLog (@"ERROR %s:%s:%d (NOT IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNeverImplemented();
#endif
}
@@ -534,19 +537,21 @@ void QPainter::setRasterOp(RasterOp op)
void QPainter::translate(double dx, double dy)
{
- NSLog (@"ERROR %s:%s:%d (NOT IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ NSLog (@"ERROR %s:%d %s (NOT IMPLEMENTED) (%d, %d)\n", __FILE__, __LINE__, __FUNCTION__, (int)dx, (int) dy);
}
void QPainter::scale(double dx, double dy)
{
- NSLog (@"ERROR %s:%s:%d (NOT IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ NSLog (@"ERROR %s:%d %s (NOT IMPLEMENTED) (%d, %d)\n", __FILE__, __LINE__, __FUNCTION__, (int)dx, (int) dy);
}
bool QPainter::begin(const QPaintDevice *bd)
{
data->bufferDevice = bd;
+ const QPixmap *pixmap = (QPixmap *)(data->bufferDevice);
+ [pixmap->nsimage setFlipped: YES];
}
@@ -558,7 +563,8 @@ bool QPainter::end()
QPaintDevice *QPainter::device() const
{
- NSLog (@"ERROR %s:%s:%d (NOT IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logPartiallyImplemented();
+ return (QPaintDevice *)data->bufferDevice;
}
void QPainter::_lockFocus(){
diff --git a/WebCore/kwq/KWQPalette.h b/WebCore/kwq/KWQPalette.h
index 6c4551a..d578a01 100644
--- a/WebCore/kwq/KWQPalette.h
+++ b/WebCore/kwq/KWQPalette.h
@@ -83,8 +83,6 @@ public:
// operators ---------------------------------------------------------------
- QColorGroup &operator=(const QColorGroup &);
-
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
@@ -126,6 +124,13 @@ 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;
}; // class QPalette ===========================================================
diff --git a/WebCore/kwq/KWQPalette.mm b/WebCore/kwq/KWQPalette.mm
index f3d2044..7bebb96 100644
--- a/WebCore/kwq/KWQPalette.mm
+++ b/WebCore/kwq/KWQPalette.mm
@@ -25,47 +25,67 @@
#include <qpalette.h>
+#include <kwqdebug.h>
+
QPalette::QPalette()
{
+ _logNotYetImplemented();
}
QPalette::QPalette(const QPalette &)
{
+ _logNotYetImplemented();
}
QPalette::~QPalette()
{
+ _logNotYetImplemented();
}
void QPalette::setColor(ColorGroup, QColorGroup::ColorRole role, const QColor &color)
{
+ _logNotYetImplemented();
}
const QColorGroup &QPalette::active() const
{
+ _logNotYetImplemented();
+ return data->active;
}
const QColorGroup &QPalette::inactive() const
{
+ _logNotYetImplemented();
+ return data->inactive;
}
const QColorGroup &QPalette::disabled() const
{
+ _logNotYetImplemented();
+ return data->disabled;
}
const QColorGroup &QPalette::normal() const
{
+ _logNotYetImplemented();
+ return data->normal;
}
-QPalette &QPalette::operator=(const QPalette &)
+QPalette &QPalette::operator=(const QPalette &p)
{
+ _logNotYetImplemented();
+ //p.data->ref();
+ //if ( data->deref() )
+ // delete data;
+ data = p.data;
+ return *this;
}
diff --git a/WebCore/kwq/KWQScrollView.mm b/WebCore/kwq/KWQScrollView.mm
index 082bbb9..816b6b7 100644
--- a/WebCore/kwq/KWQScrollView.mm
+++ b/WebCore/kwq/KWQScrollView.mm
@@ -57,28 +57,28 @@ QWidget* QScrollView::viewport() const
int QScrollView::visibleWidth() const
{
//_logNeverImplemented();
- return 200;
+ return 800;
}
int QScrollView::visibleHeight() const
{
//_logNeverImplemented();
- return 200;
+ return 800;
}
int QScrollView::contentsWidth() const
{
_logNeverImplemented();
- return 200;
+ return 800;
}
int QScrollView::contentsHeight() const
{
_logNeverImplemented();
- return 200;
+ return 800;
}
diff --git a/WebCore/kwq/KWQView.mm b/WebCore/kwq/KWQView.mm
index 9825e14..58a7158 100644
--- a/WebCore/kwq/KWQView.mm
+++ b/WebCore/kwq/KWQView.mm
@@ -27,6 +27,7 @@
#include <khtmlview.h>
#include <qwidget.h>
#include <qpainter.h>
+#include <html/html_documentimpl.h>
@implementation KWQView
@@ -85,7 +86,7 @@
{
[super initWithFrame: r];
widget = w;
- isFlipped = YES;
+ isFlipped = NO;
}
@@ -96,7 +97,12 @@
QPainter p(widget);
NSRect frame = [self frame];
-
+
+ if (((KHTMLView *)widget)->part()->xmlDocImpl() &&
+ ((KHTMLView *)widget)->part()->xmlDocImpl()->renderer()){
+ ((KHTMLView *)widget)->layout(TRUE);
+ }
+
((KHTMLView *)widget)->drawContents( &p, (int)frame.origin.x,
(int)frame.origin.y,
(int)frame.size.width,
diff --git a/WebCore/kwq/qt/_qregion.cpp b/WebCore/kwq/qt/_qregion.cpp
index 6c991a4..ca55a94 100644
--- a/WebCore/kwq/qt/_qregion.cpp
+++ b/WebCore/kwq/qt/_qregion.cpp
@@ -115,18 +115,18 @@
*****************************************************************************/
QRegion::QRegion( const QRect &r, RegionType type )
{
- fprintf (stderr,"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ fprintf (stderr,"ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
}
QRegion::QRegion( const QPointArray &a, bool winding )
{
- fprintf (stderr,"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ fprintf (stderr,"ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
}
QRegion::QRegion()
{
- fprintf (stderr,"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ fprintf (stderr,"ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
}
QRegion::QRegion( const QRegion & )
@@ -137,41 +137,41 @@ QRegion::QRegion( const QRegion & )
QRegion::QRegion( bool is_null )
{
- fprintf (stderr,"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ fprintf (stderr,"ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
}
QRegion::~QRegion()
{
- fprintf (stderr,"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ fprintf (stderr,"ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
}
QRegion QRegion::eor( const QRegion &r ) const
{
- fprintf (stderr,"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ fprintf (stderr,"ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
}
QRegion QRegion::subtract( const QRegion &r ) const
{
- fprintf (stderr,"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ fprintf (stderr,"ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
}
QRegion QRegion::intersect( const QRegion &) const
{
- fprintf (stderr,"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ fprintf (stderr,"ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
}
QRegion QRegion::unite( const QRegion &r ) const
{
- fprintf (stderr,"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ fprintf (stderr,"ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
}
QRegion QRegion::copy() const
{
- fprintf (stderr,"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ fprintf (stderr,"ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
}
@@ -182,7 +182,7 @@ bool QRegion::isNull() const
bool QRegion::contains( const QPoint &p ) const
{
- fprintf (stderr,"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ fprintf (stderr,"ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
}
/*!
diff --git a/WebCore/kwq/qt/qpalette.h b/WebCore/kwq/qt/qpalette.h
index 6c4551a..d578a01 100644
--- a/WebCore/kwq/qt/qpalette.h
+++ b/WebCore/kwq/qt/qpalette.h
@@ -83,8 +83,6 @@ public:
// operators ---------------------------------------------------------------
- QColorGroup &operator=(const QColorGroup &);
-
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
@@ -126,6 +124,13 @@ 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;
}; // class QPalette ===========================================================
diff --git a/WebCore/kwq/tests/khtmlview/draw.mm b/WebCore/kwq/tests/khtmlview/draw.mm
index bf6923f..2ac09bb 100644
--- a/WebCore/kwq/tests/khtmlview/draw.mm
+++ b/WebCore/kwq/tests/khtmlview/draw.mm
@@ -71,6 +71,7 @@ int main( int argc, char **argv )
// WebPageView.
// [[WebPageView alloc] initWithFrame: (NSRect)rect document: (WebPageDocument *)doc]
KHTMLView *htmlView = new KHTMLView (w, 0);
+ htmlView->resize (800,800);
KWQHTMLView *kwqHTMLView = [[[KWQHTMLView alloc] initWithFrame: NSMakeRect (0,0,0,0) widget: htmlView] autorelease];
w->setView (htmlView);
@@ -79,7 +80,7 @@ int main( int argc, char **argv )
htmlView->setView (kwqHTMLView);
- htmlView->resize(500, 400);
+ htmlView->resize(800, 800);
app.setMainWidget( htmlView );
htmlView->show();
diff --git a/WebCore/src/kdelibs/khtml/khtmlview.cpp b/WebCore/src/kdelibs/khtml/khtmlview.cpp
index 376c33b..87f8850 100644
--- a/WebCore/src/kdelibs/khtml/khtmlview.cpp
+++ b/WebCore/src/kdelibs/khtml/khtmlview.cpp
@@ -288,6 +288,25 @@ void KHTMLView::resizeEvent (QResizeEvent* e)
KApplication::sendPostedEvents(viewport(), QEvent::Paint);
}
+static void printLevel(int level){
+ while (level--)
+ printf (" ");
+}
+
+
+static void printRenderTree(RenderObject *node, int level)
+{
+ printLevel (level);
+ printf ("node %s(%d) (%d,%d) w %d, h %d\n", node->renderName(), level, node->xPos(), node->yPos(), node->width(), node->height());
+ RenderObject *child = node->firstChild();
+ while(child != 0) {
+ printRenderTree(child, level+1);
+ child = child->nextSibling();
+ }
+}
+
+
+
void KHTMLView::drawContents( QPainter *p, int ex, int ey, int ew, int eh )
{
if(!m_part->xmlDocImpl()) {
@@ -315,6 +334,7 @@ void KHTMLView::drawContents( QPainter *p, int ex, int ey, int ew, int eh )
if (doc){
ro = doc->renderer();
if (ro){
+ printRenderTree (ro, 0);
ro->print(d->tp, ex, ey+py, ew, ph, 0, 0);
}
}
diff --git a/WebCore/src/kdelibs/khtml/misc/helper.cpp b/WebCore/src/kdelibs/khtml/misc/helper.cpp
index 709cc10..ea1826e 100644
--- a/WebCore/src/kdelibs/khtml/misc/helper.cpp
+++ b/WebCore/src/kdelibs/khtml/misc/helper.cpp
@@ -232,9 +232,8 @@ void khtml::setNamedColor(QColor &color, const QString &_name)
}
else
{
- // FIXME: for some reason not yet known, this does not work
//QColor tc = htmlColors->map[name];
- QColor tc = QColor(0,0,0);
+ QColor tc = QColor (0,0,0);
if ( !tc.isValid() )
tc = htmlColors->map[name.lower()];
diff --git a/WebCore/src/kdelibs/khtml/rendering/render_flow.cpp b/WebCore/src/kdelibs/khtml/rendering/render_flow.cpp
index a769d5c..6c5b65a 100644
--- a/WebCore/src/kdelibs/khtml/rendering/render_flow.cpp
+++ b/WebCore/src/kdelibs/khtml/rendering/render_flow.cpp
@@ -137,7 +137,7 @@ void RenderFlow::print(QPainter *p, int _x, int _y, int _w, int _h,
if((_ty > _y + _h) || (_ty + h < _y))
{
//kdDebug( 6040 ) << "cut!" << endl;
- return;
+ //return;
}
}
diff --git a/WebCore/src/kdelibs/khtml/rendering/render_text.cpp b/WebCore/src/kdelibs/khtml/rendering/render_text.cpp
index b3bc8b2..2365b14 100644
--- a/WebCore/src/kdelibs/khtml/rendering/render_text.cpp
+++ b/WebCore/src/kdelibs/khtml/rendering/render_text.cpp
@@ -624,8 +624,8 @@ void RenderText::printObject( QPainter *p, int /*x*/, int y, int /*w*/, int h,
void RenderText::print( QPainter *p, int x, int y, int w, int h,
int tx, int ty)
{
- if ( !isVisible() )
- return;
+ //if ( !isVisible() )
+ // return;
int s = m_lines.count() - 1;
if ( s < 0 ) return;
diff --git a/WebCore/src/kwq/KWQColor.mm b/WebCore/src/kwq/KWQColor.mm
index c915567..b23e65c 100644
--- a/WebCore/src/kwq/KWQColor.mm
+++ b/WebCore/src/kwq/KWQColor.mm
@@ -1,43 +1,33 @@
-/****************************************************************************
-** $Id$
-**
-** Implementation of QColor class
-**
-** Created : 940112
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the kernel module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales at trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info at trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
+/*
+ * Copyright (C) 2001 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
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
#include <qcolor.h>
#include <qstring.h>
+#include <kwqdebug.h>
+
QRgb qRgb(int r, int g, int b)
{
return r << 16 | g << 8 | b;
@@ -225,19 +215,19 @@ void QColor::setRgb(int rgb)
void QColor::hsv(int *, int *, int *) const
{
- NSLog (@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNotYetImplemented();
}
QColor QColor::light(int f = 150) const
{
- NSLog (@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNotYetImplemented();
return *this;
}
QColor QColor::dark(int f = 200) const
{
- NSLog (@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNotYetImplemented();
return *this;
}
diff --git a/WebCore/src/kwq/KWQColorGroup.mm b/WebCore/src/kwq/KWQColorGroup.mm
index 74b1171..6887784 100644
--- a/WebCore/src/kwq/KWQColorGroup.mm
+++ b/WebCore/src/kwq/KWQColorGroup.mm
@@ -26,87 +26,113 @@
#include <qpalette.h>
#include <qcolor.h>
+#include <kwqdebug.h>
+
QColorGroup::QColorGroup()
{
+ _logNotYetImplemented();
}
QColorGroup::QColorGroup(const QColorGroup &)
{
+ _logNotYetImplemented();
}
QColorGroup::~QColorGroup()
{
+ _logNotYetImplemented();
}
const QBrush &QColorGroup::brush(QColorGroup::ColorRole cr) const
{
+ _logNotYetImplemented();
+ // FIXME Gross leak
+ return *(new QBrush (Qt::white));
}
const QColor &QColorGroup::color(QColorGroup::ColorRole cr) const
{
+ _logNotYetImplemented();
+ return Qt::white;
}
void setColor(QColorGroup::ColorRole cr, const QColor &)
{
+ _logNotYetImplemented();
}
const QColor &QColorGroup::foreground() const
{
+ _logNotYetImplemented();
+ return Qt::white;
}
const QColor &QColorGroup::shadow() const
{
+ _logNotYetImplemented();
+ return Qt::white;
}
const QColor &QColorGroup::light() const
{
+ _logNotYetImplemented();
+ return Qt::white;
}
const QColor &QColorGroup::midlight() const
{
+ _logNotYetImplemented();
+ return Qt::white;
}
const QColor &QColorGroup::dark() const
{
+ _logNotYetImplemented();
+ return Qt::white;
}
const QColor &QColorGroup::base() const
{
+ _logNotYetImplemented();
+ return Qt::white;
}
const QColor &QColorGroup::buttonText() const
{
+ _logNotYetImplemented();
+ return Qt::white;
}
const QColor &QColorGroup::button() const
{
+ _logNotYetImplemented();
+ return Qt::white;
}
const QColor &QColorGroup::text() const
{
+ _logNotYetImplemented();
+ return Qt::black;
}
const QColor &QColorGroup::background() const
{
-}
-
-
-QColorGroup &QColorGroup::operator=(const QColorGroup &)
-{
+ _logNotYetImplemented();
+ return Qt::white;
}
diff --git a/WebCore/src/kwq/KWQFont.mm b/WebCore/src/kwq/KWQFont.mm
index 87c72f3..a8e150b 100644
--- a/WebCore/src/kwq/KWQFont.mm
+++ b/WebCore/src/kwq/KWQFont.mm
@@ -71,7 +71,7 @@ QFont::~QFont()
}
void QFont::_free(){
- [font release];
+ [font autorelease];
font = 0;
}
diff --git a/WebCore/src/kwq/KWQKConfigBase.mm b/WebCore/src/kwq/KWQKConfigBase.mm
index 8da2177..5e41f2f 100644
--- a/WebCore/src/kwq/KWQKConfigBase.mm
+++ b/WebCore/src/kwq/KWQKConfigBase.mm
@@ -96,7 +96,7 @@ QStringList KConfigBase::readListEntry(const QString &pKey, char sep=',') const
// class KConfig ===============================================================
-KConfig::KConfig(const QString &, bool bReadOnly=false)
+KConfig::KConfig(const QString &n, bool bReadOnly=false)
{
}
diff --git a/WebCore/src/kwq/KWQKGlobal.mm b/WebCore/src/kwq/KWQKGlobal.mm
index b2544e0..0edf4f2 100644
--- a/WebCore/src/kwq/KWQKGlobal.mm
+++ b/WebCore/src/kwq/KWQKGlobal.mm
@@ -24,6 +24,7 @@
*/
#include <kwqdebug.h>
+#include <kconfig.h>
#include <kglobal.h>
#define Fixed MacFixed
@@ -61,6 +62,7 @@ KStandardDirs *KGlobal::dirs()
KConfig *KGlobal::config()
{
_logNotYetImplemented();
+ return new KConfig("foo");
}
diff --git a/WebCore/src/kwq/KWQPaintDeviceMetrics.mm b/WebCore/src/kwq/KWQPaintDeviceMetrics.mm
index 51bc601..822c4da 100644
--- a/WebCore/src/kwq/KWQPaintDeviceMetrics.mm
+++ b/WebCore/src/kwq/KWQPaintDeviceMetrics.mm
@@ -25,6 +25,8 @@
#include <qpaintdevicemetrics.h>
+#include <kwqdebug.h>
+
QPaintDeviceMetrics::QPaintDeviceMetrics(const QPaintDevice *)
{
}
@@ -32,20 +34,28 @@ QPaintDeviceMetrics::QPaintDeviceMetrics(const QPaintDevice *)
int QPaintDeviceMetrics::logicalDpiY() const
{
+ _logPartiallyImplemented();
+ return 72;
}
int QPaintDeviceMetrics::depth() const
{
+ _logPartiallyImplemented();
+ return 32;
}
int QPaintDeviceMetrics::width() const
{
+ _logPartiallyImplemented();
+ return 800;
}
int QPaintDeviceMetrics::height() const
{
+ _logPartiallyImplemented();
+ return 800;
}
diff --git a/WebCore/src/kwq/KWQPainter.mm b/WebCore/src/kwq/KWQPainter.mm
index 5d80c63..909c8b1 100644
--- a/WebCore/src/kwq/KWQPainter.mm
+++ b/WebCore/src/kwq/KWQPainter.mm
@@ -30,6 +30,7 @@
#include <qstack.h>
#include <qpoint.h>
+#include <kwqdebug.h>
#import <Cocoa/Cocoa.h>
@@ -51,7 +52,7 @@ QPainter::QPainter()
QPainter::QPainter(const QPaintDevice *pdev)
{
- NSLog (@"ERROR %s:%s:%d (NOT IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNeverImplemented();
}
@@ -109,7 +110,7 @@ void QPainter::setPen(const QPen &pen)
void QPainter::setPen(PenStyle)
{
- NSLog (@"WARNING (NOT YET IMPLEMENTED) void QPainter::setPen(PenStyle)\n");
+ _logNotYetImplemented();
}
@@ -128,7 +129,7 @@ void QPainter::setBrush(BrushStyle style)
QRect QPainter::xForm(const QRect &) const
{
- NSLog (@"WARNING (NOT YET IMPLEMENTED) QRect QPainter::xForm(const QRect &) const\n");
+ _logNotYetImplemented();
}
@@ -176,8 +177,8 @@ void QPainter::drawRect(int x, int y, int w, int h)
{
_lockFocus();
if (data->qbrush.qbrushstyle == SolidPattern){
- _setColorFromBrush();
- [NSBezierPath fillRect:NSMakeRect(x, y, w, h)];
+ //_setColorFromBrush();
+ //[NSBezierPath fillRect:NSMakeRect(x, y, w, h)];
}
_setColorFromPen();
[NSBezierPath strokeRect:NSMakeRect(x, y, w, h)];
@@ -462,8 +463,8 @@ 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)];
+ //[brush.qcolor.color set];
+ //[NSBezierPath fillRect:NSMakeRect(x, y, w, h)];
}
_unlockFocus();
}
@@ -471,36 +472,38 @@ void QPainter::fillRect(int x, int y, int w, int h, const QBrush &brush)
void QPainter::setClipping(bool)
{
- NSLog (@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNotYetImplemented();
}
void QPainter::setClipRegion(const QRegion &)
{
- NSLog (@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNotYetImplemented();
}
const QRegion &QPainter::clipRegion() const
{
- NSLog (@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNotYetImplemented();
+ return QRegion();
}
bool QPainter::hasClipping() const
{
- NSLog (@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNotYetImplemented();
+ return 0;
}
void QPainter::setClipRect(const QRect &)
{
- NSLog (@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNotYetImplemented();
}
void QPainter::setClipRect(int,int,int,int)
{
- NSLog (@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNotYetImplemented();
}
@@ -513,7 +516,7 @@ Qt::RasterOp QPainter::rasterOp() const
return XorROP;
return CopyROP;
#else
- NSLog (@"ERROR %s:%s:%d (NOT IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNeverImplemented();
#endif
}
@@ -534,19 +537,21 @@ void QPainter::setRasterOp(RasterOp op)
void QPainter::translate(double dx, double dy)
{
- NSLog (@"ERROR %s:%s:%d (NOT IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ NSLog (@"ERROR %s:%d %s (NOT IMPLEMENTED) (%d, %d)\n", __FILE__, __LINE__, __FUNCTION__, (int)dx, (int) dy);
}
void QPainter::scale(double dx, double dy)
{
- NSLog (@"ERROR %s:%s:%d (NOT IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ NSLog (@"ERROR %s:%d %s (NOT IMPLEMENTED) (%d, %d)\n", __FILE__, __LINE__, __FUNCTION__, (int)dx, (int) dy);
}
bool QPainter::begin(const QPaintDevice *bd)
{
data->bufferDevice = bd;
+ const QPixmap *pixmap = (QPixmap *)(data->bufferDevice);
+ [pixmap->nsimage setFlipped: YES];
}
@@ -558,7 +563,8 @@ bool QPainter::end()
QPaintDevice *QPainter::device() const
{
- NSLog (@"ERROR %s:%s:%d (NOT IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logPartiallyImplemented();
+ return (QPaintDevice *)data->bufferDevice;
}
void QPainter::_lockFocus(){
diff --git a/WebCore/src/kwq/KWQPalette.mm b/WebCore/src/kwq/KWQPalette.mm
index f3d2044..7bebb96 100644
--- a/WebCore/src/kwq/KWQPalette.mm
+++ b/WebCore/src/kwq/KWQPalette.mm
@@ -25,47 +25,67 @@
#include <qpalette.h>
+#include <kwqdebug.h>
+
QPalette::QPalette()
{
+ _logNotYetImplemented();
}
QPalette::QPalette(const QPalette &)
{
+ _logNotYetImplemented();
}
QPalette::~QPalette()
{
+ _logNotYetImplemented();
}
void QPalette::setColor(ColorGroup, QColorGroup::ColorRole role, const QColor &color)
{
+ _logNotYetImplemented();
}
const QColorGroup &QPalette::active() const
{
+ _logNotYetImplemented();
+ return data->active;
}
const QColorGroup &QPalette::inactive() const
{
+ _logNotYetImplemented();
+ return data->inactive;
}
const QColorGroup &QPalette::disabled() const
{
+ _logNotYetImplemented();
+ return data->disabled;
}
const QColorGroup &QPalette::normal() const
{
+ _logNotYetImplemented();
+ return data->normal;
}
-QPalette &QPalette::operator=(const QPalette &)
+QPalette &QPalette::operator=(const QPalette &p)
{
+ _logNotYetImplemented();
+ //p.data->ref();
+ //if ( data->deref() )
+ // delete data;
+ data = p.data;
+ return *this;
}
diff --git a/WebCore/src/kwq/KWQScrollView.mm b/WebCore/src/kwq/KWQScrollView.mm
index 082bbb9..816b6b7 100644
--- a/WebCore/src/kwq/KWQScrollView.mm
+++ b/WebCore/src/kwq/KWQScrollView.mm
@@ -57,28 +57,28 @@ QWidget* QScrollView::viewport() const
int QScrollView::visibleWidth() const
{
//_logNeverImplemented();
- return 200;
+ return 800;
}
int QScrollView::visibleHeight() const
{
//_logNeverImplemented();
- return 200;
+ return 800;
}
int QScrollView::contentsWidth() const
{
_logNeverImplemented();
- return 200;
+ return 800;
}
int QScrollView::contentsHeight() const
{
_logNeverImplemented();
- return 200;
+ return 800;
}
diff --git a/WebCore/src/kwq/KWQView.mm b/WebCore/src/kwq/KWQView.mm
index 9825e14..58a7158 100644
--- a/WebCore/src/kwq/KWQView.mm
+++ b/WebCore/src/kwq/KWQView.mm
@@ -27,6 +27,7 @@
#include <khtmlview.h>
#include <qwidget.h>
#include <qpainter.h>
+#include <html/html_documentimpl.h>
@implementation KWQView
@@ -85,7 +86,7 @@
{
[super initWithFrame: r];
widget = w;
- isFlipped = YES;
+ isFlipped = NO;
}
@@ -96,7 +97,12 @@
QPainter p(widget);
NSRect frame = [self frame];
-
+
+ if (((KHTMLView *)widget)->part()->xmlDocImpl() &&
+ ((KHTMLView *)widget)->part()->xmlDocImpl()->renderer()){
+ ((KHTMLView *)widget)->layout(TRUE);
+ }
+
((KHTMLView *)widget)->drawContents( &p, (int)frame.origin.x,
(int)frame.origin.y,
(int)frame.size.width,
diff --git a/WebCore/src/kwq/qt/_qregion.cpp b/WebCore/src/kwq/qt/_qregion.cpp
index 6c991a4..ca55a94 100644
--- a/WebCore/src/kwq/qt/_qregion.cpp
+++ b/WebCore/src/kwq/qt/_qregion.cpp
@@ -115,18 +115,18 @@
*****************************************************************************/
QRegion::QRegion( const QRect &r, RegionType type )
{
- fprintf (stderr,"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ fprintf (stderr,"ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
}
QRegion::QRegion( const QPointArray &a, bool winding )
{
- fprintf (stderr,"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ fprintf (stderr,"ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
}
QRegion::QRegion()
{
- fprintf (stderr,"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ fprintf (stderr,"ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
}
QRegion::QRegion( const QRegion & )
@@ -137,41 +137,41 @@ QRegion::QRegion( const QRegion & )
QRegion::QRegion( bool is_null )
{
- fprintf (stderr,"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ fprintf (stderr,"ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
}
QRegion::~QRegion()
{
- fprintf (stderr,"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ fprintf (stderr,"ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
}
QRegion QRegion::eor( const QRegion &r ) const
{
- fprintf (stderr,"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ fprintf (stderr,"ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
}
QRegion QRegion::subtract( const QRegion &r ) const
{
- fprintf (stderr,"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ fprintf (stderr,"ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
}
QRegion QRegion::intersect( const QRegion &) const
{
- fprintf (stderr,"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ fprintf (stderr,"ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
}
QRegion QRegion::unite( const QRegion &r ) const
{
- fprintf (stderr,"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ fprintf (stderr,"ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
}
QRegion QRegion::copy() const
{
- fprintf (stderr,"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ fprintf (stderr,"ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
}
@@ -182,7 +182,7 @@ bool QRegion::isNull() const
bool QRegion::contains( const QPoint &p ) const
{
- fprintf (stderr,"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ fprintf (stderr,"ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
}
/*!
diff --git a/WebCore/src/kwq/qt/qpalette.h b/WebCore/src/kwq/qt/qpalette.h
index 6c4551a..d578a01 100644
--- a/WebCore/src/kwq/qt/qpalette.h
+++ b/WebCore/src/kwq/qt/qpalette.h
@@ -83,8 +83,6 @@ public:
// operators ---------------------------------------------------------------
- QColorGroup &operator=(const QColorGroup &);
-
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
@@ -126,6 +124,13 @@ 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;
}; // class QPalette ===========================================================
diff --git a/WebCore/src/kwq/tests/khtmlview/draw.mm b/WebCore/src/kwq/tests/khtmlview/draw.mm
index bf6923f..2ac09bb 100644
--- a/WebCore/src/kwq/tests/khtmlview/draw.mm
+++ b/WebCore/src/kwq/tests/khtmlview/draw.mm
@@ -71,6 +71,7 @@ int main( int argc, char **argv )
// WebPageView.
// [[WebPageView alloc] initWithFrame: (NSRect)rect document: (WebPageDocument *)doc]
KHTMLView *htmlView = new KHTMLView (w, 0);
+ htmlView->resize (800,800);
KWQHTMLView *kwqHTMLView = [[[KWQHTMLView alloc] initWithFrame: NSMakeRect (0,0,0,0) widget: htmlView] autorelease];
w->setView (htmlView);
@@ -79,7 +80,7 @@ int main( int argc, char **argv )
htmlView->setView (kwqHTMLView);
- htmlView->resize(500, 400);
+ htmlView->resize(800, 800);
app.setMainWidget( htmlView );
htmlView->show();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list