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


The following commit has been merged in the debian/unstable branch:
commit c7cde7397aa7e552b34aa74b65822cfa0a719272
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jul 23 18:45:31 2002 +0000

    top level:
    
            * Tests/kde/kurl-test.cpp: (main): Add a lot of new tests.
    	One of them demonstrates the issue underlying bug 3004818.
    	The others are taken straight from the URI RFC (2396).
            * Tests/kde/kurl-test.chk: Expected results for new tests.
    
            * autogen.sh: Add the new WebCore timestamp file.
    
    WebCore:
    
    	Changes require a make clean because of the Project Builder bug.
    	So I added the "make clean timestamp" hackery.
    
            * .cvsignore: Ignore the new clean timestamp.
            * force-clean-timestamp: Added.
            * Makefile.am: Add rules for making clean happen.
    
            * khtml/html/html_formimpl.cpp:
            (HTMLGenericFormElementImpl::defaultEventHandler): Fix NULL dereference
    	bug in here that I ran into. Code later down in the same function has
    	the check for NULL, so clearly this is just a bug.
    
            * khtml/rendering/font.cpp:
            (Font::drawText): Simplify by using new drawText that takes a QChar array,
    	no need to make a QConstString.
            * khtml/rendering/render_text.cpp:
            (TextSlave::printDecoration): Simplify by using new drawUnderlineForText that
    	takes a QChar array, no need to make a QConstString.
    
            * kwq/WebCoreTextRenderer.h: Change underline-drawing to use a UniChar array.
    
            * kwq/qt/qpainter.h:
            * kwq/KWQPainter.mm:
            (QPainter::drawText): Change to take QChar array instead of a QString, but
    	also discovered a bizarre overloading thing that was happening before and
    	dealt with that by adding a new drawText that still does take a QString.
            (QPainter::drawUnderlineForText): Change to take QChar array.
    
            * kwq/qt/qcolor.h: Mark constructor explicit, so we don't get subtle strangess
    	like where the string to draw was being converted to a QColor.
    
            * khtml/css/cssstyleselector.cpp: No need for APPLE_CHANGES for
    	this change any more.
    
            * kwq/kdecore/kcharsets.h:
            * kwq/KWQKCharsets.mm: Remove unused functions.
    
            * kwq/khtml/khtml_settings.h:
            * kwq/KWQKHTMLSettings.mm: Remove unused functions.
    
            * kwq/qt/qfont.h:
            * kwq/KWQFont.mm: Simplify.
    
            * kwq/KWQPaintDeviceMetrics.mm: Simplify.
    
            * kwq/qt/qtextcodec.h:
            * kwq/KWQtextcodec.mm: (QTextCodec::codecForName): Remove unused parameter.
    
    WebKit:
    
            * WebCoreSupport.subproj/WebTextRenderer.m:
            (-[WebTextRenderer drawUnderlineForCharacters:stringLength:atPoint:withColor:]):
    	Change API to take character array instead of a string.
    
            * WebKit.pbproj/project.pbxproj: Took "subproj" off the names of some groups.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1638 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/.cvsignore b/WebCore/.cvsignore
index af3a10c..6cb2a46 100644
--- a/WebCore/.cvsignore
+++ b/WebCore/.cvsignore
@@ -1,3 +1,4 @@
 Makefile
 Makefile.in
 WebCore-combined.exp
