[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 05:59:52 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit b71e325a4a2f86235152e0f1b6d968f365dac66d
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Apr 1 17:42:01 2002 +0000

    	* src/kdelibs/khtml/khtmlview.cpp: (KHTMLView::restoreScrollBar): Disable code
            that checks if the scroll bar is visible, because it currently doesn't do us
            any good. We may want to turn it back on if we ever implement setVScrollBarMode.
    	(KHTMLView::viewportWheelEvent): Disable this code for now since it requires
            access to the vertical scroll bar object.
    	* src/kdelibs/khtml/rendering/render_form.cpp:
            (RenderTextArea::calcMinMaxWidth): Use our own verticalScrollBarWidth and
            horizontalScrollBarHeight rather than getting scroll bar widgets.
    
    	* src/kwq/qt/qscrollview.h: Remove QScrollView::horizontalScrollBar() and
            QScrollView::verticalScrollBar(), since we don't have QWidgets to return for
            these two. We can re-add these later if we need to.
    
    	* src/kwq/qt/qtextedit.h: Removed QMultiLineEdit, and QTextEdit() constructor.
    	* src/kwq/kdeui/keditcl.h: Removed.
    	* src/kwq/KWQTextEdit.mm: Remove unused functions.
    	(QTextEdit::verticalScrollBarWidth), (QTextEdit::horizontalScrollBarHeight):
            Implement these two new ones.
    	* src/kwq/KWQScrollView.mm: Remove unused functions.
    
    	* src/kdelibs/khtml/rendering/render_form.cpp: Fixed spelling error.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@917 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 7f2c3ad..d050354 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,27 @@
+2002-04-01  Darin Adler  <darin at apple.com>
+
+	* src/kdelibs/khtml/khtmlview.cpp: (KHTMLView::restoreScrollBar): Disable code
+        that checks if the scroll bar is visible, because it currently doesn't do us
+        any good. We may want to turn it back on if we ever implement setVScrollBarMode.
+	(KHTMLView::viewportWheelEvent): Disable this code for now since it requires
+        access to the vertical scroll bar object.
+	* src/kdelibs/khtml/rendering/render_form.cpp:
+        (RenderTextArea::calcMinMaxWidth): Use our own verticalScrollBarWidth and
+        horizontalScrollBarHeight rather than getting scroll bar widgets.
+        
+	* src/kwq/qt/qscrollview.h: Remove QScrollView::horizontalScrollBar() and
+        QScrollView::verticalScrollBar(), since we don't have QWidgets to return for
+        these two. We can re-add these later if we need to.
+         
+	* src/kwq/qt/qtextedit.h: Removed QMultiLineEdit, and QTextEdit() constructor.
+	* src/kwq/kdeui/keditcl.h: Removed.
+	* src/kwq/KWQTextEdit.mm: Remove unused functions.
+	(QTextEdit::verticalScrollBarWidth), (QTextEdit::horizontalScrollBarHeight):
+        Implement these two new ones.
+	* src/kwq/KWQScrollView.mm: Remove unused functions.
+
+	* src/kdelibs/khtml/rendering/render_form.cpp: Fixed spelling error.
+
 2002-03-31  Maciej Stachowiak  <mjs at apple.com>
 
 	Fix Radar 2890464 (abcnews.com renders as a blank blue page (probably a JavaScript
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 7f2c3ad..d050354 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,27 @@
+2002-04-01  Darin Adler  <darin at apple.com>
+
+	* src/kdelibs/khtml/khtmlview.cpp: (KHTMLView::restoreScrollBar): Disable code
+        that checks if the scroll bar is visible, because it currently doesn't do us
+        any good. We may want to turn it back on if we ever implement setVScrollBarMode.
+	(KHTMLView::viewportWheelEvent): Disable this code for now since it requires
+        access to the vertical scroll bar object.
+	* src/kdelibs/khtml/rendering/render_form.cpp:
+        (RenderTextArea::calcMinMaxWidth): Use our own verticalScrollBarWidth and
+        horizontalScrollBarHeight rather than getting scroll bar widgets.
+        
+	* src/kwq/qt/qscrollview.h: Remove QScrollView::horizontalScrollBar() and
+        QScrollView::verticalScrollBar(), since we don't have QWidgets to return for
+        these two. We can re-add these later if we need to.
+         
+	* src/kwq/qt/qtextedit.h: Removed QMultiLineEdit, and QTextEdit() constructor.
+	* src/kwq/kdeui/keditcl.h: Removed.
+	* src/kwq/KWQTextEdit.mm: Remove unused functions.
+	(QTextEdit::verticalScrollBarWidth), (QTextEdit::horizontalScrollBarHeight):
+        Implement these two new ones.
+	* src/kwq/KWQScrollView.mm: Remove unused functions.
+
+	* src/kdelibs/khtml/rendering/render_form.cpp: Fixed spelling error.
+
 2002-03-31  Maciej Stachowiak  <mjs at apple.com>
 
 	Fix Radar 2890464 (abcnews.com renders as a blank blue page (probably a JavaScript
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 7f2c3ad..d050354 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,27 @@
+2002-04-01  Darin Adler  <darin at apple.com>
+
+	* src/kdelibs/khtml/khtmlview.cpp: (KHTMLView::restoreScrollBar): Disable code
+        that checks if the scroll bar is visible, because it currently doesn't do us
+        any good. We may want to turn it back on if we ever implement setVScrollBarMode.
+	(KHTMLView::viewportWheelEvent): Disable this code for now since it requires
+        access to the vertical scroll bar object.
+	* src/kdelibs/khtml/rendering/render_form.cpp:
+        (RenderTextArea::calcMinMaxWidth): Use our own verticalScrollBarWidth and
+        horizontalScrollBarHeight rather than getting scroll bar widgets.
+        
+	* src/kwq/qt/qscrollview.h: Remove QScrollView::horizontalScrollBar() and
+        QScrollView::verticalScrollBar(), since we don't have QWidgets to return for
+        these two. We can re-add these later if we need to.
+         
+	* src/kwq/qt/qtextedit.h: Removed QMultiLineEdit, and QTextEdit() constructor.
+	* src/kwq/kdeui/keditcl.h: Removed.
+	* src/kwq/KWQTextEdit.mm: Remove unused functions.
+	(QTextEdit::verticalScrollBarWidth), (QTextEdit::horizontalScrollBarHeight):
+        Implement these two new ones.
+	* src/kwq/KWQScrollView.mm: Remove unused functions.
+
+	* src/kdelibs/khtml/rendering/render_form.cpp: Fixed spelling error.
+
 2002-03-31  Maciej Stachowiak  <mjs at apple.com>
 
 	Fix Radar 2890464 (abcnews.com renders as a blank blue page (probably a JavaScript
diff --git a/WebCore/khtml/khtmlview.cpp b/WebCore/khtml/khtmlview.cpp
index b606775..5c017c7 100644
--- a/WebCore/khtml/khtmlview.cpp
+++ b/WebCore/khtml/khtmlview.cpp
@@ -1208,7 +1208,9 @@ void KHTMLView::restoreScrollBar ( )
         layout();
 //        scheduleRepaint(contentsX(),contentsY(),visibleWidth(),visibleHeight());
     }
+#ifndef APPLE_CHANGES
     d->prevScrollbarVisible = verticalScrollBar()->isVisible();
+#endif
 }
 
 QStringList KHTMLView::formCompletionItems(const QString &name) const
@@ -1387,6 +1389,7 @@ void KHTMLView::setIgnoreWheelEvents( bool e )
 
 void KHTMLView::viewportWheelEvent(QWheelEvent* e)
 {
+#ifndef APPLE_CHANGES
     if ( d->ignoreWheelEvents && !verticalScrollBar()->isVisible() && m_part->parentPart() ) {
         if ( m_part->parentPart()->view() )
             m_part->parentPart()->view()->wheelEvent( e );
@@ -1399,6 +1402,7 @@ void KHTMLView::viewportWheelEvent(QWheelEvent* e)
         d->scrollBarMoved = true;
         QScrollView::viewportWheelEvent( e );
     }
+#endif
 }
 #endif
 
diff --git a/WebCore/khtml/rendering/render_form.cpp b/WebCore/khtml/rendering/render_form.cpp
index ba80442..7f991d0 100644
--- a/WebCore/khtml/rendering/render_form.cpp
+++ b/WebCore/khtml/rendering/render_form.cpp
@@ -931,7 +931,7 @@ void RenderSelect::layout( )
 #ifdef APPLE_CHANGES
         width += w->scrollBarWidth();
         height = size*height;
-        // NSBrowser has problems drawing scrollbar correctly when it's size is too small.
+        // NSBrowser has problems drawing scrollbar correctly when its size is too small.
         if (height < 60)
             height = 60;
 #else /* APPLE_CHANGES not defined */
@@ -1199,12 +1199,21 @@ void RenderTextArea::calcMinMaxWidth()
 
     TextAreaWidget* w = static_cast<TextAreaWidget*>(m_widget);
     const QFontMetrics &m = style()->fontMetrics();
+#ifdef APPLE_CHANGES
+    QSize size( QMAX(element()->cols(), 1)*m.width('x') + w->frameWidth() +
+                w->verticalScrollBarWidth(),
+                QMAX(element()->rows(), 1)*m.height() + w->frameWidth()*2 +
+                (w->wordWrap() == QTextEdit::NoWrap ?
+                 w->horizontalScrollBarHeight() : 0)
+        );
+#else
     QSize size( QMAX(element()->cols(), 1)*m.width('x') + w->frameWidth() +
                 w->verticalScrollBar()->sizeHint().width(),
                 QMAX(element()->rows(), 1)*m.height() + w->frameWidth()*2 +
                 (w->wordWrap() == QTextEdit::NoWrap ?
                  w->horizontalScrollBar()->sizeHint().height() : 0)
         );
+#endif
 
     setIntrinsicWidth( size.width() );
     setIntrinsicHeight( size.height() );
diff --git a/WebCore/kwq/KWQScrollView.h b/WebCore/kwq/KWQScrollView.h
index 0af77e0..0c8d267 100644
--- a/WebCore/kwq/KWQScrollView.h
+++ b/WebCore/kwq/KWQScrollView.h
@@ -67,9 +67,6 @@ public:
 
     virtual void setContentsPos(int x, int y);
 
-    QScrollBar *horizontalScrollBar() const;
-    QScrollBar *verticalScrollBar() const;
-
     virtual void setVScrollBarMode(ScrollBarMode);
     virtual void setHScrollBarMode(ScrollBarMode);
 
diff --git a/WebCore/kwq/KWQScrollView.mm b/WebCore/kwq/KWQScrollView.mm
index 9ca9830..0306673 100644
--- a/WebCore/kwq/KWQScrollView.mm
+++ b/WebCore/kwq/KWQScrollView.mm
@@ -122,20 +122,6 @@ void QScrollView::setContentsPos(int x, int y)
 }
 
 
-QScrollBar *QScrollView::horizontalScrollBar() const
-{
-    _logNeverImplemented();
-    return 0L;
-}
-
-
-QScrollBar *QScrollView::verticalScrollBar() const
-{
-    _logNeverImplemented();
-    return 0L;
-}
-
-
 void QScrollView::setVScrollBarMode(ScrollBarMode)
 {
     _logNeverImplemented();
diff --git a/WebCore/kwq/KWQTextEdit.h b/WebCore/kwq/KWQTextEdit.h
index fe78ef2..1501f3f 100644
--- a/WebCore/kwq/KWQTextEdit.h
+++ b/WebCore/kwq/KWQTextEdit.h
@@ -41,7 +41,6 @@ class QTextEdit : public QScrollView
 	PlainText,
     } TextFormat;
 
-    QTextEdit::QTextEdit();
     QTextEdit(QWidget *parent);
 
     void setText(const QString &);
@@ -61,30 +60,11 @@ class QTextEdit : public QScrollView
     void setCursorPosition(int, int);
 
     void selectAll();
-};
-
-// class QMultiLineEdit ========================================================
-
-class QMultiLineEdit : public QTextEdit {
-public:
-
-    QMultiLineEdit();
-    ~QMultiLineEdit();
-
-    // member functions --------------------------------------------------------
 
 #ifdef APPLE_CHANGES
     int verticalScrollBarWidth() const;
     int horizontalScrollBarHeight() const;
 #endif
-
-
-private:
-    // no copying or assignment
-    // note that these are "standard" (no pendantic stuff needed)
-    QMultiLineEdit(const QMultiLineEdit &);
-    QMultiLineEdit &operator=(const QMultiLineEdit &);
-
-}; // class QMultiLineEdit =====================================================
+};
 
 #endif /* QTEXTEDIT_H_ */
diff --git a/WebCore/kwq/KWQTextEdit.mm b/WebCore/kwq/KWQTextEdit.mm
index 08efa54..d599118 100644
--- a/WebCore/kwq/KWQTextEdit.mm
+++ b/WebCore/kwq/KWQTextEdit.mm
@@ -24,98 +24,13 @@
  */
 #include <kwqdebug.h>
 
-#include <keditcl.h>
 #include <qtextedit.h>
 
 #import <KWQTextArea.h>
 
 
-// RenderTextArea actually uses a TextAreaWidget->KEdit->QMultiLineEdit->QTableView
-
-QTableView::QTableView()
-{
-    // Nothing needed.
-    _logNotYetImplemented();
-}
-
-
-QTableView::~QTableView()
-{
-    // Nothing needed.
-    _logNotYetImplemented();
-}
-
-
-QScrollBar *QTableView::verticalScrollBar() const
-{
-    // Nothing needed.
-    _logNeverImplemented();
-    return 0L;
-}
-
-
-QScrollBar *QTableView::horizontalScrollBar() const
-{
-    // Nothing needed.
-    _logNeverImplemented();
-    return 0L;
-}
-
-
-void QTableView::setTableFlags(uint)
-{
-    // Nothing needed.
-    _logNeverImplemented();
-}
-
-
-void QTableView::clearTableFlags(uint f = ~0)
-{
-    // Nothing needed.
-    _logNeverImplemented();
-}
-
-
-QMultiLineEdit::QMultiLineEdit()
-{
-    // Nothing needed.
-    _logNeverImplemented();
-}
-
-QMultiLineEdit::~QMultiLineEdit()
-{
-    // Nothing needed.
-    _logNeverImplemented();
-}
-
-KEdit::KEdit()
-{
-    _logNeverImplemented();
-}
-
-
-KEdit::KEdit(QWidget *w)
-{
-    KWQTextArea *textView;
-    
-    textView = [[KWQTextArea alloc] initWithFrame: NSMakeRect (0,0,0,0) widget: this];
-    setView (textView);
-    [textView release];
-}
-
-
-KEdit::~KEdit()
-{
-}
-
-
 // class QTextEdit
 
-QTextEdit::QTextEdit()
-{
-    _logNeverImplemented();
-}
-
 QTextEdit::QTextEdit(QWidget *parent)
 {
     KWQTextArea *textView;
@@ -221,3 +136,15 @@ void QTextEdit::selectAll()
     [textView selectAll];
 }
 
+int QTextEdit::verticalScrollBarWidth() const
+{
+    KWQTextArea *textView = (KWQTextArea *)getView();
+    return (int) [[textView verticalScroller] frame].size.width;
+}
+
+int QTextEdit::horizontalScrollBarHeight() const
+{
+    KWQTextArea *textView = (KWQTextArea *)getView();
+    return (int) [[textView horizontalScroller] frame].size.height;
+}
+
diff --git a/WebCore/kwq/kdeui/keditcl.h b/WebCore/kwq/kdeui/keditcl.h
deleted file mode 100644
index d21268d..0000000
--- a/WebCore/kwq/kdeui/keditcl.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * 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. 
- */
-
-#ifndef KEDITCL_H_
-#define KEDITCL_H_
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <qwidget.h>
-#include <KWQFrame.h>
-#include <KWQScrollBar.h>
-#include <qstring.h>
-#include <qtextedit.h>
-
-const uint Tbl_vScrollBar       = 0x00000001;
-const uint Tbl_hScrollBar       = 0x00000002;
-const uint Tbl_autoVScrollBar   = 0x00000004;
-const uint Tbl_autoHScrollBar   = 0x00000008;
-const uint Tbl_autoScrollBars   = 0x0000000C;
-
-
-// class QTableView ============================================================
-
-class QTableView : public QFrame {
-public:
-
-    // structs -----------------------------------------------------------------
-    // typedefs ----------------------------------------------------------------
-    // enums -------------------------------------------------------------------
-    // constants ---------------------------------------------------------------
-    // static member functions -------------------------------------------------
-
-    // constructors, copy constructors, and destructors ------------------------
-
-    QTableView();
-    ~QTableView();
-
-    // member functions --------------------------------------------------------
-
-    QScrollBar *verticalScrollBar() const;
-    QScrollBar *horizontalScrollBar() const;
-
-    virtual void setTableFlags(uint);
-    void clearTableFlags(uint f = ~0);
-
-    // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
-    QTableView(const QTableView &);
-#endif
-
-// add assignment operator 
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
-    QTableView &operator=(const QTableView &);
-#endif
-
-}; // class QTableView =========================================================
-
-
-
-
-// class KEdit =================================================================
-
-class KEdit : public QMultiLineEdit {
-public:
-
-    // structs -----------------------------------------------------------------
-    // typedefs ----------------------------------------------------------------
-    // enums -------------------------------------------------------------------
-    // constants ---------------------------------------------------------------
-    // static member functions -------------------------------------------------
-
-    // constructors, copy constructors, and destructors ------------------------
-
-    KEdit();
-    KEdit(QWidget *);
-    ~KEdit();
-
-    // member functions --------------------------------------------------------
-    // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
-    KEdit(const KEdit &);
-#endif
-
-// add assignment operator 
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
-    KEdit &operator=(const KEdit &);
-#endif
-
-}; // class KEdit ==============================================================
-
-#endif
diff --git a/WebCore/kwq/qt/qscrollview.h b/WebCore/kwq/qt/qscrollview.h
index 0af77e0..0c8d267 100644
--- a/WebCore/kwq/qt/qscrollview.h
+++ b/WebCore/kwq/qt/qscrollview.h
@@ -67,9 +67,6 @@ public:
 
     virtual void setContentsPos(int x, int y);
 
-    QScrollBar *horizontalScrollBar() const;
-    QScrollBar *verticalScrollBar() const;
-
     virtual void setVScrollBarMode(ScrollBarMode);
     virtual void setHScrollBarMode(ScrollBarMode);
 
diff --git a/WebCore/kwq/qt/qtextedit.h b/WebCore/kwq/qt/qtextedit.h
index fe78ef2..1501f3f 100644
--- a/WebCore/kwq/qt/qtextedit.h
+++ b/WebCore/kwq/qt/qtextedit.h
@@ -41,7 +41,6 @@ class QTextEdit : public QScrollView
 	PlainText,
     } TextFormat;
 
-    QTextEdit::QTextEdit();
     QTextEdit(QWidget *parent);
 
     void setText(const QString &);
@@ -61,30 +60,11 @@ class QTextEdit : public QScrollView
     void setCursorPosition(int, int);
 
     void selectAll();
-};
-
-// class QMultiLineEdit ========================================================
-
-class QMultiLineEdit : public QTextEdit {
-public:
-
-    QMultiLineEdit();
-    ~QMultiLineEdit();
-
-    // member functions --------------------------------------------------------
 
 #ifdef APPLE_CHANGES
     int verticalScrollBarWidth() const;
     int horizontalScrollBarHeight() const;
 #endif
-
-
-private:
-    // no copying or assignment
-    // note that these are "standard" (no pendantic stuff needed)
-    QMultiLineEdit(const QMultiLineEdit &);
-    QMultiLineEdit &operator=(const QMultiLineEdit &);
-
-}; // class QMultiLineEdit =====================================================
+};
 
 #endif /* QTEXTEDIT_H_ */
