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

hyatt hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:39:16 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit cf6b80f2be8e5e517591db9749bf90a590d83540
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Sep 14 02:05:24 2002 +0000

    	Landing code that makes textfields, buttons, checkboxes, radio
    	buttons, and dropdown lists all draw correctly with respect to
    	z-index.  They all employ the same simple hack (just never paint
    	unless KHTML tells them to).
    
    	Unpatched widgets include the password field, the listbox, and the
    	textarea.
    
    	The only issue with regards to painting with the widgets I've
    	patched is the textfield... its editor floats to the top when the
    	field is being edited.
    
    	Event handling will also be incorrect and will need to be patched
    	separately.
    
            * khtml/rendering/render_body.cpp:
            (RenderBody::printBoxDecorations):
            * khtml/rendering/render_replaced.cpp:
            (RenderWidget::printObject):
            * kwq/KWQButton.mm:
            (QButton::QButton):
            (QButton::paint):
            (-[KWQNSButton drawRect:]):
            (-[KWQNSButton paint]):
            * kwq/KWQComboBox.mm:
            (-[KWQNSPopUpButton drawRect:]):
            (-[KWQNSPopUpButton paint]):
            (QComboBox::QComboBox):
            (QComboBox::insertItem):
            (QComboBox::paint):
            * kwq/KWQLineEdit.mm:
            (QLineEdit::paint):
            * kwq/KWQNSTextField.h:
            * kwq/KWQNSTextField.mm:
            (-[KWQNSTextField paint]):
            * kwq/qt/qbutton.h:
            * kwq/qt/qcombobox.h:
            * kwq/qt/qlineedit.h:
            * kwq/qt/qwidget.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2068 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 663255d..6abfaed 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,45 @@
+2002-09-13  David Hyatt  <hyatt at apple.com>
+
+	Landing code that makes textfields, buttons, checkboxes, radio
+	buttons, and dropdown lists all draw correctly with respect to
+	z-index.  They all employ the same simple hack (just never paint
+	unless KHTML tells them to).
+
+	Unpatched widgets include the password field, the listbox, and the
+	textarea.  
+
+	The only issue with regards to painting with the widgets I've
+	patched is the textfield... its editor floats to the top when the
+	field is being edited.
+
+	Event handling will also be incorrect and will need to be patched
+	separately.
+	
+        * khtml/rendering/render_body.cpp:
+        (RenderBody::printBoxDecorations):
+        * khtml/rendering/render_replaced.cpp:
+        (RenderWidget::printObject):
+        * kwq/KWQButton.mm:
+        (QButton::QButton):
+        (QButton::paint):
+        (-[KWQNSButton drawRect:]):
+        (-[KWQNSButton paint]):
+        * kwq/KWQComboBox.mm:
+        (-[KWQNSPopUpButton drawRect:]):
+        (-[KWQNSPopUpButton paint]):
+        (QComboBox::QComboBox):
+        (QComboBox::insertItem):
+        (QComboBox::paint):
+        * kwq/KWQLineEdit.mm:
+        (QLineEdit::paint):
+        * kwq/KWQNSTextField.h:
+        * kwq/KWQNSTextField.mm:
+        (-[KWQNSTextField paint]):
+        * kwq/qt/qbutton.h:
+        * kwq/qt/qcombobox.h:
+        * kwq/qt/qlineedit.h:
+        * kwq/qt/qwidget.h:
+
 2002-09-13  Richard Williamson (Home)  <rjw at apple.com>
 
         Fixed navigation to link on mouse up after drag.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 663255d..6abfaed 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,45 @@