+previous-clean-timestamp
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index a0aef11..ea7a523 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,53 @@
+2002-07-23  Darin Adler  <darin at apple.com>
+
+	Changes require a make clean because of the Project Builder bug.
+	So I added the "make clean timestamp" hackery.
+
+        * .cvsignore: Ignore the new clean timestamp.
+        * force-clean-timestamp: Added.
+        * Makefile.am: Add rules for making clean happen.
+
+        * khtml/html/html_formimpl.cpp:
+        (HTMLGenericFormElementImpl::defaultEventHandler): Fix NULL dereference
+	bug in here that I ran into. Code later down in the same function has
+	the check for NULL, so clearly this is just a bug.
+
+        * khtml/rendering/font.cpp:
+        (Font::drawText): Simplify by using new drawText that takes a QChar array,
+	no need to make a QConstString.
+        * khtml/rendering/render_text.cpp:
+        (TextSlave::printDecoration): Simplify by using new drawUnderlineForText that
+	takes a QChar array, no need to make a QConstString.
+
+        * kwq/WebCoreTextRenderer.h: Change underline-drawing to use a UniChar array.
+
+        * kwq/qt/qpainter.h:
+        * kwq/KWQPainter.mm:
+        (QPainter::drawText): Change to take QChar array instead of a QString, but
+	also discovered a bizarre overloading thing that was happening before and
+	dealt with that by adding a new drawText that still does take a QString.
+        (QPainter::drawUnderlineForText): Change to take QChar array.
+
+        * kwq/qt/qcolor.h: Mark constructor explicit, so we don't get subtle strangess
+	like where the string to draw was being converted to a QColor.
+
+        * khtml/css/cssstyleselector.cpp: No need for APPLE_CHANGES for
+	this change any more.
+
+        * kwq/kdecore/kcharsets.h:
+        * kwq/KWQKCharsets.mm: Remove unused functions.
+
+        * kwq/khtml/khtml_settings.h:
+        * kwq/KWQKHTMLSettings.mm: Remove unused functions.
+
+        * kwq/qt/qfont.h:
+        * kwq/KWQFont.mm: Simplify.
+
+        * kwq/KWQPaintDeviceMetrics.mm: Simplify.
+
+        * kwq/qt/qtextcodec.h:
+        * kwq/KWQtextcodec.mm: (QTextCodec::codecForName): Remove unused parameter.
+
 2002-07-23  David Hyatt  <hyatt at apple.com>
 
 	The STYLE element was ignoring both the media and type
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index a0aef11..ea7a523 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,53 @@
+2002-07-23  Darin Adler  <darin at apple.com>
+
+	Changes require a make clean because of the Project Builder bug.
+	So I added the "make clean timestamp" hackery.
+
+        * .cvsignore: Ignore the new clean timestamp.
+        * force-clean-timestamp: Added.
+        * Makefile.am: Add rules for making clean happen.
+
+        * khtml/html/html_formimpl.cpp:
+        (HTMLGenericFormElementImpl::defaultEventHandler): Fix NULL dereference
+	bug in here that I ran into. Code later down in the same function has
+	the check for NULL, so clearly this is just a bug.
+
+        * khtml/rendering/font.cpp:
+        (Font::drawText): Simplify by using new drawText that takes a QChar array,
+	no need to make a QConstString.
+        * khtml/rendering/render_text.cpp:
+        (TextSlave::printDecoration): Simplify by using new drawUnderlineForText that
+	takes a QChar array, no need to make a QConstString.
+
+        * kwq/WebCoreTextRenderer.h: Change underline-drawing to use a UniChar array.
+
+        * kwq/qt/qpainter.h:
+        * kwq/KWQPainter.mm:
+        (QPainter::drawText): Change to take QChar array instead of a QString, but
+	also discovered a bizarre overloading thing that was happening before and
+	dealt with that by adding a new drawText that still does take a QString.
+        (QPainter::drawUnderlineForText): Change to take QChar array.
+
+        * kwq/qt/qcolor.h: Mark constructor explicit, so we don't get subtle strangess
+	like where the string to draw was being converted to a QColor.
+
+        * khtml/css/cssstyleselector.cpp: No need for APPLE_CHANGES for
+	this change any more.
+
+        * kwq/kdecore/kcharsets.h:
+        * kwq/KWQKCharsets.mm: Remove unused functions.
+
+        * kwq/khtml/khtml_settings.h:
+        * kwq/KWQKHTMLSettings.mm: Remove unused functions.
+
+        * kwq/qt/qfont.h:
+        * kwq/KWQFont.mm: Simplify.
+
+        * kwq/KWQPaintDeviceMetrics.mm: Simplify.
+
+        * kwq/qt/qtextcodec.h:
+        * kwq/KWQtextcodec.mm: (QTextCodec::codecForName): Remove unused parameter.
+
 2002-07-23  David Hyatt  <hyatt at apple.com>
 
 	The STYLE element was ignoring both the media and type
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index a0aef11..ea7a523 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,53 @@
+2002-07-23  Darin Adler  <darin at apple.com>
+
+	Changes require a make clean because of the Project Builder bug.
+	So I added the "make clean timestamp" hackery.
+
+        * .cvsignore: Ignore the new clean timestamp.
+        * force-clean-timestamp: Added.
+        * Makefile.am: Add rules for making clean happen.
+
+        * khtml/html/html_formimpl.cpp:
+        (HTMLGenericFormElementImpl::defaultEventHandler): Fix NULL dereference
+	bug in here that I ran into. Code later down in the same function has
+	the check for NULL, so clearly this is just a bug.
+
+        * khtml/rendering/font.cpp:
+        (Font::drawText): Simplify by using new drawText that takes a QChar array,
+	no need to make a QConstString.
+        * khtml/rendering/render_text.cpp:
+        (TextSlave::printDecoration): Simplify by using new drawUnderlineForText that
+	takes a QChar array, no need to make a QConstString.
+
+        * kwq/WebCoreTextRenderer.h: Change underline-drawing to use a UniChar array.
+
+        * kwq/qt/qpainter.h:
+        * kwq/KWQPainter.mm:
+        (QPainter::drawText): Change to take QChar array instead of a QString, but
+	also discovered a bizarre overloading thing that was happening before and
+	dealt with that by adding a new drawText that still does take a QString.
+        (QPainter::drawUnderlineForText): Change to take QChar array.
+
+        * kwq/qt/qcolor.h: Mark constructor explicit, so we don't get subtle strangess
+	like where the string to draw was being converted to a QColor.
+
+        * khtml/css/cssstyleselector.cpp: No need for APPLE_CHANGES for
+	this change any more.
+
+        * kwq/kdecore/kcharsets.h:
+        * kwq/KWQKCharsets.mm: Remove unused functions.
+
+        * kwq/khtml/khtml_settings.h:
+        * kwq/KWQKHTMLSettings.mm: Remove unused functions.
+
+        * kwq/qt/qfont.h:
+        * kwq/KWQFont.mm: Simplify.
+
+        * kwq/KWQPaintDeviceMetrics.mm: Simplify.
+
+        * kwq/qt/qtextcodec.h:
+        * kwq/KWQtextcodec.mm: (QTextCodec::codecForName): Remove unused parameter.
+
 2002-07-23  David Hyatt  <hyatt at apple.com>
 
 	The STYLE element was ignoring both the media and type