diff --git a/WebCore/src/kdelibs/khtml/khtmlview.cpp b/WebCore/src/kdelibs/khtml/khtmlview.cpp
index b606775..5c017c7 100644
--- a/WebCore/src/kdelibs/khtml/khtmlview.cpp
+++ b/WebCore/src/kdelibs/khtml/khtmlview.cpp
@@ -1208,7 +1208,9 @@ void KHTMLView::restoreScrollBar ( )
         layout();
 //        scheduleRepaint(contentsX(),contentsY(),visibleWidth(),visibleHeight());
     }
+#ifndef APPLE_CHANGES
     d->prevScrollbarVisible = verticalScrollBar()->isVisible();
+#endif
 }
 
 QStringList KHTMLView::formCompletionItems(const QString &name) const
@@ -1387,6 +1389,7 @@ void KHTMLView::setIgnoreWheelEvents( bool e )
 
 void KHTMLView::viewportWheelEvent(QWheelEvent* e)
 {
+#ifndef APPLE_CHANGES
     if ( d->ignoreWheelEvents && !verticalScrollBar()->isVisible() && m_part->parentPart() ) {
         if ( m_part->parentPart()->view() )
             m_part->parentPart()->view()->wheelEvent( e );
@@ -1399,6 +1402,7 @@ void KHTMLView::viewportWheelEvent(QWheelEvent* e)
         d->scrollBarMoved = true;
         QScrollView::viewportWheelEvent( e );
     }
+#endif
 }
 #endif
 