+2002-09-13  David Hyatt  <hyatt at apple.com>
+
+	Landing code that makes textfields, buttons, checkboxes, radio
+	buttons, and dropdown lists all draw correctly with respect to
+	z-index.  They all employ the same simple hack (just never paint
+	unless KHTML tells them to).
+
+	Unpatched widgets include the password field, the listbox, and the
+	textarea.  
+
+	The only issue with regards to painting with the widgets I've
+	patched is the textfield... its editor floats to the top when the
+	field is being edited.
+
+	Event handling will also be incorrect and will need to be patched
+	separately.
+	
+        * khtml/rendering/render_body.cpp:
+        (RenderBody::printBoxDecorations):
+        * khtml/rendering/render_replaced.cpp:
+        (RenderWidget::printObject):
+        * kwq/KWQButton.mm:
+        (QButton::QButton):
+        (QButton::paint):
+        (-[KWQNSButton drawRect:]):
+        (-[KWQNSButton paint]):
+        * kwq/KWQComboBox.mm:
+        (-[KWQNSPopUpButton drawRect:]):
+        (-[KWQNSPopUpButton paint]):
+        (QComboBox::QComboBox):
+        (QComboBox::insertItem):
+        (QComboBox::paint):
+        * kwq/KWQLineEdit.mm:
+        (QLineEdit::paint):
+        * kwq/KWQNSTextField.h:
+        * kwq/KWQNSTextField.mm:
+        (-[KWQNSTextField paint]):
+        * kwq/qt/qbutton.h:
+        * kwq/qt/qcombobox.h:
+        * kwq/qt/qlineedit.h:
+        * kwq/qt/qwidget.h:
+
 2002-09-13  Richard Williamson (Home)  <rjw at apple.com>
 
         Fixed navigation to link on mouse up after drag.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 663255d..6abfaed 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,45 @@
+2002-09-13  David Hyatt  <hyatt at apple.com>
+
+	Landing code that makes textfields, buttons, checkboxes, radio
+	buttons, and dropdown lists all draw correctly with respect to
+	z-index.  They all employ the same simple hack (just never paint
+	unless KHTML tells them to).
+
+	Unpatched widgets include the password field, the listbox, and the
+	textarea.  
+
+	The only issue with regards to painting with the widgets I've
+	patched is the textfield... its editor floats to the top when the
+	field is being edited.
+
+	Event handling will also be incorrect and will need to be patched
+	separately.
+	
+        * khtml/rendering/render_body.cpp:
+        (RenderBody::printBoxDecorations):
+        * khtml/rendering/render_replaced.cpp:
+        (RenderWidget::printObject):
+        * kwq/KWQButton.mm:
+        (QButton::QButton):
+        (QButton::paint):
+        (-[KWQNSButton drawRect:]):
+        (-[KWQNSButton paint]):
+        * kwq/KWQComboBox.mm:
+        (-[KWQNSPopUpButton drawRect:]):
+        (-[KWQNSPopUpButton paint]):
+        (QComboBox::QComboBox):
+        (QComboBox::insertItem):
+        (QComboBox::paint):
+        * kwq/KWQLineEdit.mm:
+        (QLineEdit::paint):
+        * kwq/KWQNSTextField.h:
+        * kwq/KWQNSTextField.mm:
+        (-[KWQNSTextField paint]):
+        * kwq/qt/qbutton.h:
+        * kwq/qt/qcombobox.h:
+        * kwq/qt/qlineedit.h:
+        * kwq/qt/qwidget.h:
+
 2002-09-13  Richard Williamson (Home)  <rjw at apple.com>
 
         Fixed navigation to link on mouse up after drag.