diff --git a/WebCore/Makefile.am b/WebCore/Makefile.am
index 4f0d519..017c56a 100644
--- a/WebCore/Makefile.am
+++ b/WebCore/Makefile.am
@@ -1,6 +1,6 @@
 SUBDIRS = khtml kwq
 
-all-am:
+all-am: previous-clean-timestamp
 	pbxbuild -buildstyle $(BUILDSTYLE)
 clean-am:
 	pbxbuild clean
@@ -14,3 +14,6 @@ WebCore-combined.exp: WebCore.exp WebCore-tests.exp
 noinst_DATA = WebCore-combined.exp
 BUILT_SOURCES = $(noinst_DATA)
 CLEANFILES = $(BUILT_SOURCES)
+
+previous-clean-timestamp: force-clean-timestamp
+	make clean && touch $@
diff --git a/WebCore/force-clean-timestamp b/WebCore/force-clean-timestamp
new file mode 100644
index 0000000..ab7c11f
--- /dev/null
+++ b/WebCore/force-clean-timestamp
@@ -0,0 +1 @@
+QFont change 7/23 (and Project Builder bug 3005427)
\ No newline at end of file
diff --git a/WebCore/khtml/css/cssstyleselector.cpp b/WebCore/khtml/css/cssstyleselector.cpp
index 2a8a915..def900c 100644
--- a/WebCore/khtml/css/cssstyleselector.cpp
+++ b/WebCore/khtml/css/cssstyleselector.cpp
@@ -2231,11 +2231,6 @@ void CSSStyleSelector::applyRule( DOM::CSSProperty *prop )
         float size = 0;
         int minFontSize = settings->minFontSize();
 
-#ifndef APPLE_CHANGES
-        float toPix = paintDeviceMetrics->logicalDpiY()/72.;
-        if (toPix  < 96./72.) toPix = 96./72.;
-#endif
-
         if(parentNode) {
             oldSize = parentStyle->font().pixelSize();
         } else