diff --git a/WebCore/src/kdelibs/khtml/rendering/render_form.cpp b/WebCore/src/kdelibs/khtml/rendering/render_form.cpp
index ba80442..7f991d0 100644
--- a/WebCore/src/kdelibs/khtml/rendering/render_form.cpp
+++ b/WebCore/src/kdelibs/khtml/rendering/render_form.cpp
@@ -931,7 +931,7 @@ void RenderSelect::layout( )
 #ifdef APPLE_CHANGES
         width += w->scrollBarWidth();
         height = size*height;
-        // NSBrowser has problems drawing scrollbar correctly when it's size is too small.
+        // NSBrowser has problems drawing scrollbar correctly when its size is too small.
         if (height < 60)
             height = 60;
 #else /* APPLE_CHANGES not defined */
@@ -1199,12 +1199,21 @@ void RenderTextArea::calcMinMaxWidth()
 
     TextAreaWidget* w = static_cast<TextAreaWidget*>(m_widget);
     const QFontMetrics &m = style()->fontMetrics();
+#ifdef APPLE_CHANGES
+    QSize size( QMAX(element()->cols(), 1)*m.width('x') + w->frameWidth() +
+                w->verticalScrollBarWidth(),
+                QMAX(element()->rows(), 1)*m.height() + w->frameWidth()*2 +
+                (w->wordWrap() == QTextEdit::NoWrap ?
+                 w->horizontalScrollBarHeight() : 0)
+        );
+#else
     QSize size( QMAX(element()->cols(), 1)*m.width('x') + w->frameWidth() +
                 w->verticalScrollBar()->sizeHint().width(),
                 QMAX(element()->rows(), 1)*m.height() + w->frameWidth()*2 +
                 (w->wordWrap() == QTextEdit::NoWrap ?
                  w->horizontalScrollBar()->sizeHint().height() : 0)
         );