diff --git a/WebCore/khtml/rendering/render_body.cpp b/WebCore/khtml/rendering/render_body.cpp
index 4eee453..6ed1dfb 100644
--- a/WebCore/khtml/rendering/render_body.cpp
+++ b/WebCore/khtml/rendering/render_body.cpp
@@ -57,7 +57,7 @@ void RenderBody::printBoxDecorations(QPainter *p,int, int _y,
     CachedImage *bg = 0;
     
     if (parent()->style()->backgroundColor().isValid() || parent()->style()->backgroundImage()) {
-        c =  style()->backgroundColor();
+        c = style()->backgroundColor();
         bg = style()->backgroundImage();
     }
     
diff --git a/WebCore/khtml/rendering/render_replaced.cpp b/WebCore/khtml/rendering/render_replaced.cpp
index e0d3c93..9310c88 100644
--- a/WebCore/khtml/rendering/render_replaced.cpp
+++ b/WebCore/khtml/rendering/render_replaced.cpp
@@ -267,6 +267,12 @@ void RenderWidget::printObject(QPainter* /*p*/, int, int, int, int, int _tx, int
     }
     m_view->addChild(m_widget, xPos, yPos );
     m_widget->show();
+    
+#ifdef APPLE_CHANGES
+    // Tell the widget to paint now.  This is the only time the widget is allowed
+    // to paint itself.  That way it will composite properly with z-indexed layers.
+    m_widget->paint();
+#endif
 }
 
 bool RenderWidget::eventFilter(QObject* /*o*/, QEvent* e)
diff --git a/WebCore/kwq/KWQButton.h b/WebCore/kwq/KWQButton.h
index 7407836..0dbd244 100644
--- a/WebCore/kwq/KWQButton.h
+++ b/WebCore/kwq/KWQButton.h
@@ -45,7 +45,8 @@ public:
     QString text() const;
     
     virtual void clicked();
-
+    virtual void paint();
+    
 private:
     KWQSignal m_clicked;
     KWQButtonAdapter *m_adapter;
diff --git a/WebCore/kwq/KWQButton.mm b/WebCore/kwq/KWQButton.mm
index 7049235..77f833e 100644
--- a/WebCore/kwq/KWQButton.mm
+++ b/WebCore/kwq/KWQButton.mm
@@ -37,12 +37,21 @@
 
 @end
 
+ at interface KWQNSButton : NSButton
+{
+}
+
+- (void)paint;
+- (void)drawRect: (NSRect)rect;
+
+ at end
+
 QButton::QButton()
     : m_clicked(this, SIGNAL(clicked()))
     , m_adapter([[KWQButtonAdapter alloc] initWithQButton:this])
 {
-    NSButton *button = [[NSButton alloc] init];
-
+    KWQNSButton *button = [[KWQNSButton alloc] init];
+    
     [button setTarget:m_adapter];
     [button setAction:@selector(action:)];
 
@@ -62,6 +71,12 @@ QButton::~QButton()
     [m_adapter release];
 }
 
+void QButton::paint()
+{
+    KWQNSButton* button = (KWQNSButton*)getView();
+    [button paint];
+}
+
 void QButton::setText(const QString &s)
 {
     NSButton *button = (NSButton *)getView();
@@ -93,3 +108,19 @@ void QButton::clicked()
 }
 
 @end
+
+ at implementation KWQNSButton
+
+- (void)drawRect: (NSRect)rect
+{
+}
+
+- (void)paint
+{
+    [self lockFocus];
+    [super drawRect: [self bounds]];
+    [self unlockFocus];
+}
+
+ at end
+
diff --git a/WebCore/kwq/KWQComboBox.h b/WebCore/kwq/KWQComboBox.h
index 21a2160..0dc99e8 100644
--- a/WebCore/kwq/KWQComboBox.h
+++ b/WebCore/kwq/KWQComboBox.h
@@ -49,6 +49,8 @@ public:
     QListBox *listBox() const { return 0; }
     void popup() { }
     
+    virtual void paint();
+    
     QSize sizeHint() const;
     QRect frameGeometry() const;
     void setFrameGeometry(const QRect &);
diff --git a/WebCore/kwq/KWQComboBox.mm b/WebCore/kwq/KWQComboBox.mm
index bd6249a..9e5e4fe 100644
--- a/WebCore/kwq/KWQComboBox.mm
+++ b/WebCore/kwq/KWQComboBox.mm
@@ -55,11 +55,35 @@
 - initWithWidget:(QWidget *)widget;
 @end
 