diff --git a/WebCore/khtml/html/html_formimpl.cpp b/WebCore/khtml/html/html_formimpl.cpp
index 31c0732..1442617 100644
--- a/WebCore/khtml/html/html_formimpl.cpp
+++ b/WebCore/khtml/html/html_formimpl.cpp
@@ -662,7 +662,7 @@ void HTMLGenericFormElementImpl::defaultEventHandler(EventImpl *evt)
     {
         // Report focus in/out changes to the browser extension (editable widgets only)
         KHTMLView *view = getDocument()->view();
-        if (evt->id()==EventImpl::DOMFOCUSIN_EVENT && isEditable() && m_render->isWidget()) {
+        if (evt->id()==EventImpl::DOMFOCUSIN_EVENT && isEditable() && m_render && m_render->isWidget()) {
             KHTMLPartBrowserExtension *ext = static_cast<KHTMLPartBrowserExtension *>(view->part()->browserExtension());
             QWidget *widget = static_cast<RenderWidget*>(m_render)->widget();
             if (ext)
diff --git a/WebCore/khtml/rendering/font.cpp b/WebCore/khtml/rendering/font.cpp
index f671b6c..aa320fd 100644
--- a/WebCore/khtml/rendering/font.cpp
+++ b/WebCore/khtml/rendering/font.cpp
@@ -38,19 +38,12 @@ using namespace khtml;
 void Font::drawText( QPainter *p, int x, int y, QChar *str, int slen, int pos, int len,
         int toAdd, QPainter::TextDirection d, int from, int to, QColor bg ) const
 {
+#ifdef APPLE_CHANGES
+    p->drawText(x, y, str + pos, std::min(slen - pos, len), from, to, bg);
+#else
     QString qstr = QConstString(str, slen).string();
 
     //fprintf (stdout, "x %d, y %d, pos %d, qstr.length() %d, len %d, toAdd %d, from %d, to %d, str \"%s\"\n", x, y, pos, qstr.length(), len, toAdd, from, to, qstr.ascii());
-#ifdef APPLE_CHANGES    
-    if (pos != 0)
-        p->drawText(x, y, qstr.mid(pos, len), from, to, bg);
-    else if (len < slen) {
-        qstr.truncate(len);
-        p->drawText(x, y, qstr, from, to, bg);
-    }
-    else 
-        p->drawText(x, y, qstr, from, to, bg);
-#else
     // hack for fonts that don't have a welldefined nbsp
     if ( !fontDef.hasNbsp ) {
         // str.setLength() always does a deep copy, so the replacement code below is safe.
@@ -105,8 +98,8 @@ void Font::drawText( QPainter *p, int x, int y, QChar *str, int slen, int pos, i
 #endif
 }
 
-
 #ifdef APPLE_CHANGES
+
 float Font::floatWidth( QChar *chs, int slen, int pos, int len ) const
 {
     return fm.floatWidth(chs, slen, pos, len);
@@ -117,8 +110,8 @@ float Font::floatCharacterWidth( QChar *chs, int slen, int pos) const
 {
     return fm.floatCharacterWidth(chs, slen, pos);
 }
-#endif
 
+#endif
 
 int Font::width( QChar *chs, int slen, int pos, int len ) const
 {
@@ -227,6 +220,7 @@ void Font::update( QPaintDeviceMetrics* devMetrics ) const
 #endif
 
     fm = QFontMetrics( f );
+
 #ifndef APPLE_CHANGES
     fontDef.hasNbsp = fm.inFont( 0xa0 );
 #endif
diff --git a/WebCore/khtml/rendering/render_text.cpp b/WebCore/khtml/rendering/render_text.cpp
index 648a4f9..11111f0 100644
--- a/WebCore/khtml/rendering/render_text.cpp
+++ b/WebCore/khtml/rendering/render_text.cpp
@@ -50,7 +50,7 @@ void TextSlave::printSelection(const Font *f, RenderText *text, QPainter *p, Ren
     QColor c = QPainter::selectedTextBackgroundColor();
     if (textColor == c)
         c = QColor(0xff - c.red(), 0xff - c.green(), 0xff - c.blue());
-    p->setPen(style->color());
+    p->setPen(textColor);
 #else
     QColor c = style->color();
     p->setPen(QColor(0xff-c.red(),0xff-c.green(),0xff-c.blue()));
@@ -78,10 +78,8 @@ void TextSlave::printDecoration( QPainter *pt, RenderText* p, int _tx, int _ty,
 
 #ifdef APPLE_CHANGES
     // Use a special function for underlines to get the positioning exactly right.
-    if(deco & UNDERLINE) {
-        QConstString s(p->str->s + m_start, m_len);
-        pt->drawUnderlineForText(_tx, _ty + m_baseline, s.string());
-    }
+    if(deco & UNDERLINE)
+        pt->drawUnderlineForText(_tx, _ty + m_baseline, p->str->s + m_start, m_len);
 #else
     int underlineOffset = ( pt->fontMetrics().height() + m_baseline ) / 2;
     if(underlineOffset <= m_baseline) underlineOffset = m_baseline+1;
diff --git a/WebCore/kwq/KWQColor.h b/WebCore/kwq/KWQColor.h
index b053692..5ba0d15 100644
--- a/WebCore/kwq/KWQColor.h
+++ b/WebCore/kwq/KWQColor.h
@@ -43,8 +43,8 @@ class QColor {
 public:
     QColor();
     QColor(int,int,int);
-    QColor(const QString &);
-    QColor(const char *);
+    explicit QColor(const QString &);
+    QColor(const char *); // can't be explicit because of helper.cpp
     QColor(const QColor &);
 
     ~QColor();
diff --git a/WebCore/kwq/KWQFont.h b/WebCore/kwq/KWQFont.h
index f0ef13d..162bd9e 100644
--- a/WebCore/kwq/KWQFont.h
+++ b/WebCore/kwq/KWQFont.h
@@ -27,7 +27,6 @@
 #define QFONT_H_
 
 class QString;
-class QPainter;
 
 #ifdef __OBJC__
 @class NSString;
@@ -37,26 +36,23 @@ class NSString;
 
 class QFont {
 public:
-
-    enum CharSet { Latin1, Unicode };
     enum Weight { Normal = 50, Bold = 63 };
 
     QFont();
-    QFont(const QFont &);
-    QFont &operator=(const QFont &);
-
-    ~QFont();
 
-    int pixelSize() const;
-    QString family() const;
     void setFamily(const QString &);
-    void setPixelSize(int);
+    QString family() const;
+
     void setWeight(int);
     int weight() const;
-    bool setItalic(bool);
-    bool italic() const;
     bool bold() const;
 
+    void setItalic(bool);
+    bool italic() const;
+
+    void setPixelSize(float s) { _size = s; }
+    int pixelSize() const { return (int)_size; }
+
     bool operator==(const QFont &x) const;
     bool operator!=(const QFont &x) const { return !(*this == x); }
     
@@ -68,7 +64,6 @@ private:
     NSString *_family;
     int _trait;
     float _size;
-
 };
 
 #endif
diff --git a/WebCore/kwq/KWQFont.mm b/WebCore/kwq/KWQFont.mm
index 63bebef..60676f3 100644
--- a/WebCore/kwq/KWQFont.mm
+++ b/WebCore/kwq/KWQFont.mm
@@ -35,22 +35,6 @@ QFont::QFont()
 {
 }
 
-QFont::QFont(const QFont &copyFrom)
-    : _family(copyFrom._family)
-    , _trait(copyFrom._trait)
-    , _size(copyFrom._size)
-{
-}
-
-QFont::~QFont()
-{
-}
-
-int QFont::pixelSize() const
-{
-    return (int)_size;
-}
-
 QString QFont::family() const
 {
     return QString::fromNSString(_family);
@@ -72,17 +56,11 @@ void QFont::setFamily(const QString &qfamilyName)
     }
 }
 
-void QFont::setPixelSize(int sz)
-{
-    _size = sz;
-}
-
 void QFont::setWeight(int weight)
 {
     if (weight == Bold) {
         _trait |= NSBoldFontMask;
-    }
-    else if (weight == Normal) {
+    } else if (weight == Normal) {
         _trait &= ~NSBoldFontMask;
     }
 }
@@ -92,15 +70,13 @@ int QFont::weight() const
     return bold() ? Bold : Normal;
 }
 
-bool QFont::setItalic(bool flag)
+void QFont::setItalic(bool flag)
 {
     if (flag) {
         _trait |= NSItalicFontMask;
-    }
-    else {
+    } else {
         _trait &= ~NSItalicFontMask;
     }
-    return false;
 }
 
 bool QFont::italic() const
@@ -113,14 +89,6 @@ bool QFont::bold() const
     return _trait & NSBoldFontMask;
 }
 
-QFont &QFont::operator=(const QFont &assignFrom)
-{
-    _family = assignFrom._family;
-    _trait = assignFrom._trait;
-    _size = assignFrom._size;
-    return *this;
-}
-
 bool QFont::operator==(const QFont &compareFont) const
 {
     return _family == compareFont._family
diff --git a/WebCore/kwq/KWQKCharsets.h b/WebCore/kwq/KWQKCharsets.h
index 89b45ca..2a1e5cc 100644
--- a/WebCore/kwq/KWQKCharsets.h
+++ b/WebCore/kwq/KWQKCharsets.h
@@ -35,18 +35,6 @@ class KCharsets {
 public:
     QTextCodec *codecForName(const QString &) const;
     QTextCodec *codecForName(const QString &, bool &) const;
-
-    QFont::CharSet charsetForEncoding(const QString &) const;
-    QFont::CharSet charsetForEncoding(const QString &, bool) const;
-
-    void setQFont(QFont &, QFont::CharSet) const { }
-    void setQFont(QFont &, QString) const { }
-
-    QString name(QFont::CharSet);
-    QString xCharsetName(QFont::CharSet) const;
-
-    bool supportsScript(const QFont &, QFont::CharSet);
-
 };
 
 #endif
diff --git a/WebCore/kwq/KWQKCharsets.mm b/WebCore/kwq/KWQKCharsets.mm
index 9d30d3a..d24dddb 100644
--- a/WebCore/kwq/KWQKCharsets.mm
+++ b/WebCore/kwq/KWQKCharsets.mm
@@ -25,7 +25,6 @@
 
 #import <kcharsets.h>
 #import <qtextcodec.h>
-#import <kwqdebug.h>
 
 QTextCodec *KCharsets::codecForName(const QString &qs) const
 {
@@ -41,41 +40,5 @@ QTextCodec *KCharsets::codecForName(const QString &qs, bool &ok) const
     } else {
         ok = true;
     }
-
     return codec;
 }
-
-QFont::CharSet KCharsets::charsetForEncoding(const QString &) const
-{
-    // FIXME: need real implementation here
-    _logPartiallyImplemented();
-    return QFont::Unicode;
-}
-
-QFont::CharSet KCharsets::charsetForEncoding(const QString &, bool) const
-{
-    // FIXME: need real implementation here
-    _logPartiallyImplemented();
-    return QFont::Unicode;
-}
-
-QString KCharsets::name(QFont::CharSet)
-{
-    // FIXME: need real implementation here
-    _logPartiallyImplemented();
-    return QString();
-}
-
-QString KCharsets::xCharsetName(QFont::CharSet) const
-{
-    // FIXME: do we need a real implementation here?
-    _logPartiallyImplemented();
-    return QString();
-}
-
-bool KCharsets::supportsScript(const QFont &, QFont::CharSet)
-{
-    // FIXME: do we need a real implementation here?
-    _logPartiallyImplemented();
-    return true;
-}
diff --git a/WebCore/kwq/KWQKHTMLSettings.h b/WebCore/kwq/KWQKHTMLSettings.h
index 6932eae..b3e712b 100644
--- a/WebCore/kwq/KWQKHTMLSettings.h
+++ b/WebCore/kwq/KWQKHTMLSettings.h
@@ -39,8 +39,6 @@ public:
         KAnimationLoopOnce,
         KAnimationEnabled
     };
-
-    KHTMLSettings();
     
     void init() { }
 
@@ -62,9 +60,6 @@ public:
     int minFontSize() const;
     int mediumFontSize() const;
 
-    QFont::CharSet script() const;
-    void setScript( QFont::CharSet c );
-
     bool changeCursor() const;
 
     bool isFormCompletionEnabled() const;
@@ -82,9 +77,6 @@ public:
     bool isPluginsEnabled(const QString &host) const;
     
     QString userStyleSheet() const;
-
-private:
-    QFont::CharSet m_charSet;
 };
 
 #endif
diff --git a/WebCore/kwq/KWQKHTMLSettings.mm b/WebCore/kwq/KWQKHTMLSettings.mm
index e3ad79c..9f0c2b3 100644
--- a/WebCore/kwq/KWQKHTMLSettings.mm
+++ b/WebCore/kwq/KWQKHTMLSettings.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
@@ -22,50 +22,40 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
-#import <kwqdebug.h>
-#import <khtml_settings.h>
 
-KHTMLSettings::KHTMLSettings()
-{    
-    m_charSet = QFont::Latin1;
-}
+#import <khtml_settings.h>
+#import <kwqdebug.h>
 
 QString KHTMLSettings::stdFontName() const
 {
     return QString::fromNSString([[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitStandardFont"]);
 }
 
-
 QString KHTMLSettings::fixedFontName() const
 {
     return QString::fromNSString([[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitFixedFont"]);
 }
 
-
 QString KHTMLSettings::serifFontName() const
 {
     return QString::fromNSString([[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitSerifFont"]);
 }
 
-
 QString KHTMLSettings::sansSerifFontName() const
 {
     return QString::fromNSString([[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitSansSerifFont"]);
 }
 
-
 QString KHTMLSettings::cursiveFontName() const
 {
     return QString::fromNSString([[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitCursiveFont"]);
 }
 
-
 QString KHTMLSettings::fantasyFontName() const
 {
     return QString::fromNSString([[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitFantasyFont"]);
 }
 
-
 QString KHTMLSettings::settingsToCSS() const
 {
     _logNotYetImplemented();
@@ -75,12 +65,9 @@ QString KHTMLSettings::settingsToCSS() const
 const QString &KHTMLSettings::encoding() const
 {
     // FIXME: remove this hack
-    static const QString *DEFAULT_ENCODING = NULL;
     _logNotYetImplemented();
-    if (DEFAULT_ENCODING == NULL) {
-        DEFAULT_ENCODING = new QString(QString::fromNSString(@"NSISOLatin1StringEncoding"));
-    }
-    return *DEFAULT_ENCODING;
+    static const QString e(QString::fromNSString(@"NSISOLatin1StringEncoding"));
+    return e;
 }
 
 int KHTMLSettings::minFontSize() const
@@ -93,16 +80,6 @@ int KHTMLSettings::mediumFontSize() const
     return [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitMediumFontSize"];
 }
 
-QFont::CharSet KHTMLSettings::script() const
-{
-    return m_charSet;
-}
-
-void KHTMLSettings::setScript(QFont::CharSet c)
-{
-    m_charSet = c;
-}
-
 bool KHTMLSettings::changeCursor() const
 {
     return true;
@@ -110,13 +87,11 @@ bool KHTMLSettings::changeCursor() const
 
 bool KHTMLSettings::isFormCompletionEnabled() const
 {
-    _logNotYetImplemented();
-    return FALSE;
+    return false;
 }
 
 int KHTMLSettings::maxFormCompletionItems() const
 {
-    _logNotYetImplemented();
     return 0;
 }
 
diff --git a/WebCore/kwq/KWQPaintDeviceMetrics.mm b/WebCore/kwq/KWQPaintDeviceMetrics.mm
index 3c93bfb..76cd040 100644
--- a/WebCore/kwq/KWQPaintDeviceMetrics.mm
+++ b/WebCore/kwq/KWQPaintDeviceMetrics.mm
@@ -33,7 +33,6 @@ QPaintDeviceMetrics::QPaintDeviceMetrics(const QPaintDevice *)
 
 int QPaintDeviceMetrics::logicalDpiY() const 
 {
-    //_logPartiallyImplemented();
     return 96;
 }
 
diff --git a/WebCore/kwq/KWQPainter.h b/WebCore/kwq/KWQPainter.h
index 714d81b..0f1ee77 100644
--- a/WebCore/kwq/KWQPainter.h
+++ b/WebCore/kwq/KWQPainter.h
@@ -91,8 +91,9 @@ public:
     RasterOp rasterOp() const;
     void setRasterOp(RasterOp);
 
-    void drawText(int x, int y, const QString &, int from, int to, const QColor& backgroundColor);
-    void drawUnderlineForText(int x, int y, const QString &);
+    void drawText(int x, int y, int, int, int alignmentFlags, const QString &);
+    void drawText(int x, int y, const QChar *, int length, int from, int to, const QColor& backgroundColor);
+    void drawUnderlineForText(int x, int y, const QChar *, int length);
     static QColor selectedTextBackgroundColor();
     
     void setPaintingDisabled(bool f);
diff --git a/WebCore/kwq/KWQPainter.mm b/WebCore/kwq/KWQPainter.mm
index e68ee6a..9cf04f0 100644
--- a/WebCore/kwq/KWQPainter.mm
+++ b/WebCore/kwq/KWQPainter.mm
@@ -344,7 +344,7 @@ void QPainter::drawTiledPixmap( int x, int y, int w, int h,
     [pixmap.imageRenderer tileInRect:NSMakeRect(x, y, w, h) fromPoint:NSMakePoint(sx, sy)];
 }
 
-void QPainter::drawText(int x, int y, const QString &qstring, int from, int to, const QColor &backgroundColor)
+void QPainter::drawText(int x, int y, int, int, int alignmentFlags, const QString &qstring)
 {
     if (data->state.paintingDisabled)
         return;
@@ -352,18 +352,31 @@ void QPainter::drawText(int x, int y, const QString &qstring, int from, int to,
     [[[WebCoreTextRendererFactory sharedFactory]
         rendererWithFamily:data->state.font.getNSFamily() traits:data->state.font.getNSTraits() size:data->state.font.getNSSize()]
     	drawCharacters:(const UniChar *)qstring.unicode() stringLength:qstring.length()
+        fromCharacterPosition:0 toCharacterPosition:qstring.length() atPoint:NSMakePoint(x, y)
+        withTextColor:data->state.pen.color().getNSColor() backgroundColor:nil];
+}
+
+void QPainter::drawText(int x, int y, const QChar *str, int len, int from, int to, const QColor &backgroundColor)
+{
+    if (data->state.paintingDisabled || len <= 0)
+        return;
+        
+    [[[WebCoreTextRendererFactory sharedFactory]
+        rendererWithFamily:data->state.font.getNSFamily() traits:data->state.font.getNSTraits() size:data->state.font.getNSSize()]
+    	drawCharacters:(const UniChar *)str stringLength:len
         fromCharacterPosition:from toCharacterPosition:to atPoint:NSMakePoint(x, y)
         withTextColor:data->state.pen.color().getNSColor() backgroundColor:backgroundColor.isValid() ? backgroundColor.getNSColor() : nil];
 }
 
-void QPainter::drawUnderlineForText(int x, int y, const QString &qstring)
+void QPainter::drawUnderlineForText(int x, int y, const QChar *str, int len)
 {
     if (data->state.paintingDisabled)
         return;
         
     [[[WebCoreTextRendererFactory sharedFactory]
         rendererWithFamily:data->state.font.getNSFamily() traits:data->state.font.getNSTraits() size:data->state.font.getNSSize()]
-        drawUnderlineForString:qstring.getNSString() atPoint:NSMakePoint(x,y) withColor:data->state.pen.color().getNSColor()];
+        drawUnderlineForCharacters:(const UniChar *)str stringLength:len
+        atPoint:NSMakePoint(x,y) withColor:data->state.pen.color().getNSColor()];
 }
 
 QColor QPainter::selectedTextBackgroundColor()
diff --git a/WebCore/kwq/KWQTextCodec.h b/WebCore/kwq/KWQTextCodec.h
index c122c35..812bfdf 100644
--- a/WebCore/kwq/KWQTextCodec.h
+++ b/WebCore/kwq/KWQTextCodec.h
@@ -34,7 +34,7 @@ class QTextDecoder;
 class QTextCodec {
 public:
     static QTextCodec *codecForMib(int);
-    static QTextCodec *codecForName(const char *, int accuracy=0);
+    static QTextCodec *codecForName(const char *);
     static QTextCodec *codecForLocale();
 
     QTextCodec(CFStringEncoding e) : encoding(e) { }
diff --git a/WebCore/kwq/KWQTextCodec.mm b/WebCore/kwq/KWQTextCodec.mm
index 6da26c7..63f2702 100644
--- a/WebCore/kwq/KWQTextCodec.mm
+++ b/WebCore/kwq/KWQTextCodec.mm
@@ -61,7 +61,7 @@ QTextCodec *QTextCodec::codecForMib(int mib)
     }
 }
 
-QTextCodec *QTextCodec::codecForName(const char *name, int accuracy)
+QTextCodec *QTextCodec::codecForName(const char *name)
 {
     CFStringRef cfname;
     CFStringEncoding encoding;
diff --git a/WebCore/kwq/WebCoreTextRenderer.h b/WebCore/kwq/WebCoreTextRenderer.h
index 379c332..9424704 100644
--- a/WebCore/kwq/WebCoreTextRenderer.h
+++ b/WebCore/kwq/WebCoreTextRenderer.h
@@ -40,6 +40,6 @@
 
 // drawing
 - (void)drawCharacters:(const UniChar *)characters stringLength:(unsigned)length fromCharacterPosition:(int)from toCharacterPosition:(int)to atPoint:(NSPoint)point withTextColor:(NSColor *)textColor backgroundColor:(NSColor *)backgroundColor;
-- (void)drawUnderlineForString:(NSString *)string atPoint:(NSPoint)point withColor:(NSColor *)color;
+- (void)drawUnderlineForCharacters:(const UniChar *)characters stringLength:(unsigned)length atPoint:(NSPoint)point withColor:(NSColor *)color;
 
 @end
diff --git a/WebCore/kwq/kdecore/kcharsets.h b/WebCore/kwq/kdecore/kcharsets.h
index 89b45ca..2a1e5cc 100644
--- a/WebCore/kwq/kdecore/kcharsets.h
+++ b/WebCore/kwq/kdecore/kcharsets.h
@@ -35,18 +35,6 @@ class KCharsets {
 public:
     QTextCodec *codecForName(const QString &) const;
     QTextCodec *codecForName(const QString &, bool &) const;
-
-    QFont::CharSet charsetForEncoding(const QString &) const;
-    QFont::CharSet charsetForEncoding(const QString &, bool) const;
-
-    void setQFont(QFont &, QFont::CharSet) const { }
-    void setQFont(QFont &, QString) const { }
-
-    QString name(QFont::CharSet);
-    QString xCharsetName(QFont::CharSet) const;
-
-    bool supportsScript(const QFont &, QFont::CharSet);
-
 };
 
 #endif
diff --git a/WebCore/kwq/khtml/khtml_settings.h b/WebCore/kwq/khtml/khtml_settings.h
index 6932eae..b3e712b 100644
--- a/WebCore/kwq/khtml/khtml_settings.h
+++ b/WebCore/kwq/khtml/khtml_settings.h
@@ -39,8 +39,6 @@ public:
         KAnimationLoopOnce,
         KAnimationEnabled
     };
-
-    KHTMLSettings();
     
     void init() { }
 
@@ -62,9 +60,6 @@ public:
     int minFontSize() const;
     int mediumFontSize() const;
 
-    QFont::CharSet script() const;
-    void setScript( QFont::CharSet c );
-
     bool changeCursor() const;
 
     bool isFormCompletionEnabled() const;
@@ -82,9 +77,6 @@ public:
     bool isPluginsEnabled(const QString &host) const;
     
     QString userStyleSheet() const;
-
-private:
-    QFont::CharSet m_charSet;
 };
 
 #endif
diff --git a/WebCore/kwq/qt/qcolor.h b/WebCore/kwq/qt/qcolor.h
index b053692..5ba0d15 100644
--- a/WebCore/kwq/qt/qcolor.h
+++ b/WebCore/kwq/qt/qcolor.h
@@ -43,8 +43,8 @@ class QColor {
 public:
     QColor();
     QColor(int,int,int);
-    QColor(const QString &);
-    QColor(const char *);
+    explicit QColor(const QString &);
+    QColor(const char *); // can't be explicit because of helper.cpp
     QColor(const QColor &);
 
     ~QColor();
diff --git a/WebCore/kwq/qt/qfont.h b/WebCore/kwq/qt/qfont.h
index f0ef13d..162bd9e 100644
--- a/WebCore/kwq/qt/qfont.h
+++ b/WebCore/kwq/qt/qfont.h
@@ -27,7 +27,6 @@
 #define QFONT_H_
 
 class QString;
-class QPainter;
 
 #ifdef __OBJC__
 @class NSString;
@@ -37,26 +36,23 @@ class NSString;
 
 class QFont {
 public:
-
-    enum CharSet { Latin1, Unicode };
     enum Weight { Normal = 50, Bold = 63 };
 
     QFont();
-    QFont(const QFont &);
-    QFont &operator=(const QFont &);
-
-    ~QFont();
 
-    int pixelSize() const;
-    QString family() const;
     void setFamily(const QString &);
-    void setPixelSize(int);
+    QString family() const;
+
     void setWeight(int);
     int weight() const;
-    bool setItalic(bool);
-    bool italic() const;
     bool bold() const;
 
+    void setItalic(bool);
+    bool italic() const;
+
+    void setPixelSize(float s) { _size = s; }
+    int pixelSize() const { return (int)_size; }
+
     bool operator==(const QFont &x) const;
     bool operator!=(const QFont &x) const { return !(*this == x); }
     
@@ -68,7 +64,6 @@ private:
     NSString *_family;
     int _trait;
     float _size;
-
 };
 
 #endif
diff --git a/WebCore/kwq/qt/qpainter.h b/WebCore/kwq/qt/qpainter.h
index 714d81b..0f1ee77 100644
--- a/WebCore/kwq/qt/qpainter.h
+++ b/WebCore/kwq/qt/qpainter.h
@@ -91,8 +91,9 @@ public:
     RasterOp rasterOp() const;
     void setRasterOp(RasterOp);
 
-    void drawText(int x, int y, const QString &, int from, int to, const QColor& backgroundColor);
-    void drawUnderlineForText(int x, int y, const QString &);
+    void drawText(int x, int y, int, int, int alignmentFlags, const QString &);
+    void drawText(int x, int y, const QChar *, int length, int from, int to, const QColor& backgroundColor);
+    void drawUnderlineForText(int x, int y, const QChar *, int length);
     static QColor selectedTextBackgroundColor();
     
     void setPaintingDisabled(bool f);
diff --git a/WebCore/kwq/qt/qtextcodec.h b/WebCore/kwq/qt/qtextcodec.h
index c122c35..812bfdf 100644
--- a/WebCore/kwq/qt/qtextcodec.h
+++ b/WebCore/kwq/qt/qtextcodec.h
@@ -34,7 +34,7 @@ class QTextDecoder;
 class QTextCodec {
 public:
     static QTextCodec *codecForMib(int);
-    static QTextCodec *codecForName(const char *, int accuracy=0);
+    static QTextCodec *codecForName(const char *);
     static QTextCodec *codecForLocale();
 
     QTextCodec(CFStringEncoding e) : encoding(e) { }
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 366896e..e45cd24 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,11 @@
+2002-07-23  Darin Adler  <darin at apple.com>
+
+        * WebCoreSupport.subproj/WebTextRenderer.m:
+        (-[WebTextRenderer drawUnderlineForCharacters:stringLength:atPoint:withColor:]):
+	Change API to take character array instead of a string.
+
+        * WebKit.pbproj/project.pbxproj: Took "subproj" off the names of some groups.
+
 === Alexander-14 ===
 
 2002-07-22  Richard Williamson  <rjw at apple.com>
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 366896e..e45cd24 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,11 @@
+2002-07-23  Darin Adler  <darin at apple.com>
+
+        * WebCoreSupport.subproj/WebTextRenderer.m:
+        (-[WebTextRenderer drawUnderlineForCharacters:stringLength:atPoint:withColor:]):
+	Change API to take character array instead of a string.
+
+        * WebKit.pbproj/project.pbxproj: Took "subproj" off the names of some groups.
+
 === Alexander-14 ===
 
 2002-07-22  Richard Williamson  <rjw at apple.com>
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
index 0c9a238..6220a3c 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
@@ -640,10 +640,10 @@ cleanup:
 }
 
 
-- (void)drawUnderlineForString:(NSString *)string atPoint:(NSPoint)point withColor:(NSColor *)color
+- (void)drawUnderlineForCharacters:(const UniChar *)characters stringLength:(unsigned)length atPoint:(NSPoint)point withColor:(NSColor *)color
 {
     NSGraphicsContext *graphicsContext = [NSGraphicsContext currentContext];
-    int width = [self widthForString: string];
+    int width = [self widthForCharacters:characters length:length];
     CGContextRef cgContext;
     float lineWidth;
     
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index 19a934e..9ef746f 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -419,6 +419,7 @@
 				F59668C902AD2923018635CA,
 			);
 			isa = PBXGroup;
+			name = Misc;
 			path = Misc.subproj;
 			refType = 4;
 		};
@@ -1170,6 +1171,7 @@
 				F5C81E4202994EA401C1A525,
 			);
 			isa = PBXGroup;
+			name = Bookmarks;
 			path = Bookmarks.subproj;
 			refType = 4;
 		};

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list