+#endif
 
     setIntrinsicWidth( size.width() );
     setIntrinsicHeight( size.height() );
diff --git a/WebCore/src/kwq/KWQScrollView.mm b/WebCore/src/kwq/KWQScrollView.mm
index 9ca9830..0306673 100644
--- a/WebCore/src/kwq/KWQScrollView.mm
+++ b/WebCore/src/kwq/KWQScrollView.mm
@@ -122,20 +122,6 @@ void QScrollView::setContentsPos(int x, int y)
 }
 
 
-QScrollBar *QScrollView::horizontalScrollBar() const
-{
-    _logNeverImplemented();
-    return 0L;
-}
-
-
-QScrollBar *QScrollView::verticalScrollBar() const
-{
-    _logNeverImplemented();
-    return 0L;
-}
-
-
 void QScrollView::setVScrollBarMode(ScrollBarMode)
 {
     _logNeverImplemented();
diff --git a/WebCore/src/kwq/KWQTextEdit.mm b/WebCore/src/kwq/KWQTextEdit.mm
index 08efa54..d599118 100644
--- a/WebCore/src/kwq/KWQTextEdit.mm
+++ b/WebCore/src/kwq/KWQTextEdit.mm
@@ -24,98 +24,13 @@
  */
 #include <kwqdebug.h>
 
-#include <keditcl.h>
 #include <qtextedit.h>
 
 #import <KWQTextArea.h>
 
 
-// RenderTextArea actually uses a TextAreaWidget->KEdit->QMultiLineEdit->QTableView
-
-QTableView::QTableView()
-{
-    // Nothing needed.
-    _logNotYetImplemented();
-}
-
-
-QTableView::~QTableView()
-{
-    // Nothing needed.
-    _logNotYetImplemented();
-}
-
-
-QScrollBar *QTableView::verticalScrollBar() const
-{
-    // Nothing needed.
-    _logNeverImplemented();
-    return 0L;
-}
-
-
-QScrollBar *QTableView::horizontalScrollBar() const
-{
-    // Nothing needed.
-    _logNeverImplemented();
-    return 0L;
-}
-
-
-void QTableView::setTableFlags(uint)
-{
-    // Nothing needed.
-    _logNeverImplemented();
-}
-
-
-void QTableView::clearTableFlags(uint f = ~0)
-{
-    // Nothing needed.
-    _logNeverImplemented();
-}
-
-
-QMultiLineEdit::QMultiLineEdit()
-{
-    // Nothing needed.
-    _logNeverImplemented();
-}
-
-QMultiLineEdit::~QMultiLineEdit()
-{
-    // Nothing needed.
-    _logNeverImplemented();
-}
-
-KEdit::KEdit()
-{
-    _logNeverImplemented();
-}
-
-
-KEdit::KEdit(QWidget *w)
-{
-    KWQTextArea *textView;
-    
-    textView = [[KWQTextArea alloc] initWithFrame: NSMakeRect (0,0,0,0) widget: this];
-    setView (textView);
-    [textView release];
-}
-
-
-KEdit::~KEdit()
-{
-}
-
-
 // class QTextEdit
 
-QTextEdit::QTextEdit()
-{
-    _logNeverImplemented();
-}
-
 QTextEdit::QTextEdit(QWidget *parent)
 {
     KWQTextArea *textView;
@@ -221,3 +136,15 @@ void QTextEdit::selectAll()
     [textView selectAll];
 }
 
+int QTextEdit::verticalScrollBarWidth() const
+{
+    KWQTextArea *textView = (KWQTextArea *)getView();
+    return (int) [[textView verticalScroller] frame].size.width;
+}
+
+int QTextEdit::horizontalScrollBarHeight() const
+{
+    KWQTextArea *textView = (KWQTextArea *)getView();
+    return (int) [[textView horizontalScroller] frame].size.height;
+}
+
diff --git a/WebCore/src/kwq/kdeui/keditcl.h b/WebCore/src/kwq/kdeui/keditcl.h
deleted file mode 100644
index d21268d..0000000
--- a/WebCore/src/kwq/kdeui/keditcl.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * 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. 
- */
-
-#ifndef KEDITCL_H_
-#define KEDITCL_H_
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <qwidget.h>
-#include <KWQFrame.h>
-#include <KWQScrollBar.h>
-#include <qstring.h>
-#include <qtextedit.h>
-
-const uint Tbl_vScrollBar       = 0x00000001;
-const uint Tbl_hScrollBar       = 0x00000002;
-const uint Tbl_autoVScrollBar   = 0x00000004;
-const uint Tbl_autoHScrollBar   = 0x00000008;
-const uint Tbl_autoScrollBars   = 0x0000000C;
-
-
-// class QTableView ============================================================
-
-class QTableView : public QFrame {
-public:
-
-    // structs -----------------------------------------------------------------
-    // typedefs ----------------------------------------------------------------
-    // enums -------------------------------------------------------------------
-    // constants ---------------------------------------------------------------
-    // static member functions -------------------------------------------------
-
-    // constructors, copy constructors, and destructors ------------------------
-
-    QTableView();
-    ~QTableView();
-
-    // member functions --------------------------------------------------------
-
-    QScrollBar *verticalScrollBar() const;
-    QScrollBar *horizontalScrollBar() const;
-
-    virtual void setTableFlags(uint);
-    void clearTableFlags(uint f = ~0);
-
-    // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
-    QTableView(const QTableView &);
-#endif
-
-// add assignment operator 
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
-    QTableView &operator=(const QTableView &);
-#endif
-
-}; // class QTableView =========================================================
-
-
-
-
-// class KEdit =================================================================
-
-class KEdit : public QMultiLineEdit {
-public:
-
-    // structs -----------------------------------------------------------------
-    // typedefs ----------------------------------------------------------------
-    // enums -------------------------------------------------------------------
-    // constants ---------------------------------------------------------------
-    // static member functions -------------------------------------------------
-
-    // constructors, copy constructors, and destructors ------------------------
-
-    KEdit();
-    KEdit(QWidget *);
-    ~KEdit();
-
-    // member functions --------------------------------------------------------
-    // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
-    KEdit(const KEdit &);
-#endif
-
-// add assignment operator 
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
-    KEdit &operator=(const KEdit &);
-#endif
-
-}; // class KEdit ==============================================================
-
-#endif
diff --git a/WebCore/src/kwq/qt/qscrollview.h b/WebCore/src/kwq/qt/qscrollview.h
index 0af77e0..0c8d267 100644
--- a/WebCore/src/kwq/qt/qscrollview.h
+++ b/WebCore/src/kwq/qt/qscrollview.h
@@ -67,9 +67,6 @@ public:
 
     virtual void setContentsPos(int x, int y);
 
-    QScrollBar *horizontalScrollBar() const;
-    QScrollBar *verticalScrollBar() const;
-
     virtual void setVScrollBarMode(ScrollBarMode);
     virtual void setHScrollBarMode(ScrollBarMode);
 
diff --git a/WebCore/src/kwq/qt/qtextedit.h b/WebCore/src/kwq/qt/qtextedit.h
index fe78ef2..1501f3f 100644
--- a/WebCore/src/kwq/qt/qtextedit.h
+++ b/WebCore/src/kwq/qt/qtextedit.h
@@ -41,7 +41,6 @@ class QTextEdit : public QScrollView
 	PlainText,
     } TextFormat;
 
-    QTextEdit::QTextEdit();
     QTextEdit(QWidget *parent);
 
     void setText(const QString &);
@@ -61,30 +60,11 @@ class QTextEdit : public QScrollView
     void setCursorPosition(int, int);
 
     void selectAll();
-};
-
-// class QMultiLineEdit ========================================================
-
-class QMultiLineEdit : public QTextEdit {
-public:
-
-    QMultiLineEdit();
-    ~QMultiLineEdit();
-
-    // member functions --------------------------------------------------------
 
 #ifdef APPLE_CHANGES
     int verticalScrollBarWidth() const;
     int horizontalScrollBarHeight() const;
 #endif
-
-
-private:
-    // no copying or assignment
-    // note that these are "standard" (no pendantic stuff needed)
-    QMultiLineEdit(const QMultiLineEdit &);
-    QMultiLineEdit &operator=(const QMultiLineEdit &);
-
-}; // class QMultiLineEdit =====================================================
+};
 
 #endif /* QTEXTEDIT_H_ */

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list