+ at interface KWQNSPopUpButton : NSPopUpButton
+{
+}
+
+- (void)paint;
+- (void)drawRect: (NSRect)rect;
+
+ at end
+
+ at implementation KWQNSPopUpButton
+
+- (void)drawRect: (NSRect)rect
+{
+}
+
+- (void)paint
+{
+    [self lockFocus];
+    [super drawRect: [self bounds]];
+    [self unlockFocus];
+}
+
+ at end
+
 QComboBox::QComboBox()
     : m_activated(this, SIGNAL(activated(int)))
     , m_adapter([[KWQComboBoxAdapter alloc] initWithQComboBox:this])
 {
-    NSPopUpButton *button = [[NSPopUpButton alloc] init];
+    KWQNSPopUpButton *button = [[KWQNSPopUpButton alloc] init];
     
     KWQPopUpButtonCell *cell = [[KWQPopUpButtonCell alloc] initWithWidget:this];
     [button setCell:cell];
@@ -100,6 +124,12 @@ void QComboBox::insertItem(const QString &text, int index)
     [[button itemAtIndex:index] setTitle:text.getNSString()];
 }
 
+void QComboBox::paint()
+{
+    KWQNSPopUpButton *button = (NSPopUpButton *)getView();
+    [button paint];
+}
+
 QSize QComboBox::sizeHint() const 
 {
     NSPopUpButton *button = (NSPopUpButton *)getView();
diff --git a/WebCore/kwq/KWQLineEdit.h b/WebCore/kwq/KWQLineEdit.h
index dc002b5..00b8828 100644
--- a/WebCore/kwq/KWQLineEdit.h
+++ b/WebCore/kwq/KWQLineEdit.h
@@ -54,6 +54,8 @@ public:
     
     void setFont(const QFont &font);
     
+    virtual void paint();
+    
     QSize sizeForCharacterWidth(int numCharacters) const;
     QRect frameGeometry() const;
     void setFrameGeometry(const QRect &);
diff --git a/WebCore/kwq/KWQLineEdit.mm b/WebCore/kwq/KWQLineEdit.mm
index 49c503f..988da2d 100644
--- a/WebCore/kwq/KWQLineEdit.mm
+++ b/WebCore/kwq/KWQLineEdit.mm
@@ -47,6 +47,12 @@ void QLineEdit::setEchoMode(EchoMode mode)
     [textField setPasswordMode:mode == Password];
 }
 
+void QLineEdit::paint()
+{
+    KWQNSTextField *textField = (KWQNSTextField *)getView();
+    [textField paint];
+}
+
 void QLineEdit::setCursorPosition(int)
 {
     // Don't do anything here.
diff --git a/WebCore/kwq/KWQNSTextField.h b/WebCore/kwq/KWQNSTextField.h
index fb78e3c..eecf5be 100644
--- a/WebCore/kwq/KWQNSTextField.h
+++ b/WebCore/kwq/KWQNSTextField.h
@@ -42,6 +42,9 @@ class QLineEdit;
 
 - initWithQLineEdit:(QLineEdit *)widget;
 
+- (void)drawRect:(NSRect)rect;
+- (void)paint;
+
 - (void)setPasswordMode:(BOOL)flag;
 - (BOOL)passwordMode;
 - (void)setMaximumLength:(int)len;
diff --git a/WebCore/kwq/KWQNSTextField.mm b/WebCore/kwq/KWQNSTextField.mm
index 667a98f..cb2b545 100644
--- a/WebCore/kwq/KWQNSTextField.mm
+++ b/WebCore/kwq/KWQNSTextField.mm
@@ -123,6 +123,17 @@
     [secureField setFrame:NSInsetRect([self bounds], FOCUS_BORDER_SIZE, FOCUS_BORDER_SIZE)];
 }
 
+- (void)drawRect:(NSRect)rect;
+{
+}
+
+-(void)paint
+{
+    [self lockFocus];
+    [super drawRect: [self bounds]];
+    [self unlockFocus];
+}
+
 - (void)setFrameSize:(NSSize)size
 {
     [super setFrameSize:size];
diff --git a/WebCore/kwq/KWQTextField.h b/WebCore/kwq/KWQTextField.h
index fb78e3c..eecf5be 100644
--- a/WebCore/kwq/KWQTextField.h
+++ b/WebCore/kwq/KWQTextField.h
@@ -42,6 +42,9 @@ class QLineEdit;
 
 - initWithQLineEdit:(QLineEdit *)widget;
 
+- (void)drawRect:(NSRect)rect;
+- (void)paint;
+
 - (void)setPasswordMode:(BOOL)flag;
 - (BOOL)passwordMode;
 - (void)setMaximumLength:(int)len;
diff --git a/WebCore/kwq/KWQTextField.mm b/WebCore/kwq/KWQTextField.mm
index 667a98f..cb2b545 100644
--- a/WebCore/kwq/KWQTextField.mm
+++ b/WebCore/kwq/KWQTextField.mm
@@ -123,6 +123,17 @@
     [secureField setFrame:NSInsetRect([self bounds], FOCUS_BORDER_SIZE, FOCUS_BORDER_SIZE)];
 }
 
+- (void)drawRect:(NSRect)rect;
+{
+}
+
+-(void)paint
+{
+    [self lockFocus];
+    [super drawRect: [self bounds]];
+    [self unlockFocus];
+}
+
 - (void)setFrameSize:(NSSize)size
 {
     [super setFrameSize:size];
diff --git a/WebCore/kwq/KWQWidget.h b/WebCore/kwq/KWQWidget.h
index 3c6e548..68a66f7 100644
--- a/WebCore/kwq/KWQWidget.h
+++ b/WebCore/kwq/KWQWidget.h
@@ -87,6 +87,8 @@ public:
     void move(int, int);
     void move(const QPoint &);
 
+    virtual void paint() {};
+    
     virtual QRect frameGeometry() const;
     virtual void setFrameGeometry(const QRect &);
 
diff --git a/WebCore/kwq/qt/qbutton.h b/WebCore/kwq/qt/qbutton.h
index 7407836..0dbd244 100644
--- a/WebCore/kwq/qt/qbutton.h
+++ b/WebCore/kwq/qt/qbutton.h
@@ -45,7 +45,8 @@ public:
     QString text() const;
     
     virtual void clicked();
-
+    virtual void paint();
+    
 private:
     KWQSignal m_clicked;
     KWQButtonAdapter *m_adapter;
diff --git a/WebCore/kwq/qt/qcombobox.h b/WebCore/kwq/qt/qcombobox.h
index 21a2160..0dc99e8 100644
--- a/WebCore/kwq/qt/qcombobox.h
+++ b/WebCore/kwq/qt/qcombobox.h
@@ -49,6 +49,8 @@ public:
     QListBox *listBox() const { return 0; }
     void popup() { }
     
+    virtual void paint();
+    
     QSize sizeHint() const;
     QRect frameGeometry() const;
     void setFrameGeometry(const QRect &);
diff --git a/WebCore/kwq/qt/qlineedit.h b/WebCore/kwq/qt/qlineedit.h
index dc002b5..00b8828 100644
--- a/WebCore/kwq/qt/qlineedit.h
+++ b/WebCore/kwq/qt/qlineedit.h
@@ -54,6 +54,8 @@ public:
     
     void setFont(const QFont &font);
     
+    virtual void paint();
+    
     QSize sizeForCharacterWidth(int numCharacters) const;
     QRect frameGeometry() const;
     void setFrameGeometry(const QRect &);
diff --git a/WebCore/kwq/qt/qwidget.h b/WebCore/kwq/qt/qwidget.h
index 3c6e548..68a66f7 100644
--- a/WebCore/kwq/qt/qwidget.h
+++ b/WebCore/kwq/qt/qwidget.h
@@ -87,6 +87,8 @@ public:
     void move(int, int);
     void move(const QPoint &);
 
+    virtual void paint() {};
+    
     virtual QRect frameGeometry() const;
     virtual void setFrameGeometry(const QRect &);
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list